diff options
author | Richard Osborne <richard@xmos.com> | 2013-02-17 20:44:48 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2013-02-17 20:44:48 +0000 |
commit | a970dde9060d8994c242bd186bb3636d2caf22d2 (patch) | |
tree | 322aad7df6d5818cd8a993c3fb5a54cefea87442 /lib/Target/XCore | |
parent | cbe6c88b6811e4641629d111f941879982362fe8 (diff) |
[XCore] Add missing u10 / lu10 instructions.
These instructions are not targeted by the compiler but they are
needed for the MC layer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175404 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/XCoreInstrInfo.td | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/Target/XCore/XCoreInstrInfo.td b/lib/Target/XCore/XCoreInstrInfo.td index 12540621dd..38e2fbc1db 100644 --- a/lib/Target/XCore/XCoreInstrInfo.td +++ b/lib/Target/XCore/XCoreInstrInfo.td @@ -661,7 +661,6 @@ let Uses = [SP], Defs = [SP], mayLoad = 1 in defm KRESTSP : FU6_LU6_np<0b0111101111, "krestsp">; // U10 -// TODO ldwcpl, blacp let Defs = [R11], isReMaterializable = 1, neverHasSideEffects = 1 in def LDAPF_u10 : _FU10<0b110110, (outs), (ins i32imm:$a), "ldap r11, $a", []>; @@ -677,6 +676,10 @@ def LDAPF_lu10_ba : _FLU10<0b110110, (outs), (ins i32imm:$a), "ldap r11, $a", let isCall=1, // All calls clobber the link register and the non-callee-saved registers: Defs = [R0, R1, R2, R3, R11, LR], Uses = [SP] in { +def BLACP_u10 : _FU10<0b111000, (outs), (ins i32imm:$a), "bla cp[$a]", []>; + +def BLACP_lu10 : _FLU10<0b111000, (outs), (ins i32imm:$a), "bla cp[$a]", []>; + def BLRF_u10 : _FU10<0b110100, (outs), (ins calltarget:$a), "bl $a", [(XCoreBranchLink immU10:$a)]>; @@ -684,6 +687,14 @@ def BLRF_lu10 : _FLU10<0b110100, (outs), (ins calltarget:$a), "bl $a", [(XCoreBranchLink immU20:$a)]>; } +let Defs = [R11], mayLoad = 1, isReMaterializable = 1, + neverHasSideEffects = 1 in { +def LDWCP_u10 : _FU10<0b111001, (outs), (ins i32imm:$a), "ldw r11, cp[$a]", []>; + +def LDWCP_lu10 : _FLU10<0b111001, (outs), (ins i32imm:$a), "ldw r11, cp[$a]", + []>; +} + // Two operand short // TODO eet, eef, tsetmr def NOT : _F2R<0b100010, (outs GRRegs:$dst), (ins GRRegs:$b), |