diff options
author | Scott Michel <scottm@aero.org> | 2007-12-17 22:32:34 +0000 |
---|---|---|
committer | Scott Michel <scottm@aero.org> | 2007-12-17 22:32:34 +0000 |
commit | 504c369213efb263136bb048e79af3516511c040 (patch) | |
tree | 32f86dfeb76547a17e9e196cfffd8c48c50de3f3 /lib/Target/CellSPU/SPURegisterInfo.td | |
parent | 8f559ef8201df637706247d7e0394ade63f9a026 (diff) | |
download | external_llvm-504c369213efb263136bb048e79af3516511c040.zip external_llvm-504c369213efb263136bb048e79af3516511c040.tar.gz external_llvm-504c369213efb263136bb048e79af3516511c040.tar.bz2 |
- Restore some i8 functionality in CellSPU
- New test case: nand.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45130 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/CellSPU/SPURegisterInfo.td')
-rw-r--r-- | lib/Target/CellSPU/SPURegisterInfo.td | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/Target/CellSPU/SPURegisterInfo.td b/lib/Target/CellSPU/SPURegisterInfo.td index 5379225..de64439 100644 --- a/lib/Target/CellSPU/SPURegisterInfo.td +++ b/lib/Target/CellSPU/SPURegisterInfo.td @@ -359,6 +359,40 @@ def R16C : RegisterClass<"SPU", [i16], 128, }]; } +// The SPU's registers as 8-bit wide (byte) "preferred slot": +def R8C : RegisterClass<"SPU", [i8], 128, + [ + /* volatile register */ + R3, R4, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15, R16, + R17, R18, R19, R20, R21, R22, R23, R24, R25, R26, R27, R28, R29, R30, R31, + R32, R33, R34, R35, R36, R37, R38, R39, R40, R41, R42, R43, R44, R45, R46, + R47, R48, R49, R50, R51, R52, R53, R54, R55, R56, R57, R58, R59, R60, R61, + R62, R63, R64, R65, R66, R67, R68, R69, R70, R71, R72, R73, R74, R75, R76, + R77, R78, R79, + /* non-volatile register: take hint from PPC and allocate in reverse order */ + R127, R126, R125, R124, R123, R122, R121, R120, R119, R118, R117, R116, R115, + R114, R113, R112, R111, R110, R109, R108, R107, R106, R105, R104, R103, R102, + R101, R100, R99, R98, R97, R96, R95, R94, R93, R92, R91, R90, R89, R88, R87, + R86, R85, R84, R83, R82, R81, R80, + /* environment ptr, SP, LR */ + R2, R1, R0 ]> +{ + let MethodProtos = [{ + iterator allocation_order_begin(const MachineFunction &MF) const; + iterator allocation_order_end(const MachineFunction &MF) const; + }]; + let MethodBodies = [{ + R8CClass::iterator + R8CClass::allocation_order_begin(const MachineFunction &MF) const { + return begin(); + } + R8CClass::iterator + R8CClass::allocation_order_end(const MachineFunction &MF) const { + return end()-3; // don't allocate R2, R1, or R0 (envp, sp, lr) + } + }]; +} + // The SPU's registers as vector registers: def VECREG : RegisterClass<"SPU", [v16i8,v8i16,v4i32,v4f32,v2i64,v2f64], 128, [ |