35.3.3.3. INTEGER SHIFT/ROTATE ON HP-PA
Instruction Format:
+---------------------------+
| Len Value |
| 6 34 |
| 5 r2 |
| 5 r1 |
| 3 c |
| 3 xx |
| 5 0 |
| 5 t |
+---------------------------+
Command xx
VSHD,cond r1,r2,t 0 Variable Shift Double
GR[t] <- RSHIFT(cat(GR[r1]{1..31},GR[r2]),CR[11]){32..63}
if (cond) PSW[N] <- 1
VEXTRU,cond r,len,t 4 Variable Extract Unsigned
shct <- 1 + CR[11];
tmp <- lshift(zero_ext_64(GR[r],32),shct){0..31}
GR[t] <- zero_ext(tmp{32-len..31},len);
if (cond) PSW[N] <- 1
VEXTRS,cond r,len,t 5 Variable Extract Signed
shct <- 1 + CR[11];
tmp <- lshift(zero_ext_64(GR[r],32),shct){0..31}
GR[t] <- sign_ext(tmp{32-len..31},len);
if (cond) PSW[N] <- 1
Instruction Format:
+---------------------------+
| Len Value |
| 6 34 |
| 5 r2 |
| 5 r1 |
| 3 c |
| 3 xx |
| 5 p |
| 5 t |
+---------------------------+
Command xx
SHD,cond r1,r2,p,t 2 Shift Double
GR[t] <- RSHIFT(cat(GR[r1]{1..31},GR[r2]),p){32..63}
if (cond) PSW[N] <- 1
EXTRU,cond r,p,len,t 6 Extract Unsigned
tmp <- LSHIFT(zero_ext_64(GR[r],32),(1+p)) {0..31}
GR[t] <- zero_ext(tmp{32-len..31},len);
if (cond) PSW[N] <- 1
EXTRS,cond r,p,len,t 7 Extract Signed
tmp <- LSHIFT(zero_ext_64(GR[r],32),(1+p)) {0..31}
GR[t] <- sign_ext(tmp{32-len..31},len);
if (cond) PSW[N] <- 1
Note:
There are lot of near instructions in HP-PA architecture..
VDEP/DEP/VDEPI/DEPI/ZVDEP/ZDEP/ZVDEPI/ZDEPI
// ----------------------------------------------------------------------
Index Prev Next