Implement RETURNADDR and FRAMEADDR lowering in SPARC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123310 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/Sparc/SparcInstrInfo.td b/lib/Target/Sparc/SparcInstrInfo.td
index 44b7e43..7da86a1 100644
--- a/lib/Target/Sparc/SparcInstrInfo.td
+++ b/lib/Target/Sparc/SparcInstrInfo.td
@@ -127,6 +127,9 @@
def retflag : SDNode<"SPISD::RET_FLAG", SDTNone,
[SDNPHasChain, SDNPOptInGlue]>;
+def flush : SDNode<"SPISD::FLUSH", SDTNone,
+ [SDNPHasChain]>;
+
def getPCX : Operand<i32> {
let PrintMethod = "printGetPCX";
}
@@ -218,6 +221,12 @@
[(callseq_end timm:$amt1, timm:$amt2)]>;
}
+let hasSideEffects = 1, mayStore = 1 in
+ let rs2 = 0 in
+ def FLUSH : F3_1<0b10, 0b101011, (outs), (ins),
+ "flushw",
+ [(flush)]>;
+
// FpMOVD/FpNEGD/FpABSD - These are lowered to single-precision ops by the
// fpmover pass.
let Predicates = [HasNoV9] in { // Only emit these in V8 mode.