diff options
author | Akira Hatanaka <ahatanaka@mips.com> | 2012-09-21 01:08:16 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@mips.com> | 2012-09-21 01:08:16 +0000 |
commit | 0fdf3b029b35f495d7261fe78737e434edc84758 (patch) | |
tree | 8914d4f87445f1ad2a0fe0c8c30bdd359bcc6616 /lib/Target/Mips/Mips16InstrInfo.td | |
parent | 3ca380d8d772b33f3fdb830c41838826a19da3db (diff) | |
download | llvm-0fdf3b029b35f495d7261fe78737e434edc84758.tar.gz llvm-0fdf3b029b35f495d7261fe78737e434edc84758.tar.bz2 llvm-0fdf3b029b35f495d7261fe78737e434edc84758.tar.xz |
Properly save and restore RA and Mips16 callee save registers S0,S1
Patch by Reed Kotler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164349 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Mips/Mips16InstrInfo.td')
-rw-r--r-- | lib/Target/Mips/Mips16InstrInfo.td | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/Target/Mips/Mips16InstrInfo.td b/lib/Target/Mips/Mips16InstrInfo.td index e48e9e4550..b0ab464a68 100644 --- a/lib/Target/Mips/Mips16InstrInfo.td +++ b/lib/Target/Mips/Mips16InstrInfo.td @@ -254,10 +254,12 @@ def OrRxRxRy16: FRxRxRy16_ins<0b01101, "or", IIAlu>, ArithLogic16Defs<1>; // for direct object emitter, encoding needs to be adjusted for the // frame size // -let ra=1, s=0,s0=0,s1=0 in +let ra=1, s=0,s0=1,s1=1 in def RestoreRaF16: FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size), - "restore \t$$ra, $frame_size", [], IILoad >; + "restore \t$$ra, $$s0, $$s1, $frame_size", [], IILoad > { + let isCodeGenOnly = 1; +} // // Format: SAVE {ra,}{s0/s1/s0-1,}{framesize} (All arguments are optional) @@ -266,11 +268,12 @@ def RestoreRaF16: // To set up a stack frame on entry to a subroutine, // saving return address and static registers, and adjusting stack // -let ra=1, s=1,s0=0,s1=0 in +let ra=1, s=1,s0=1,s1=1 in def SaveRaF16: FI8_SVRS16<0b1, (outs), (ins uimm16:$frame_size), - "save \t$$ra, $frame_size", [], IILoad >; - + "save \t$$ra, $$s0, $$s1, $frame_size", [], IILoad > { + let isCodeGenOnly = 1; +} // // Format: SB ry, offset(rx) MIPS16e // Purpose: Store Byte (Extended) |