we can't do this directly in lowering, so we need this case
[oota-llvm.git] / lib / Target / IA64 / IA64.td
1 //===-- IA64.td - Target definition file for Intel IA64 -------------------===//
2 // 
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by Duraid Madina and is distributed under the
6 // University of Illinois Open Source License. See LICENSE.TXT for details.
7 // 
8 //===----------------------------------------------------------------------===//
9 //
10 // This is a target description file for the Intel IA64 architecture,
11 // also known variously as ia64, IA-64, IPF, "the Itanium architecture" etc.
12 //
13 //===----------------------------------------------------------------------===//
14
15 // Get the target-independent interfaces which we are implementing...
16 //
17 include "../Target.td"
18
19 //===----------------------------------------------------------------------===//
20 // Register File Description
21 //===----------------------------------------------------------------------===//
22
23 include "IA64RegisterInfo.td"
24
25 //===----------------------------------------------------------------------===//
26 // Instruction Descriptions
27 //===----------------------------------------------------------------------===//
28
29 include "IA64InstrInfo.td"
30
31 def IA64InstrInfo : InstrInfo {
32     let PHIInst = PHI;
33 }
34
35 def IA64 : Target {
36   // The following registers are always saved across calls:
37   let CalleeSavedRegisters = 
38   
39   //'preserved' GRs:
40   
41   [
42     // We never generate references to these regs, so we don't need to declare
43     // that they are saved.  In fact, we could just remove them entirely.
44     //r4, r5, r6, r7,
45   
46   //'special' GRs:
47
48 //  r1, // global data pointer (GP)  - XXX NOT callee saved, we do it ourselves
49 //  r12, // memory stack pointer (SP)- XXX NOT callee saved, we do it ourselves
50 //  rp, // return branch register (rp/b0) - we do this ourselves
51   // **** r13 (thread pointer) we do not touch, ever. it's not here. ****//
52   //r15, // our frame pointer (FP)
53   
54   //'stacked' GRs the RSE takes care of, we don't worry about
55 /* We don't want PEI::calculateCallerSavedRegisters to worry about them,
56   since the RSE takes care of them (and we determinethe appropriate
57   'alloc' instructions and save/restore ar.pfs ourselves, in instruction
58   selection)
59
60 **************************************************************************  
61 *  r32, r33, r34, r35,
62 *  r36, r37, r38, r39, r40, r41, r42, r43, r44, r45, r46, r47,
63 *  r48, r49, r50, r51, r52, r53, r54, r55, r56, r57, r58, r59,
64 *  r60, r61, r62, r63, r64, r65, r66, r67, r68, r69, r70, r71,
65 *  r72, r73, r74, r75, r76, r77, r78, r79, r80, r81, r82, r83,
66 *  r84, r85, r86, r87, r88, r89, r90, r91, r92, r93, r94, r95,
67 *  r96, r97, r98, r99, r100, r101, r102, r103, r104, r105, r106, r107,
68 *  r108, r109, r110, r111, r112, r113, r114, r115, r116, r117, r118, r119,
69 *  r120, r121, r122, r123, r124, r125, r126, r127,      
70 **************************************************************************
71 */
72   //'preserved' FP regs:
73
74   /* We never generate references to these regs, so we don't need to declare
75    * that they are saved.  In fact, we could just remove them entirely.
76    * F2,F3,F4, F5,
77    * F16,F17,F18,F19,F20,F21,F22,F23,
78    * F24,F25,F26,F27,F28,F29,F30,F31,
79    */
80   
81   //'preserved' predicate regs:
82
83   /* We never generate references to these regs, so we don't need to declare
84     that they are saved.  In fact, we could just remove them entirely.
85     p1, p2, p3, p4, p5,
86     p16, p17, p18, p19, p20, p21, p22, p23,
87     p24, p25, p26, p27, p28, p29, p30, p31,
88     p32, p33, p34, p35, p36, p37, p38, p39,
89     p40, p41, p42, p43, p44, p45, p46, p47,
90     p48, p49, p50, p51, p52, p53, p54, p55,
91     p56, p57, p58, p59, p60, p61, p62, p63
92    */
93   ];
94
95   // We don't go anywhere near the LP32 variant of IA64 as 
96   // sometimes seen in (for example) HP-UX
97   let PointerType = i64;
98
99   // Our instruction set
100   let InstructionSet = IA64InstrInfo;
101
102 }
103
104