summaryrefslogtreecommitdiff
path: root/lib/Target/Mips/Mips16InstrInfo.td
diff options
context:
space:
mode:
authorReed Kotler <rkotler@mips.com>2012-10-31 05:21:10 +0000
committerReed Kotler <rkotler@mips.com>2012-10-31 05:21:10 +0000
commit9441125d636dee246acf9cb6c8f264edda92c335 (patch)
tree004c196c6fdd4ed683e045962ae7a82d8cf2776e /lib/Target/Mips/Mips16InstrInfo.td
parentb5bc8d00096e794c52dc82fefb31a07ae5a263be (diff)
downloadllvm-9441125d636dee246acf9cb6c8f264edda92c335.tar.gz
llvm-9441125d636dee246acf9cb6c8f264edda92c335.tar.bz2
llvm-9441125d636dee246acf9cb6c8f264edda92c335.tar.xz
Implement ADJCALLSTACKUP and ADJCALLSTACKDOWN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167107 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/Mips16InstrInfo.td')
-rw-r--r--lib/Target/Mips/Mips16InstrInfo.td25
1 files changed, 23 insertions, 2 deletions
diff --git a/lib/Target/Mips/Mips16InstrInfo.td b/lib/Target/Mips/Mips16InstrInfo.td
index 5f8af05f0c..5defc75ea6 100644
--- a/lib/Target/Mips/Mips16InstrInfo.td
+++ b/lib/Target/Mips/Mips16InstrInfo.td
@@ -686,7 +686,17 @@ def OrRxRxRy16: FRxRxRy16_ins<0b01101, "or", IIAlu>, ArithLogic16Defs<1>;
let ra=1, s=0,s0=1,s1=1 in
def RestoreRaF16:
FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size),
- "restore \t$$ra, $$s0, $$s1, $frame_size", [], IILoad >, MayLoad {
+ "restore\t$$ra, $$s0, $$s1, $frame_size", [], IILoad >, MayLoad {
+ let isCodeGenOnly = 1;
+}
+
+// Use Restore to increment SP since SP is not a Mip 16 register, this
+// is an easy way to do that which does not require a register.
+//
+let ra=0, s=0,s0=0,s1=0 in
+def RestoreIncSpF16:
+ FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size),
+ "restore\t$frame_size", [], IILoad >, MayLoad {
let isCodeGenOnly = 1;
}
@@ -700,7 +710,18 @@ def RestoreRaF16:
let ra=1, s=1,s0=1,s1=1 in
def SaveRaF16:
FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size),
- "save \t$$ra, $$s0, $$s1, $frame_size", [], IIStore >, MayStore {
+ "save\t$$ra, $$s0, $$s1, $frame_size", [], IIStore >, MayStore {
+ let isCodeGenOnly = 1;
+}
+
+//
+// Use Save to decrement the SP by a constant since SP is not
+// a Mips16 register.
+//
+let ra=0, s=0,s0=0,s1=0 in
+def SaveDecSpF16:
+ FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size),
+ "save\t$frame_size", [], IIStore >, MayStore {
let isCodeGenOnly = 1;
}
//