icode in { IMRMOVL, IPOPL}:rA;
icode in { ILEAVE }: REBP;
1 : RNONE; # Don’t write any register
];
执行
int aluA = [
icode in { IRRMOVL, IOPL } : valA;
icode in { IIRMOVL, IRMMOVL, IMRMOVL, IADDL} : valC;
icode in { ICALL, IPUSHL}:-4;
icode in { IRET, IPOPL, ILEAVE}:4;
# Other instructions don’t need ALU
];
int aluB = [
icode in { IRMMOVL, IMRMOVL, IOPL, ICALL,IPUSHL, IRET, IPOPL, ILEAVE, IADDL} : valB;
icode in { IRRMOVL, IIRMOVL}:0;
# Other instructions don’t need ALU
];
bool set_cc = icode in { IOPL, IADDL };
访存
int mem_addr = [
icode in { IRMMOVL, IPUSHL, ICALL, IMRMOVL } : valE;
icode in { IPOPL, IRET } : valA;
icode in { ILEAVE } : valB;
# Other instructions don’t need address
];
bool mem_read = icode in { IMRMOVL, IPOPL, IRET, ILEAVE};