Expose base register for DwarfWriter. Refactor code accordingly.
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9.burg.in
index ccb39480cc6795dbca4a6b074f1147b15c077a00..0e7c88cb48c20864ab0d643e04f6bda8606d3a03 100644 (file)
@@ -1,8 +1,17 @@
 %{               // -*- C++ -*-
+/* ===----------------------------------------------------------------------===
+// 
+//                     The LLVM Compiler Infrastructure
+//
+// This file was developed by the LLVM research group and is distributed under
+// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// 
+//===----------------------------------------------------------------------===*/
+
 Xinclude <cstdio>
-Xinclude <llvm/CodeGen/InstrForest.h>
+Xinclude "SparcV9InstrForest.h"
 
-typedef InstrTreeNode* NODEPTR_TYPE;
+typedef llvm::InstrTreeNode* NODEPTR_TYPE;
 Xdefine OP_LABEL(p)    ((p)->opLabel)
 Xdefine LEFT_CHILD(p)  ((p)->LeftChild)
 Xdefine RIGHT_CHILD(p) ((p)->RightChild)
@@ -37,21 +46,21 @@ Xdefine PANIC               printf
 %term Or=OrOPCODE
 %term Xor=XorOPCODE
                 /* Use the next 4 to distinguish bitwise operators from
-                 * logical operators.  This is no longer used for Sparc,
+                 * logical operators.  This is no longer used for SparcV9,
                  * but may be useful for other target machines.
                  * The last one is the bitwise Not(val) == XOR val, 11..1.
                  * Note that it is also a binary operator, not unary.
                  */
-%term BAnd=111
-%term BOr=112
-%term BXor=113
-%term BNot=213
+%term BAnd=112
+%term BOr=113
+%term BXor=114
+%term BNot=214
                 /* The next one is the boolean Not(val) == bool XOR val, true
                  * Note that it is also a binary operator, not unary.
                  */
-%term  Not=313
+%term  Not=314
 
-%term SetCC=114        /* use this to match all SetCC instructions */
+%term SetCC=115        /* use this to match all SetCC instructions */
        /* %term SetEQ=13 */
        /* %term SetNE=14 */
        /* %term SetLE=15 */
@@ -61,34 +70,34 @@ Xdefine PANIC               printf
 %term Malloc=MallocOPCODE
 %term Free=FreeOPCODE
 %term Alloca=AllocaOPCODE
-%term AllocaN=122               /* alloca with arg N */
+%term AllocaN=123               /* alloca with arg N */
 %term Load=LoadOPCODE
 %term Store=StoreOPCODE
 %term GetElemPtr=GetElementPtrOPCODE
-%term GetElemPtrIdx=125         /* getElemPtr with index vector */
+%term GetElemPtrIdx=126         /* getElemPtr with index vector */
 
-%term Phi=PHINodeOPCODE
+%term Phi=PHIOPCODE
 
 %term Cast=CastOPCODE /* cast that will be ignored. others are made explicit */
-%term ToBoolTy=127
-%term ToUByteTy=128
-%term ToSByteTy=129
-%term ToUShortTy=130
-%term ToShortTy=131
-%term ToUIntTy=132
-%term ToIntTy=133
-%term ToULongTy=134
-%term ToLongTy=135
-%term ToFloatTy=136
-%term ToDoubleTy=137
-%term ToArrayTy=138
-%term ToPointerTy=139
+%term ToBoolTy=128
+%term ToUByteTy=129
+%term ToSByteTy=130
+%term ToUShortTy=131
+%term ToShortTy=132
+%term ToUIntTy=133
+%term ToIntTy=134
+%term ToULongTy=135
+%term ToLongTy=136
+%term ToFloatTy=137
+%term ToDoubleTy=138
+%term ToArrayTy=139
+%term ToPointerTy=140
 
 %term Call=CallOPCODE
 %term Shl=ShlOPCODE
 %term Shr=ShrOPCODE
-%term VaArg=VarArgOPCODE
-               /* 32...46 are unused */
+%term VAArg=VAArgOPCODE
+               /* 33...46 are unused */
     /*
      * The foll. values should match the constants in InstrForest.h
      */
@@ -258,7 +267,7 @@ reg:        Call                    =   61 (20);    /* just ignore the operands! */
 reg:   Shl(reg,reg)            =   62 (20);    /* 1 for issue restrictions */
 reg:   Shr(reg,reg)            =   63 (20);    /* 1 for issue restrictions */
 reg:   Phi(reg,reg)            =   64 (0);
-reg:   VaArg(reg)              =   65 (40);    /* load from stack then incr */
+reg:   VAArg(reg)              =   66 (40);    /* get a vararg */
 
        /*
         * Finally, leaf nodes of expression trees.