@@ -32,46 +32,67 @@ def SDT_AVRSelectCC
32
32
// AVR Specific Node Definitions
33
33
//===----------------------------------------------------------------------===//
34
34
35
+ // Return from subroutine.
35
36
def AVRretglue : SDNode<"AVRISD::RET_GLUE", SDTNone,
36
37
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
38
+
39
+ // Return from ISR.
37
40
def AVRretiglue : SDNode<"AVRISD::RETI_GLUE", SDTNone,
38
41
[SDNPHasChain, SDNPOptInGlue, SDNPVariadic]>;
39
42
43
+
40
44
def AVRcallseq_start : SDNode<"ISD::CALLSEQ_START", SDT_AVRCallSeqStart,
41
45
[SDNPHasChain, SDNPOutGlue]>;
42
46
def AVRcallseq_end : SDNode<"ISD::CALLSEQ_END", SDT_AVRCallSeqEnd,
43
47
[SDNPHasChain, SDNPOptInGlue, SDNPOutGlue]>;
44
48
49
+ // Represents an abstract call instruction,
50
+ // which includes a bunch of information.
45
51
def AVRcall : SDNode<"AVRISD::CALL", SDT_AVRCall,
46
52
[SDNPHasChain, SDNPOutGlue, SDNPOptInGlue, SDNPVariadic]>;
47
53
54
+ // A wrapper node for TargetConstantPool,
55
+ // TargetExternalSymbol, and TargetGlobalAddress.
48
56
def AVRWrapper : SDNode<"AVRISD::WRAPPER", SDT_AVRWrapper>;
49
57
58
+ // AVR conditional branches. Operand 0 is the chain operand, operand 1
59
+ // is the block to branch if condition is true, operand 2 is the
60
+ // condition code, and operand 3 is the flag operand produced by a CMP
61
+ // or TEST instruction.
50
62
def AVRbrcond
51
63
: SDNode<"AVRISD::BRCOND", SDT_AVRBrcond, [SDNPHasChain, SDNPInGlue]>;
64
+
65
+ // Compare instruction.
52
66
def AVRcmp : SDNode<"AVRISD::CMP", SDT_AVRCmp, [SDNPOutGlue]>;
67
+
68
+ // Compare with carry instruction.
53
69
def AVRcmpc : SDNode<"AVRISD::CMPC", SDT_AVRCmp, [SDNPInGlue, SDNPOutGlue]>;
70
+
71
+ // Test for zero or minus instruction.
54
72
def AVRtst : SDNode<"AVRISD::TST", SDT_AVRTst, [SDNPOutGlue]>;
73
+
74
+ // Operand 0 and operand 1 are selection variable, operand 2
75
+ // is condition code and operand 3 is flag operand.
55
76
def AVRselectcc : SDNode<"AVRISD::SELECT_CC", SDT_AVRSelectCC, [SDNPInGlue]>;
56
77
57
78
// Shift nodes.
58
- def AVRlsl : SDNode<"AVRISD::LSL", SDTIntUnaryOp>;
59
- def AVRlsr : SDNode<"AVRISD::LSR", SDTIntUnaryOp>;
60
- def AVRrol : SDNode<"AVRISD::ROL", SDTIntUnaryOp>;
61
- def AVRror : SDNode<"AVRISD::ROR", SDTIntUnaryOp>;
62
- def AVRasr : SDNode<"AVRISD::ASR", SDTIntUnaryOp>;
63
- def AVRlslhi : SDNode<"AVRISD::LSLHI", SDTIntUnaryOp>;
64
- def AVRlsrlo : SDNode<"AVRISD::LSRLO", SDTIntUnaryOp>;
65
- def AVRasrlo : SDNode<"AVRISD::ASRLO", SDTIntUnaryOp>;
66
- def AVRlslbn : SDNode<"AVRISD::LSLBN", SDTIntBinOp>;
67
- def AVRlsrbn : SDNode<"AVRISD::LSRBN", SDTIntBinOp>;
68
- def AVRasrbn : SDNode<"AVRISD::ASRBN", SDTIntBinOp>;
69
- def AVRlslwn : SDNode<"AVRISD::LSLWN", SDTIntBinOp>;
70
- def AVRlsrwn : SDNode<"AVRISD::LSRWN", SDTIntBinOp>;
71
- def AVRasrwn : SDNode<"AVRISD::ASRWN", SDTIntBinOp>;
72
- def AVRlslw : SDNode<"AVRISD::LSLW", SDTIntShiftPairOp>;
73
- def AVRlsrw : SDNode<"AVRISD::LSRW", SDTIntShiftPairOp>;
74
- def AVRasrw : SDNode<"AVRISD::ASRW", SDTIntShiftPairOp>;
79
+ def AVRlsl : SDNode<"AVRISD::LSL", SDTIntUnaryOp>; // Logical shift left.
80
+ def AVRlsr : SDNode<"AVRISD::LSR", SDTIntUnaryOp>; // Logical shift right.
81
+ def AVRrol : SDNode<"AVRISD::ROL", SDTIntUnaryOp>; // Bit rotate left.
82
+ def AVRror : SDNode<"AVRISD::ROR", SDTIntUnaryOp>; // Bit rotate right.
83
+ def AVRasr : SDNode<"AVRISD::ASR", SDTIntUnaryOp>; // Arithmetic shift right.
84
+ def AVRlslhi : SDNode<"AVRISD::LSLHI", SDTIntUnaryOp>; // Higher 8-bit of word logical shift left.
85
+ def AVRlsrlo : SDNode<"AVRISD::LSRLO", SDTIntUnaryOp>; // Lower 8-bit of word logical shift right.
86
+ def AVRasrlo : SDNode<"AVRISD::ASRLO", SDTIntUnaryOp>; // Lower 8-bit of word arithmetic shift right.
87
+ def AVRlslbn : SDNode<"AVRISD::LSLBN", SDTIntBinOp>; // Byte logical shift left N bits.
88
+ def AVRlsrbn : SDNode<"AVRISD::LSRBN", SDTIntBinOp>; // Byte logical shift right N bits.
89
+ def AVRasrbn : SDNode<"AVRISD::ASRBN", SDTIntBinOp>; // Byte arithmetic shift right N bits.
90
+ def AVRlslwn : SDNode<"AVRISD::LSLWN", SDTIntBinOp>; // Higher 8-bit of word logical shift left.
91
+ def AVRlsrwn : SDNode<"AVRISD::LSRWN", SDTIntBinOp>; // Word logical shift right N bits.
92
+ def AVRasrwn : SDNode<"AVRISD::ASRWN", SDTIntBinOp>; // Word arithmetic shift right N bits.
93
+ def AVRlslw : SDNode<"AVRISD::LSLW", SDTIntShiftPairOp>; // Wide logical shift left.
94
+ def AVRlsrw : SDNode<"AVRISD::LSRW", SDTIntShiftPairOp>; // Wide logical shift right.
95
+ def AVRasrw : SDNode<"AVRISD::ASRW", SDTIntShiftPairOp>; // Wide arithmetic shift right.
75
96
76
97
// Pseudo shift nodes for non-constant shift amounts.
77
98
def AVRlslLoop : SDNode<"AVRISD::LSLLOOP", SDTIntShiftOp>;
0 commit comments