@@ -21,6 +21,7 @@ def SDT_AVRCallSeqStart : SDCallSeqStart<[SDTCisVT<0, i16>]>;
21
21
def SDT_AVRCallSeqEnd : SDCallSeqEnd<[SDTCisVT<0, i16>, SDTCisVT<1, i16>]>;
22
22
def SDT_AVRCall : SDTypeProfile<0, -1, [SDTCisVT<0, iPTR>]>;
23
23
def SDT_AVRWrapper : SDTypeProfile<1, 1, [SDTCisSameAs<0, 1>, SDTCisPtrTy<0>]>;
24
+ def SDT_AVRProgMemWrapper : SDTypeProfile<1, 1, [SDTCisSameAs<0, 1>, SDTCisPtrTy<0>]>;
24
25
def SDT_AVRBrcond : SDTypeProfile<0, 2,
25
26
[SDTCisVT<0, OtherVT>, SDTCisVT<1, i8>]>;
26
27
def SDT_AVRCmp : SDTypeProfile<0, 2, [SDTCisSameAs<0, 1>]>;
@@ -46,6 +47,7 @@ def AVRcall : SDNode<"AVRISD::CALL", SDT_AVRCall,
46
47
[SDNPHasChain, SDNPOutGlue, SDNPOptInGlue, SDNPVariadic]>;
47
48
48
49
def AVRWrapper : SDNode<"AVRISD::WRAPPER", SDT_AVRWrapper>;
50
+ def AVRProgMemWrapper : SDNode<"AVRISD::PROGMEM_WRAPPER", SDT_AVRProgMemWrapper>;
49
51
50
52
def AVRbrcond : SDNode<"AVRISD::BRCOND", SDT_AVRBrcond,
51
53
[SDNPHasChain, SDNPInGlue]>;
@@ -2033,9 +2035,9 @@ def Asr16 : ShiftPseudo<
2033
2035
// Non-Instruction Patterns
2034
2036
//===----------------------------------------------------------------------===//
2035
2037
2036
- def : Pat<(i8 (load (add i16:$offset, (AVRWrapper tglobaladdr:$base)))),
2038
+ def : Pat<(i8 (load (add i16:$offset, (AVRProgMemWrapper tglobaladdr:$base)))),
2037
2039
(LPMRdZ (SUBIWRdK i16:$offset, tglobaladdr:$base))>;
2038
- def : Pat<(i16 (load (add i16:$offset, (AVRWrapper tglobaladdr:$base)))),
2040
+ def : Pat<(i16 (load (add i16:$offset, (AVRProgMemWrapper tglobaladdr:$base)))),
2039
2041
(LPMWRdZ (SUBIWRdK i16:$offset, tglobaladdr:$base))>;
2040
2042
2041
2043
//:TODO: look in x86InstrCompiler.td for odd encoding trick related to
0 commit comments