I have a maybe trivial question, but what is a difference between Thumb (-mthumb)
and Arm (-marm)
state and why most of the tutorials recommend to use Thumb
state?
I am curious what exactly does it mean? What it is related to?
Best!
I would suggest to read those two articles, one from Arm, Instruction Set Architecture (-marm means that GCC will generate arm32/A32 code, -mthumb means that it will generate thumb/T32 one), and this research paper, Profile Guided Selection of ARM and ThumbInstructions .
Basically, the two instruction sets differ in the set of instructions available as well as their encoding. You should therefore get a smaller and faster executable by using thumb/T32 than by using arm/A32.
This is the reason why most of the tutorials recommend to use the thumb/T32 instruction set.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.