FetchPreDecodePLA: PLAOps.PLA;
GenFetchPreDecodePLA:
PUBLIC
PROC = {
op0: PO.BoolExpr ← BE[m:[op: 4], d:[op: 4]];
op1: PO.BoolExpr ← BE[m:[op: 2], d:[op: 2]];
op2: PO.BoolExpr ← BE[m:[op: 1], d:[op: 1]];
oneByter:
PO.BoolExpr ←
PO.Or[
PO.And[ PO.Not[op0], PO.Not[op1], PO.Not[op2] ],
PO.And[ PO.Not[op0], op1 ]
];
twoByter: PO.BoolExpr ← PO.And[ op0, PO.Not[op1] ];
threeByter: PO.BoolExpr ← PO.And[ op0, op1 ];
fiveByter: PO.BoolExpr ← PO.And[ PO.Not[op0], PO.Not[op1], op2 ];
bytesAvail0: PO.BoolExpr ← BE[m:[fetchBytesM1: 16], d:[fetchBytesM1: 16 ]];
bytesAvail1: PO.BoolExpr ← BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 0 ]];
bytesAvail2: PO.BoolExpr ← BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 1 ]];
bytesAvail3: PO.BoolExpr ← BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 2 ]];
bytesAvail4: PO.BoolExpr ← BE[m:[fetchBytesM1: 31], d:[fetchBytesM1: 3 ]];
notReady:
PO.BoolExpr ←
PO.Or[
bytesAvail0,
PO.And[ bytesAvail1, PO.Or[ twoByter, threeByter, fiveByter ] ],
PO.And[ bytesAvail2, PO.Or[ threeByter, fiveByter ] ],
PO.And[ PO.Or[ bytesAvail3, bytesAvail4 ], fiveByter ]
];
Set[out:[notInstReady: TRUE], s: notReady];
Set[out:[instFault0:TRUE], s:PO.And[notReady, BE[m:[iPFaulting:TRUE], d:[iPFaulting:TRUE]]]];
Set[out:[opLength: 5, opLengthb: 5], s: fiveByter ];
Set[out:[opLength: 1, opLengthb: 1], s: oneByter ];
Set[out:[opLength: 2, opLengthb: 2], s: twoByter ];
Set[out:[opLength: 3, opLengthb: 3], s: threeByter ];
Now select the offset to be used in the jump target address adder.
Set[out:[jumpOffset: alpha],
s: BE[m:[op: 7], d:[op: 4]]];
CheckInstRange[0, dJB, 7, 4];
Set[out:[jumpOffset: beta],
s: BE[m:[op: 7], d:[op: 7]]];
FOR inst: DragOpsCross.Inst
IN [dRJEB..dRJLEBJ]
DO
CheckInstRange[1, inst, 7, 7];
ENDLOOP;
FOR inst: DragOpsCross.Inst
IN [dJEBB..dJNEBBJ]
DO
CheckInstRange[1, inst, 7, 7];
ENDLOOP;
Set[out:[jumpOffset: alphaBeta],
s: BE[m:[op: 7], d:[op: 6]]];
CheckInstRange[2, dJDB, 7, 6];
CheckInstRange[2, dLFC, 7, 6];
Set[out:[jumpOffset: xa],
s: BE[m:[op: 7], d:[op: 2]]];
CheckInstRange[3, dJS, 7, 2];