32-Bit Instruction Set

 

 

 

 

 

 

 

ADD

 

 

 

 

 

 

 

Add Without Carry

Operation:

RA RA + RB

 

 

Assembler Syntax:

ADD %rA,%rB

 

 

Example:

ADD %L3,%g0 ; ADD %g0 to %L3

Description:

Adds the contents of register A to register B and stores the result in register A.

Condition Codes:

Flags:

 

 

 

 

 

 

N

V

Z

C

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

N: Result bit 31

V: Signed-arithmetic overflow

Z:Set if result is zero; cleared otherwise

C:Carry-out of addition

Instruction Format:

 

RR

 

 

 

 

 

 

 

 

 

 

 

Instruction Fields:

 

A = Register index of RA operand

 

 

 

 

 

 

 

 

 

 

 

 

B = Register index of RB operand

 

 

 

 

 

 

 

15

14

13

 

12

11

10

9

8

7

6

5

4

3

2

1

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

0

0

 

0

0

0

 

 

B

 

 

 

 

A

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2

32-Bit Instruction Set

Altera Corporation

35

Page 47
Image 47
Excalibur electronic A-MNL-NIOSPROG-01.1 manual Add Without Carry, ADD %rA,%rB, ADD %L3,%g0 ADD %g0 to %L3