Immediate (AM 1)#imm
where:
|
imm |
Specifies a constant operand encoded in the instruction as an 8-bit immediate ( imm_8 ) and a 4-bit immediate ( rt_imm ). Hence, imm is equal to the result of rotating imm_8 right by ( 2*rt_imm ) bits. |
addr_mode = imm_8 Rotate_Right (rt_imm *2)
if rt_imm == 0 then
shifter_carry_out
= C flag
else /* rt_imm != 0 */
shifter_carry_out
= addr_mode[31]
This data-processing operand is a constant operand which is defined in the instruction. The value of addr_mode is created by rotating an 8-bit-immediate value to the right. The 8-bit immediate is rotated to any even bit position in a 32-bit word. If the rotate immediate is zero, the carry-out from the shifter is the value of the C flag, otherwise it is set to bit[31] of the value of addr_mode .
|
31 |
|
|
28 |
27 |
26 |
25 |
24 |
|
|
21 |
20 |
19 |
|
|
16 |
|
condition |
0 |
0 |
1 |
opcode |
S |
op1 |
|||||||||
|
15 |
|
|
12 |
11 |
|
|
8 |
7 |
|
|
|
|
|
|
0 |
|
dest |
rt_imm |
imm_8 |
|||||||||||||
More precise control of the encoding is provided by specifying the instruction fields directly by using the syntax:
#imm_8, rt_amount
where:
rt_amount = 2*rt_imm
ADC R0, R11, #1