diff --git a/llvm/lib/Target/M68k/M68kInstrArithmetic.td b/llvm/lib/Target/M68k/M68kInstrArithmetic.td --- a/llvm/lib/Target/M68k/M68kInstrArithmetic.td +++ b/llvm/lib/Target/M68k/M68kInstrArithmetic.td @@ -90,13 +90,13 @@ // $reg, $ccr <- $reg op $reg class MxBiArOp_RFRR_xEA CMD, MxBead REG> : MxInst<(outs TYPE.ROp:$dst), (ins TYPE.ROp:$src, TYPE.ROp:$opd), - MN#"."#TYPE.Prefix#"\t$opd, $dst", - [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.VT:$opd))], - MxArithEncoding, - !cast("MxOpMode"#TYPE.Size#TYPE.RLet#"EA"), - REG, - !cast("MxEncEA"#TYPE.RLet#"_2"), - MxExtEmpty>>; + MN#"."#TYPE.Prefix#"\t$opd, $dst", + [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.VT:$opd))], + MxArithEncoding, + !cast("MxOpMode"#TYPE.Size#TYPE.RLet#"EA"), + REG, + !cast("MxEncEA"#TYPE.RLet#"_2"), + MxExtEmpty>>; /// This Op is similar to the one above except it uses reversed opmode, some /// commands(e.g. eor) do not support dEA or rEA modes and require EAd for @@ -106,42 +106,42 @@ /// mess. class MxBiArOp_RFRR_EAd CMD> : MxInst<(outs TYPE.ROp:$dst), (ins TYPE.ROp:$src, TYPE.ROp:$opd), - MN#"."#TYPE.Prefix#"\t$opd, $dst", - [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.VT:$opd))], - MxArithEncoding, - !cast("MxOpMode"#TYPE.Size#"EAd"), - MxBeadDReg<2>, MxEncEAd_0, MxExtEmpty>>; + MN#"."#TYPE.Prefix#"\t$opd, $dst", + [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.VT:$opd))], + MxArithEncoding, + !cast("MxOpMode"#TYPE.Size#"EAd"), + MxBeadDReg<2>, MxEncEAd_0, MxExtEmpty>>; // $reg <- $reg op $imm class MxBiArOp_RFRI_xEA CMD> : MxInst<(outs TYPE.ROp:$dst), (ins TYPE.ROp:$src, TYPE.IOp:$opd), - MN#"."#TYPE.Prefix#"\t$opd, $dst", - [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.IPat:$opd))], - MxArithEncoding, - !cast("MxOpMode"#TYPE.Size#TYPE.RLet#"EA"), - MxBeadDReg<0>, MxEncEAi, - !cast("MxExtI"#TYPE.Size#"_2")>>; + MN#"."#TYPE.Prefix#"\t$opd, $dst", + [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.IPat:$opd))], + MxArithEncoding, + !cast("MxOpMode"#TYPE.Size#TYPE.RLet#"EA"), + MxBeadDReg<0>, MxEncEAi, + !cast("MxExtI"#TYPE.Size#"_2")>>; // Again, there are two ways to write an immediate to Dn register either dEA // opmode or using *I encoding, and again some instrucitons also support address // registers some do not. class MxBiArOp_RFRI CMD> : MxInst<(outs TYPE.ROp:$dst), (ins TYPE.ROp:$src, TYPE.IOp:$opd), - MN#"i."#TYPE.Prefix#"\t$opd, $dst", - [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.IPat:$opd))], - MxArithImmEncoding, !cast("MxEncSize"#TYPE.Size), - !cast("MxEncEA"#TYPE.RLet#"_0"), MxExtEmpty, - !cast("MxExtI"#TYPE.Size#"_2")>>; + MN#"i."#TYPE.Prefix#"\t$opd, $dst", + [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, TYPE.IPat:$opd))], + MxArithImmEncoding, !cast("MxEncSize"#TYPE.Size), + !cast("MxEncEA"#TYPE.RLet#"_0"), MxExtEmpty, + !cast("MxExtI"#TYPE.Size#"_2")>>; let mayLoad = 1 in class MxBiArOp_RFRM CMD, MxEncEA EA, MxEncExt EXT> : MxInst<(outs TYPE.ROp:$dst), (ins TYPE.ROp:$src, OPD:$opd), - MN#"."#TYPE.Prefix#"\t$opd, $dst", - [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, (TYPE.Load PAT:$opd)))], - MxArithEncoding, - !cast("MxOpMode"#TYPE.Size#TYPE.RLet#"EA"), - MxBeadDReg<0>, EA, EXT>>; + MN#"."#TYPE.Prefix#"\t$opd, $dst", + [(set TYPE.VT:$dst, CCR, (NODE TYPE.VT:$src, (TYPE.Load PAT:$opd)))], + MxArithEncoding, + !cast("MxOpMode"#TYPE.Size#TYPE.RLet#"EA"), + MxBeadDReg<0>, EA, EXT>>; } // Constraints @@ -153,22 +153,22 @@ MxOperand MEMOpd, ComplexPattern MEMPat, bits<4> CMD, MxEncEA EA, MxEncExt EXT> : MxInst<(outs), (ins MEMOpd:$dst, TYPE.ROp:$opd), - MN#"."#TYPE.Prefix#"\t$opd, $dst", - [], - MxArithEncoding, - !cast("MxOpMode"#TYPE.Size#"EA"#TYPE.RLet), - MxBeadDReg<1>, EA, EXT>>; + MN#"."#TYPE.Prefix#"\t$opd, $dst", + [], + MxArithEncoding, + !cast("MxOpMode"#TYPE.Size#"EA"#TYPE.RLet), + MxBeadDReg<1>, EA, EXT>>; class MxBiArOp_FMI CMD, MxEncEA MEMEA, MxEncExt MEMExt> : MxInst<(outs), (ins MEMOpd:$dst, TYPE.IOp:$opd), - MN#"."#TYPE.Prefix#"\t$opd, $dst", - [], - MxArithImmEncoding, - !cast("MxEncSize"#TYPE.Size), - MEMEA, MEMExt, - !cast("MxExtI"#TYPE.Size#"_1")>>; + MN#"."#TYPE.Prefix#"\t$opd, $dst", + [], + MxArithImmEncoding, + !cast("MxEncSize"#TYPE.Size), + MEMEA, MEMExt, + !cast("MxExtI"#TYPE.Size#"_1")>>; } // mayLoad, mayStore } // Defs = [CCR] @@ -481,8 +481,8 @@ let Constraints = "$src = $dst" in class MxExt : MxInst<(outs TO.ROp:$dst), (ins TO.ROp:$src), - "ext."#TO.Prefix#"\t$src", [], - MxExtEncoding("MxExtOpmode_"#TO.Prefix#FROM.Prefix)>>; + "ext."#TO.Prefix#"\t$src", [], + MxExtEncoding("MxExtOpmode_"#TO.Prefix#FROM.Prefix)>>; def EXT16 : MxExt; def EXT32 : MxExt; @@ -781,13 +781,13 @@ // add imm, (An) def : Pat<(store (!cast(N) (load MxType8.JPat:$dst), MxType8.IPat:$opd), - MxType8.JPat:$dst), + MxType8.JPat:$dst), (ADD8ji MxType8.JOp:$dst, imm:$opd)>; def : Pat<(store (!cast(N) (load MxType16.JPat:$dst), MxType16.IPat:$opd), - MxType16.JPat:$dst), + MxType16.JPat:$dst), (ADD16ji MxType16.JOp:$dst, imm:$opd)>; def : Pat<(store (!cast(N) (load MxType32.JPat:$dst), MxType32.IPat:$opd), - MxType32.JPat:$dst), + MxType32.JPat:$dst), (ADD32ji MxType32.JOp:$dst, imm:$opd)>; } // foreach add, addc