@@ -397,17 +397,17 @@ defm XOR : MxBiArOp_DF_EAd<"eor", MxXor, 0xB, 0xA>;
397
397
let isCompare = 1, Defs = [CCR] in {
398
398
class MxCmp_RR<MxType LHS_TYPE, MxType RHS_TYPE = LHS_TYPE>
399
399
: MxInst<(outs), (ins LHS_TYPE.ROp:$lhs, RHS_TYPE.ROp:$rhs),
400
- "cmp."#RHS_TYPE.Prefix#"\t$lhs , $rhs ",
400
+ "cmp."#RHS_TYPE.Prefix#"\t$rhs , $lhs ",
401
401
[(set CCR, (MxCmp LHS_TYPE.VT:$lhs, RHS_TYPE.VT:$rhs))]> {
402
402
let Inst = (descend 0b1011,
403
403
// REGISTER
404
- (operand "$rhs ", 3),
404
+ (operand "$lhs ", 3),
405
405
// OPMODE
406
406
!cast<MxOpModeEncoding>("MxOpMode"#RHS_TYPE.Size#"_"#RHS_TYPE.RLet#"_EA").Value,
407
407
// MODE without last bit
408
408
0b00,
409
409
// REGISTER prefixed by D/A bit
410
- (operand "$lhs ", 4)
410
+ (operand "$rhs ", 4)
411
411
);
412
412
}
413
413
@@ -467,7 +467,7 @@ class MxCmp_RM<MxType TYPE, MxOperand MEMOpd, ComplexPattern MEMPat,
467
467
MxEncMemOp MEM_ENC>
468
468
: MxInst<(outs), (ins TYPE.ROp:$reg, MEMOpd:$mem),
469
469
"cmp."#TYPE.Prefix#"\t$mem, $reg",
470
- [(set CCR, (MxCmp (load MEMPat:$mem), TYPE.ROp:$reg ))]> {
470
+ [(set CCR, (MxCmp TYPE.ROp:$reg, (load MEMPat:$mem)))]> {
471
471
let Inst = (ascend
472
472
(descend 0b1011,
473
473
// REGISTER
0 commit comments