I see it support encoding T2 for Thumb-2 instruction set.But which instruction format does Cortex-R support for ARM instruction,encoding A1 orA2?
I must admit I've never noticed those T1, T2 etc before, but I believe the answer is you shouldn't have to worry about that if you have a Cortex-R as they support the ARMv7 architecture.
Those T1, T2, T3 encodings are where the same instruction has a number of different encodings depending normally on what registers can be used, the compiler or assembler will automatically choose the correct one to use. The ARMv7' after the encoding type is the important bit as some forms were not supported in earlier versions of the architecture. All the Cortex-R processors support ARMv7 which includes all the Thumb-2 instructions and I think they support all the ARM 32 bit instructions too except there may be variations in the floating point support. The same is true of the A1 A2 encodings though there's normally only the one form for a 32 bit ARM instruction
Encoding A1 and A2 have different range of immediate constants.And,I want to know the rang of operand 2 for MOV for Cortex.It's useful for program,isn't it?
Hi,
> Encoding A1 and A2 have different range of immediate constants.And,I want to know
> the rang of operand 2 for MOV for Cortex.It's useful for program,isn't it?
Note that for this case there is an applicable syntax for A1 and A2.
If you write:
MOV Rd, #<const>
... the A1 format would be used, and <const> must not exceed the 12-bit range. If <const> is too large, the compiler/assembler would generate an error and advise you to use the MOVW syntax.
MOVW Rd, #<const>
... the A2 format would be ued, and the range for <const> can be 16-bit.
Xingguang