Excalibur electronic A-MNL-NIOSPROG-01.1 用户手册

下载
页码 122
36
Altera Corporation
32-Bit Instruction Set
ADDI
Add Immediate
Operation:
RA
← RA + (0x00.00 : K : IMM5)
Assembler Syntax:
ADDI %rA,IMM5
Example:
Not preceded by PFX: 
ADDI %L5,6 ; add 6 to %L5
Preceded by PFX:
PFX %hi(1000)
ADDI %g3,%lo(1000) ; ADD 1000 to %g3
Description:
Not preceded by PFX: 
Adds 5-bit immediate value to register A, stores result in register A. IMM5 is in the 
range [0..31].
Preceded by PFX:
The immediate operand is extended from 5 to 16 bits by concatenating the 
contents of the K-register (11 bits) with IMM5 (5 bits). The 16-bit immediate value 
(K : IMM5) is zero-extended to 32 bits and added to register A.
Condition Codes:
Flags:
N: Result bit 31
V: Signed-arithmetic overflow
Z: Set if result is zero; cleared otherwise
C: Carry-out of addition
Instruction Format:
Ri5
Instruction Fields:
A = Register index of RA operand 
IMM5 = 5-bit immediate value
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
0
0
0
0
0
1
IMM5
A
N
V
Z
C