extr
extr — Extract
(
) extr
Format:
qp
r
1
(
) extr.u
qp
A field is extracted from GR
Description:
right-justified in GR
and extends
the
immediate. The extracted field is sign extended in the signed_form or zero
pos
6
extended in the unsigned_form. The sign is taken from the most significant bit of the
extracted field. If the specified field extends beyond the most significant bit of GR
the sign is taken from the most significant bit of GR
any number in the range 1 to 64, and is encoded as
immediate value
The operation of extr r1 = r3, 7, 50 is illustrated in
Figure 2-7.
GR r
3
GR r
1
Operation:
if (PR[qp]) {
check_target_register(r
tmp_len = len
if (pos
tmp_len = 64 - pos
if (unsigned_form)
GR[r
else // signed_form
GR[r
GR[r
].nat = GR[r
1
}
Illegal Operation fault
Interruptions:
3:54
=
,
,
r
pos
len
3
6
6
=
,
,
r
r
pos
len
6
1
3
6
, either zero extended or sign extended, and placed
r
3
. The field begins at the bit position given by the second operand
r
1
bits to the left. The bit position where the field begins is specified by
len
6
can be any value in the range 0 to 63.
pos
6
Extract Example
63
56
:
Sign
:
63
49
);
1
;
6
+ tmp_len u> 64)
6
;
6
] = zero_ext(shift_right_unsigned(GR[r3], pos6), tmp_len);
1
] = sign_ext(shift_right_unsigned(GR[r3], pos6), tmp_len);
1
].nat;
3
signed_form
unsigned_form
. The immediate value
r
3
-1 in the instruction. The
len
6
Figure
2-7.
7
Volume 3: Instruction Reference
I11
I11
,
r
3
can be
len
6
0
0
Need help?
Do you have a question about the ITANIUM ARCHITECTURE - SOFTWARE DEVELOPERS MANUAL VOLUME 1 REV 2.3 and is the answer not in the manual?
Questions and answers