ADD(U)
Signed or Unsigned Integer Addition Without Saturation
3-32
Example 1
ADD .L2X
A1,B1,B2
Before instruction
1 cycle after instruction
A1
0000 325Ah
12890
A1
0000 325Ah
B1
FFFF FF12h
–238
B1
FFFF FF12h
B2
XXXX XXXXh
B2
0000 316Ch
12652
Example 2
ADDU .L1
A1,A2,A5:A4
Before instruction
1 cycle after instruction
A1
0000 325Ah
12890
†
A1
0000 325Ah
A2
FFFF FF12h
4294967058
†
A2
FFFF FF12h
A5:A4
XXXX XXXX
A5:A4
0000 0001h
0000 316Ch
4294979948
‡
Example 3
ADDU .L1
A1,A3:A2,A5:A4
Before instruction
1 cycle after instruction
A1
0000 325Ah
12890
A1
0000 325Ah
A3:A2
0000 00FFh
FFFF FF12h
1099511627538
‡
A3:A2
0000 00FFh
FFFF FF12h
A5:A4
0000 0000h
0000 0000h
0
A5:A4
0000 0000h
0000 316Ch
12652
‡
† Unsigned 32-bit integer
‡ Unsigned 40-bit (long) integer
Example 4
ADD .L1
A1,A3:A2,A5:A4
Before instruction
1 cycle after instruction
A1
0000 325Ah
12890
A1
0000 325Ah
A3:A2
0000 00FFh
FFFF FF12h
–228
§
A3:A2
0000 00FFh
FFFF FF12h
A5:A4
0000 0000h
0000 0000h
0
§
A5:A4
0000 0000h
0000 316Ch
12652
§
§ Signed 40-bit (long) integer
Example 5
ADD .L1
–13,A1,A6
Before instruction
1 cycle after instruction
A1
0000 325Ah
12890
A1
0000 325Ah
A6
XXXX XXXXh
A6
0000 324Dh
12877