Changes For Bug 352
[oota-llvm.git] / lib / Target / SparcV9 / SparcV9.burg.in
index 516a1fcb4bd7bca2bb883bf620afe026e6ceb19b..6986828b392240ef68867bf6ac175aa7ec977ce8 100644 (file)
@@ -1,8 +1,17 @@
 %{               // -*- C++ -*-
-Xinclude <stdio.h>
-Xinclude <llvm/CodeGen/InstrForest.h>
-
-typedef InstrTreeNode* NODEPTR_TYPE;
+/* ===----------------------------------------------------------------------===
+// 
+//                     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 "SparcV9InstrForest.h"
+
+typedef llvm::InstrTreeNode* NODEPTR_TYPE;
 Xdefine OP_LABEL(p)    ((p)->opLabel)
 Xdefine LEFT_CHILD(p)  ((p)->LeftChild)
 Xdefine RIGHT_CHILD(p) ((p)->RightChild)
@@ -37,7 +46,7 @@ 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.
@@ -67,7 +76,7 @@ Xdefine PANIC         printf
 %term GetElemPtr=GetElementPtrOPCODE
 %term GetElemPtrIdx=125         /* 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
@@ -87,8 +96,9 @@ Xdefine PANIC         printf
 %term Call=CallOPCODE
 %term Shl=ShlOPCODE
 %term Shr=ShrOPCODE
-%term VaArg=VarArgOPCODE
-               /* 32...46 are unused */
+%term VANext=VANextOPCODE
+%term VAArg=VAArgOPCODE
+               /* 33...46 are unused */
     /*
      * The foll. values should match the constants in InstrForest.h
      */
@@ -138,6 +148,7 @@ reg:        VRegList(reg,reg)       =  10 (0);
         */
 not:     Not(reg,reg)          =   21 (10);
 tobool:          ToBoolTy(reg)         =   22 (10);
+not:      Not(tobool, reg)      =  322 (10); // fold cast-to-bool into not
 toubyte:  ToUByteTy(reg)       =   23 (10);
 tosbyte:  ToSByteTy(reg)       =   24 (10);
 toushort: ToUShortTy(reg)      =   25 (10);
@@ -257,7 +268,8 @@ 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:   VANext(reg)             =   65 (40);    /* incr stack slot pointer */
+reg:   VAArg(reg)              =   66 (40);    /* get a vararg */
 
        /*
         * Finally, leaf nodes of expression trees.