Machine Instruction Implementations
OQBformInst: TYPE = PROC [rest: DragOpsCross.Word];
drDFC: PUBLIC OQBformInst = {OQBcommon[dDFC, rest];};
drLIQB: PUBLIC OQBformInst = {OQBcommon[dLIQB, rest];};
drJQB: PUBLIC OQBformInst = {OQBcommon[dJQB, rest];};
OIformInst: TYPE = PROC [];
drOR: PUBLIC OIformInst = {OIcommon[dOR]};
drAND: PUBLIC OIformInst = {OIcommon[dAND]};
drRX: PUBLIC OIformInst = {OIcommon[dRX]};
drBC: PUBLIC OIformInst = {OIcommon[dBC]};
drADD: PUBLIC OIformInst = {OIcommon[dADD]};
drSUB: PUBLIC OIformInst = {OIcommon[dSUB]};
drLADD: PUBLIC OIformInst = {OIcommon[dLADD]};
drLSUB: PUBLIC OIformInst = {OIcommon[dLSUB]};
drDUP: PUBLIC OIformInst = {OIcommon[dDUP]};
drDIS: PUBLIC OIformInst = {OIcommon[dDIS]};
drEXDIS: PUBLIC OIformInst = {OIcommon[dEXDIS]};
drSFC: PUBLIC OIformInst = {OIcommon[dSFC]};
drSFCI: PUBLIC OIformInst = {OIcommon[dSFCI]};
drRETN: PUBLIC OIformInst = {OIcommon[dRETN]};
drKFC: PUBLIC OIformInst = {OIcommon[dKFC]};
drJ1: PUBLIC OIformInst = {OIcommon[dJ1]};
drJS: PUBLIC OIformInst = {OIcommon[dJS]};
drLC0: PUBLIC OIformInst = {OIcommon[dLC0]};
drLC1: PUBLIC OIformInst = {OIcommon[dLC1]};
drLC2: PUBLIC OIformInst = {OIcommon[dLC2]};
drLC3: PUBLIC OIformInst = {OIcommon[dLC3]};
drLC4: PUBLIC OIformInst = {OIcommon[dLC4]};
drLC5: PUBLIC OIformInst = {OIcommon[dLC5]};
drLC6: PUBLIC OIformInst = {OIcommon[dLC6]};
drLC7: PUBLIC OIformInst = {OIcommon[dLC7]};
drJ5: PUBLIC OIformInst = {OIcommon[dJ5]};
drJ2: PUBLIC OIformInst = {OIcommon[dJ2]};
drJ3: PUBLIC OIformInst = {OIcommon[dJ3]};
LRformInst: TYPE = PROC [reg: RegSpec];
drLRn:
PUBLIC LRformInst = {
IF reg.kind # reg THEN ERROR IllegalReg;
LRcommon[dLR0, reg];
};
drSRn:
PUBLIC LRformInst = {
IF reg.kind # reg THEN ERROR IllegalReg;
LRcommon[dSR0, reg];
};
QRformInst: TYPE = PROC [left: ShortRegQR, right: RegSpec];
drQOR: PUBLIC QRformInst = {QRcommon[dQOR, left, right]};
drQAND: PUBLIC QRformInst = {QRcommon[dQAND, left, right]};
drQRX: PUBLIC QRformInst = {QRcommon[dQRX, left, right]};
drQBC: PUBLIC QRformInst = {QRcommon[dQBC, left, right]};
drQADD: PUBLIC QRformInst = {QRcommon[dQADD, left, right]};
drQSUB: PUBLIC QRformInst = {QRcommon[dQSUB, left, right]};
drQLADD: PUBLIC QRformInst = {QRcommon[dQLADD, left, right]};
drQLSUB: PUBLIC QRformInst = {QRcommon[dQLSUB, left, right]};
OBformInst: TYPE = PROC [lit: Lit8 ← 0];
drALS: PUBLIC OBformInst = {OBcommon[dALS, lit]};
drAL: PUBLIC OBformInst = {OBcommon[dAL, lit]};
drASL: PUBLIC OBformInst = {OBcommon[dASL, lit]};
drAS: PUBLIC OBformInst = {OBcommon[dAS, lit]};
drCST: PUBLIC OBformInst = {OBcommon[dCST, lit]};
drRET: PUBLIC OBformInst = {OBcommon[dRET, lit]};
drRETK: PUBLIC OBformInst = {OBcommon[dRETK, lit]};
drLIP: PUBLIC OBformInst = {OBcommon[dLIP, lit]};
drSIP: PUBLIC OBformInst = {OBcommon[dSIP, lit]};
drLIB: PUBLIC OBformInst = {OBcommon[dLIB, lit]};
drADDB: PUBLIC OBformInst = {OBcommon[dADDB, lit]};
drSUBB: PUBLIC OBformInst = {OBcommon[dSUBB, lit]};
drJB: PUBLIC OBformInst = {OBcommon[dJB, lit]};
drRB: PUBLIC OBformInst = {OBcommon[dRB, lit]};
drWB: PUBLIC OBformInst = {OBcommon[dWB, lit]};
drRSB: PUBLIC OBformInst = {OBcommon[dRSB, lit]};
drWSB: PUBLIC OBformInst = {OBcommon[dWSB, lit]};
drPSB: PUBLIC OBformInst = {OBcommon[dPSB, lit]};
LRBformInst: TYPE = PROC [reg: RegSpec, lit: Lit8 ← 0];
drLRIn:
PUBLIC LRBformInst = {
IF reg.kind # reg THEN ERROR IllegalReg;
LRBcommon[op: dLRI0, reg: reg, lit: lit];
};
drSRIn:
PUBLIC LRBformInst = {
IF reg.kind # reg THEN ERROR IllegalReg;
LRBcommon[op: dSRI0, reg: reg, lit: lit];
};
RRformInst: TYPE = PROC [c: RegSpec ← pushDst, a,b: RegSpec ← popSrc];
drROR: PUBLIC RRformInst = {RRcommon[dROR, c,a,b]};
drRAND: PUBLIC RRformInst = {RRcommon[dRAND, c,a,b]};
drRRX: PUBLIC RRformInst = {RRcommon[dRRX, c,a,b]};
drRBC: PUBLIC RRformInst = {RRcommon[dRBC, c,a,b]};
drRADD: PUBLIC RRformInst = {RRcommon[dRADD, c,a,b]};
drRSUB: PUBLIC RRformInst = {RRcommon[dRSUB, c,a,b]};
drRLADD: PUBLIC RRformInst = {RRcommon[dRLADD, c,a,b]};
drRLSUB: PUBLIC RRformInst = {RRcommon[dRLSUB, c,a,b]};
drRXOR: PUBLIC RRformInst = {RRcommon[dRXOR, c,a,b]};
drRFU: PUBLIC RRformInst = {RRcommon[dRFU, c,a,b]};
drRVADD: PUBLIC RRformInst = {RRcommon[dRVADD, c,a,b]};
drRVSUB: PUBLIC RRformInst = {RRcommon[dRVSUB, c,a,b]};
drRUADD: PUBLIC RRformInst = {RRcommon[dRUADD, c,a,b]};
drRUSUB: PUBLIC RRformInst = {RRcommon[dRUSUB, c,a,b]};
ODBformInst: TYPE = PROC [lit: Lit16 ← 0];
drLGF: PUBLIC ODBformInst = {ODBcommon[dLGF, lit]};
drLFC: PUBLIC ODBformInst = {ODBcommon[dLFC, lit]};
drLIDB: PUBLIC ODBformInst = {ODBcommon[dLIDB, lit]};
drADDDB: PUBLIC ODBformInst = {ODBcommon[dADDDB, lit]};
drSUBDB: PUBLIC ODBformInst = {ODBcommon[dSUBDB, lit]};
drJDB: PUBLIC ODBformInst = {ODBcommon[dJDB, lit]};
drIOS: PUBLIC ODBformInst = {ODBcommon[dIOS, lit]};
drIOL: PUBLIC ODBformInst = {ODBcommon[dIOL, lit]};
drION: PUBLIC ODBformInst = {ODBcommon[dION, lit]};
drSHL: PUBLIC ODBformInst = {ODBcommon[dSHL, lit]};
drSHR: PUBLIC ODBformInst = {ODBcommon[dSHR, lit]};
drSHD: PUBLIC ODBformInst = {ODBcommon[dSHD, lit]};
drFSDB: PUBLIC ODBformInst = {ODBcommon[dFSDB, lit]};
LRRBformInst: TYPE = PROC [reg1,reg2: RegSpec, disp: Lit8 ← 0];
drRAI:
PUBLIC LRRBformInst = {
IF reg1.kind # reg THEN ERROR IllegalReg;
IF reg2.kind # aux THEN ERROR IllegalReg;
LRRBcommon[op: dRAI, reg1: reg1, reg2: reg2, disp: disp];
};
drRRI:
PUBLIC LRRBformInst = {
IF reg1.kind # reg THEN ERROR IllegalReg;
IF reg2.kind # reg THEN ERROR IllegalReg;
LRRBcommon[op: dRRI, reg1: reg1, reg2: reg2, disp: disp];
};
drWAI:
PUBLIC LRRBformInst = {
IF reg1.kind # reg THEN ERROR IllegalReg;
IF reg2.kind # aux THEN ERROR IllegalReg;
LRRBcommon[op: dWAI, reg1: reg1, reg2: reg2, disp: disp];
};
drWRI:
PUBLIC LRRBformInst = {
IF reg1.kind # reg THEN ERROR IllegalReg;
IF reg2.kind # reg THEN ERROR IllegalReg;
LRRBcommon[op: dWRI, reg1: reg1, reg2: reg2, disp: disp];
};
RJBformInst: TYPE = PROC [left: ShortRegSpec, right: RegSpec, dist: Lit8];
drRJEB: PUBLIC RJBformInst = {RJBcommon[dRJEB, left, right, dist]};
drRJEBJ: PUBLIC RJBformInst = {RJBcommon[dRJEBJ, left, right, dist]};
drRJGB: PUBLIC RJBformInst = {RJBcommon[dRJGB, left, right, dist]};
drRJGBJ: PUBLIC RJBformInst = {RJBcommon[dRJGBJ, left, right, dist]};
drRJGEB: PUBLIC RJBformInst = {RJBcommon[dRJGEB, left, right, dist]};
drRJGEBJ: PUBLIC RJBformInst = {RJBcommon[dRJGEBJ, left, right, dist]};
drRJLB: PUBLIC RJBformInst = {RJBcommon[dRJLB, left, right, dist]};
drRJLBJ: PUBLIC RJBformInst = {RJBcommon[dRJLBJ, left, right, dist]};
drRJLEB: PUBLIC RJBformInst = {RJBcommon[dRJLEB, left, right, dist]};
drRJLEBJ: PUBLIC RJBformInst = {RJBcommon[dRJLEBJ, left, right, dist]};
drRJNEB: PUBLIC RJBformInst = {RJBcommon[dRJNEB, left, right, dist]};
drRJNEBJ: PUBLIC RJBformInst = {RJBcommon[dRJNEBJ, left, right, dist]};
JBBformInst: TYPE = PROC [lit: Lit8 ← 0, dist: Lit8 ← 0];
drJEBB: PUBLIC JBBformInst = {JBBcommon[dJEBB, dist, lit]};
drJEBBJ: PUBLIC JBBformInst = {JBBcommon[dJEBBJ, dist, lit]};
drJNEBB: PUBLIC JBBformInst = {JBBcommon[dJNEBB, dist, lit]};
drJNEBBJ: PUBLIC JBBformInst = {JBBcommon[dJNEBBJ, dist, lit]};
END.