Motorola CPU32 Reference Manual page 127

Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

EXT
EXTB
Operation:
Assembler
Syntax:
Attributes:
Description:
in a data register to a long word, by replicating the sign bit to the left. If the operation
extends a byte to a word, bit [7] of the designated data register is copied to bits [15:8]
of that data register. If the operation extends a word to a long word, bit [15] of the des-
ignated data register is copied to bits [31:16] of the data register. The EXTB form cop-
ies bit [7] of the designated register to bits [31:8] of the data register.
Condition Codes:
X
N
Z
*
*
X
Not affected.
N
Set if the result is negative. Cleared otherwise.
Z
Set if the result is zero. Cleared otherwise.
V
Always cleared.
C
Always cleared.
Instruction Format:
15
14
13
0
1
0
Instruction Fields:
Opmode field — Specifies the size of the sign-extension operation:
010 — Sign-extend low-order byte of data register to word.
011 — Sign-extend low-order word of data register to long.
111 — Sign-extend low-order byte of data register to long.
Register field — Specifies the data register is to be sign-extended.
CPU32
REFERENCE MANUAL
Sign Extend
Destination Sign-extended → Destination
EXT.W Dnextend byte to word
EXT.L Dnextend word to long word
EXTB.L Dnextend byte to long word
Size = (Word, Long)
Extends a byte in a data register to a word or a long word, or a word
V
C
0
0
12
11
10
9
0
1
0
0
INSTRUCTION SET
8
7
6
5
OPMODE
0
EXT
EXTB
4
3
2
1
0
0
REGISTER
MOTOROLA
0
4-79

Advertisement

Table of Contents
loading

Table of Contents