35.3.5.2. INTEGER CONVERTIONS ON ALPHA
Alpha Operate Format
+-------------------------+------------------------+
| 31..26 Opcode | 31..26 Opcode |
| 25..21 Ra | 25..21 Ra |
| 20..16 Rb | 20..13 LIT |
| 15..13 SBZ | 12 1 |
| 12 0 | 11..5 Function |
| 11..5 Function | 4..0 Rc |
| 4..0 Rc | |
+-------------------------+------------------------+
Extract Byte
EXTxx Ra.rq,Rb.rq,Rc.wq !Operate Format
EXTxx Ra.rq,#b.ib,Rc.wq !Operate Format
EXTBL Extract Byte Low
EXTWL Extract Word Low
EXTLL Extract Longword Low
EXTQL Extract Quadword Low
EXTWH Extract Word High
EXTLH Extract Longword High
EXTQH Extract Quadword High
case
extbl: byte_mask <- 0000 0001 b
extwX: byte_mask <- 0000 0011 b
extlX: byte_mask <- 0000 1111 b
extqX: byte_mask <- 1111 1111 b
endcase
case
extXl:
byte_loc <- Rbv<2:0> * 8
temp <- RIGHT_SHIFT(Rav,byte_loc<5:0>)
Rc <- BYTE_ZAP(temp,NOT(byte_mask))
extXh:
byte_loc <- 64 - Rbv<2:0> * 8
temp <- LEFT_SHIFT(Rav,byte_loc<5:0>)
Rc <- BYTE_ZAP(temp,NOT(byte_mask))
endcase
EXTBL 12.06
EXTWL 12.16
EXTLL 12.26
EXTQL 12.36
EXTWH 12.5A
EXTLH 12.6A
EXTQH 12.7A
// ----------------------------------------------------------
Byte Insert
INSxx Ra.rq,Rb.rq,Rc.wq !Operate Format
INSxx Ra.rq,#b.ib,Rc.wq !Operate Format
INSBL Insert Byte Low
INSWL Insert Word Low
INSLL Insert Longword Low
INSQL Insert Quadword Low
INSWH Insert Word High
INSLH Insert Longword High
INSQH Insert Quadword High
case
insbl: byte_mask <- 0000 0000 0000 0001 b
inswX: byte_mask <- 0000 0000 0000 0011 b
inslX: byte_mask <- 0000 0000 0000 1111 b
insqX: byte_mask <- 0000 0000 1111 1111 b
endcase
case
insXl:
byte_loc <- Rbv<2:0> * 8
temp <- LEFT_SHIFT(Rav,byte_loc<5:0>)
Rc <- BYTE_ZAP(temp,NOT(byte_mask<7:0>))
insXh:
byte_loc <- 64 - Rbv<2:0> * 8
temp <- RIGHT_SHIFT(Rav,byte_loc<5:0>)
Rc <- BYTE_ZAP(temp,NOT(byte_mask<15:8>))
endcase
INSBL 12.0B
INSWL 12.1B
INSLL 12.2B
INSQL 12.3B
INSWH 12.57
INSLH 12.67
INSQH 12.77
// ----------------------------------------------------------
Zero Bytes
ZAPx Ra.rq,Rb.rq,Rc.wq !Operate Format
ZAPx Ra.rq,#b.ib,Rc.wq !Operate Format
ZAP Zero Bytes
ZAPNOT Zero Bytes Not
case
ZAP:
Rc <- BYTE_ZAP(Rav,Rbv<7:0>)
ZAPNOT:
Rc <- BYTE_ZAP(Rav,NOT Rbv<7:0>)
endscase
ZAP 12.30
ZAPNOT 12.31
// ----------------------------------------------------------
Byte Mask
MSKx Ra.rq,Rb.rq,Rc.wq !Operate Format
MSKx Ra.rq,#b.ib,Rc.wq !Operate Format
MSKBL Mask Byte Low
MSKWL Mask Word Low
MSKLL Mask Longword Low
MSKQL Mask Quadword Low
MSKWH Mask Word High
MSKLH Mask Longword High
MSKQH Mask Quadword High
case
mskbl: byte_mask <- 0000 0000 0000 0001 b
mskwX: byte_mask <- 0000 0000 0000 0011 b
msklX: byte_mask <- 0000 0000 0000 1111 b
mskqX: byte_mask <- 0000 0000 1111 1111 b
endcase
case
mskXl:
Rc <- BYTE_ZAP(Rav,byte_mask<7:0>)
mskXh:
Rc <- BYTE_ZAP(Rav,byte_mask<15:8>)
endcase
MSKBL 12.02
MSKWL 12.12
MSKLL 12.22
MSKQL 12.32
MSKWH 12.51
MSKLH 12.62
MSKQH 12.72
// ----------------------------------------------------------
Sign Extend
SEXTx Rb.rq,Rc.wq !Operate Format
SEXTx #b.ib,Rc.wq !Operate Format
case
SEXTB: Rc <- SEXT(Rbv<7:0>)
SEXTW: Rc <- SEXT(Rbv<15:0>)
endcase
SEXTB 1C.00
SEXTW 1C.01
(Ra must be R31)
// ----------------------------------------------------------------------
Index Prev Next