IND_RC_H_S = { GPR reg; INT off; } 4.
IND_RC_W = { GPR reg; INT off; } 4.
IND_RR_W = { GPR reg1; GPR reg2; } 4.
- IND_LABEL_W = { ADDR adr; } 4.
IND_RC_D = { GPR reg; INT off; } 8.
IND_RR_D = { GPR reg1; GPR reg2; } 8.
- IND_LABEL_D = { ADDR adr; } 8.
NOT_R = { GPR reg; } 4.
LOGICAL_ALL = NOT_R + AND_RR + OR_RR + OR_RC + XOR_RR +
XOR_RC.
- IND_ALL_W = IND_RC_W + IND_RR_W + IND_LABEL_W.
+ IND_ALL_W = IND_RC_W + IND_RR_W.
- IND_ALL_D = IND_RC_D + IND_RR_D + IND_LABEL_D.
+ IND_ALL_D = IND_RC_D + IND_RR_D.
OP_ALL_W = SUM_ALL + TRISTATE_ALL + SEX_ALL + LOGICAL_ALL +
IND_ALL_W.
gen
COMMENT("move IND_RR_W->GPR")
lwzx %2, %1.reg1, %1.reg2
-
- from IND_LABEL_W to GPR
- gen
- COMMENT("move IND_LABEL_W->GPR")
- move {LABEL, %1.adr}, RSCRATCH
- lwz %2, {GPRINDIRECT, RSCRATCH, 0}
from IND_RC_W to FSREG
gen
gen
COMMENT("move IND_RR_W->FSREG")
lfsx %2, %1.reg1, %1.reg2
-
- from IND_LABEL_W to FSREG
- gen
- COMMENT("move IND_LABEL_W->FSREG")
- move {LABEL, %1.adr}, RSCRATCH
- lfs %2, {GPRINDIRECT, RSCRATCH, 0}
-
+
/* Write word */
from GPR to IND_RC_W
gen
COMMENT("move GPR->IND_RR_W")
stwx %1, %2.reg1, %2.reg2
-
- from GPR to IND_LABEL_W
- gen
- COMMENT("move GPR->IND_LABEL_D")
- move {LABEL, %2.adr}, RSCRATCH
- stw %1, {GPRINDIRECT, RSCRATCH, 0}
from FSREG to IND_RC_W
gen
COMMENT("move FSREG->IND_RR_W")
stfsx %1, %2.reg1, %2.reg2
- from FSREG to IND_LABEL_W
- gen
- COMMENT("move FSREG->IND_LABEL_D")
- move {LABEL, %2.adr}, RSCRATCH
- stfs %1, {GPRINDIRECT, RSCRATCH, 0}
-
/* Read double */
from IND_RC_D to FPR
COMMENT("move IND_RR_D->FPR")
lfdx %2, %1.reg1, %1.reg2
- from IND_LABEL_D to FPR
- gen
- COMMENT("move IND_LABEL_D->FPR")
- move {LABEL, %1.adr}, RSCRATCH
- lfd %2, {GPRINDIRECT, RSCRATCH, 0}
-
/* Write double */
from FPR to IND_RC_D
gen
COMMENT("move FPR->IND_RR_W")
stfdx %1, %2.reg1, %2.reg2
-
- from FPR to IND_LABEL_D
- gen
- COMMENT("move FPR->IND_LABEL_D")
- move {LABEL, %2.adr}, RSCRATCH
- stfd %1, {GPRINDIRECT, RSCRATCH, 0}
-
+
/* Extract condition code field (actually produces (CC&3)<<2) */
from CR0 to GPR
yields {IND_RC_W, %1.reg, %1.off}
with SUM_RR
yields {IND_RR_W, %1.reg1, %1.reg2}
- with LABEL
- yields {IND_LABEL_W, %1.adr}
pat loi $1==INT64 /* Load double-word indirect */
with GPR
yields {IND_RC_D, %1.reg, %1.off}
with SUM_RR
yields {IND_RR_D, %1.reg1, %1.reg2}
- with LABEL
- yields {IND_LABEL_D, %1.adr}
pat loi /* Load arbitrary size */
leaving
with SUM_RC GPR+FSREG
gen
move %2, {IND_RC_W, %1.reg, %1.off}
- with LABEL GPR+FSREG
- gen
- move %2, {IND_LABEL_W, %1.adr}
pat sti $1==INT64 /* Store double-word indirect */
with GPR FREG
gen
move %2, {IND_RC_W, %1.reg, %1.off}
move %3, {IND_RC_W, %1.reg, %1.off+4}
- with LABEL FREG
- gen
- move %2, {IND_LABEL_D, %1.adr}
-
pat sti /* Store arbitrary size */
leaving