Intel XScale(R) technology topicImmediate (AM 1)

Syntax

#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.

Description

The data-processing operand "immediate" performs the following operation (pseudo-code description):

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 .

Encoding

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

 Note

The only valid 32-bit immediates for this format are those that can be formed by rotating an 8-bit immediate right by an even amount.
For some values of imm , more than one encoding is possible. If more than one encoding is possible, the assembler chooses the correct one as follows:
If imm is located in the range 0 to 0xFF, an encoding with rt_imm == 0 is available. The assembler has to choose that encoding. Choosing another encoding would affect setting the C flag by some instructions.
It is recommended to choose the encoding with the smallest value of rt_imm . This choice does not affect instruction functionality.

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

Example

ADC   R0, R11, #1

Further Information

See Addressing Mode 1: Data-Processing Operands
See Assembler Instructions