@@ -58,26 +58,6 @@ class SchedLoadReg<X86FoldableSchedWrite Sched> : Sched<[Sched.Folded,
58
58
// Register reads (implicit or explicit).
59
59
Sched.ReadAfterFold, Sched.ReadAfterFold]>;
60
60
61
- /// ITy - This instruction base class takes the type info for the instruction.
62
- /// Using this, it:
63
- /// 1. Concatenates together the instruction mnemonic with the appropriate
64
- /// suffix letter, a tab, and the arguments.
65
- /// 2. Infers whether the instruction should have a 0x66 prefix byte.
66
- /// 3. Infers whether the instruction should have a 0x40 REX_W prefix.
67
- /// 4. Infers whether the low bit of the opcode should be 0 (for i8 operations)
68
- /// or 1 (for i16,i32,i64 operations).
69
- class ITy<bits<8> opcode, Format f, X86TypeInfo typeinfo, dag outs, dag ins,
70
- string mnemonic, string args, list<dag> pattern>
71
- : I<{opcode{7}, opcode{6}, opcode{5}, opcode{4},
72
- opcode{3}, opcode{2}, opcode{1}, typeinfo.HasOddOpcode },
73
- f, outs, ins,
74
- !strconcat(mnemonic, "{", typeinfo.InstrSuffix, "}\t", args), pattern> {
75
-
76
- // Infer instruction prefixes from type info.
77
- let OpSize = typeinfo.OpSize;
78
- let hasREX_W = typeinfo.HasREX_W;
79
- }
80
-
81
61
// BinOpRR - Binary instructions with inputs "reg, reg".
82
62
class BinOpRR<bits<8> opcode, string mnemonic, X86TypeInfo typeinfo,
83
63
dag outlist, X86FoldableSchedWrite sched, list<dag> pattern>
@@ -539,13 +519,13 @@ def X86sub_flag_nocf : PatFrag<(ops node:$lhs, node:$rhs),
539
519
540
520
let Defs = [EFLAGS] in {
541
521
let Constraints = "$src1 = $dst", SchedRW = [WriteALU] in {
542
- let isConvertibleToThreeAddress = 1, CodeSize = 2 in { // Can xform into LEA.
543
522
// Short forms only valid in 32-bit mode. Selected during MCInst lowering.
544
523
let CodeSize = 1, hasSideEffects = 0 in {
545
524
def INC16r_alt : INCDECR_ALT<0x40, "inc", Xi16>;
546
525
def INC32r_alt : INCDECR_ALT<0x40, "inc", Xi32>;
547
526
} // CodeSize = 1, hasSideEffects = 0
548
527
528
+ let isConvertibleToThreeAddress = 1, CodeSize = 2 in { // Can xform into LEA.
549
529
def INC8r : INCDECR<MRM0r, "inc", Xi8, X86add_flag_nocf>;
550
530
def INC16r : INCDECR<MRM0r, "inc", Xi16, X86add_flag_nocf>;
551
531
def INC32r : INCDECR<MRM0r, "inc", Xi32, X86add_flag_nocf>;
@@ -777,7 +757,7 @@ let Defs = [RAX,RDX,EFLAGS], Uses = [RAX,RDX] in // RDX:RAX/[mem64] = RAX,RDX
777
757
def IDIV64m: MulOpM<0xF7, MRM7m, "idiv", Xi64, WriteIDiv64, []>,
778
758
Requires<[In64BitMode]>;
779
759
}
780
- } // hasSideEffects = 0
760
+ } // hasSideEffects = 1
781
761
782
762
//===----------------------------------------------------------------------===//
783
763
// Two address Instructions.
0 commit comments