ARM Overview: Difference between revisions

m
Fix a few typos
[unchecked revision][unchecked revision]
m (Fix a few typos)
m (Fix a few typos)
Line 169:
|}
 
Loading of large immediate values into registers can be interestingly different from X86/X64. A immediate value being a value that is literally encoded into the instruction. For example the X86/X64 compatible processors support loading a 32-bit immediate (also called a constant) into aan arbitrary register. The ARM's A32 and Thumb32 instruction sets do not. Instead one must use a series instructions to gain the same effect or store the value in memory outside of the instruction stream. In essence one may consider the storage of the value outside of the instruction stream the same as storage inside but the does exist a difference in many ways and this is something to keep in mind about the ARM. But, any compiler or assembler can and may take care of this problem for you. If you are compiling C/C++ code then these problems will be transparent to you for example, but as I said this is good information to know and understand especially with system software development.
 
Example, of machine code produced by GCC to load a register with a 32-bit value. As you can note the immediate value is technically outside of the instruction stream. On the X86/X64 the complete
Line 195:
 
 
Almost all instructioninstructions support conditional execution which is directly encoded into the instruction. On a X86/X64 architecture when a series of instructioninstructions need to be conditionally executed you will likely find a branching instruction which creates a completely separate code path for the processor to follow is the branch happens. The ARM supports branching, but also almost all individual instructions support conditional execution so that instead of causing the processor to potentially flush and refill the pipeline because a branch occurred instead it will load instructions into the pipeline which have a special conditional field. There are a maximum of 16 specified conditional codes with one reserved condition making 15 usable conditions. So instead of making a branch only to execute a few instructions those few instructions can remain in the execution path and will not be executed or will be executed simply using the conditional codes.
 
Here are the conditional codes for example:
Anonymous user