Remove tabs.
[oota-llvm.git] / utils / llvm.grm
index 9f7588ae2821bbdb7a536a5e9de0082d1c65ceb2..2ca849d679763adcd09251d2b260dd61772e074c 100644 (file)
@@ -53,7 +53,8 @@ FPVAL               ::= ESAPINTVAL ^ "." ^ EUAPINTVAL | "0x" ^ HexDigitSeq ;
 The rest of this file is derived directly from llvmAsmParser.y.
 *)
 
-ArithmeticOps ::= add | sub | mul | udiv | sdiv | fdiv | urem | srem | frem ;
+ArithmeticOps ::= add | fadd | sub | fsub | mul | fmul |
+                  udiv | sdiv | fdiv | urem | srem | frem ;
 LogicalOps    ::= shl | lshr | ashr | and | or | xor;
 CastOps       ::= trunc | zext | sext | fptrunc | fpext | bitcast |
                   uitofp | sitofp | fptoui | fptosi | inttoptr | ptrtoint ;
@@ -69,7 +70,7 @@ FPType  ::= float | double | "ppc_fp128" | fp128 | "x86_fp80";
 LocalName ::= LOCALVAR | STRINGCONSTANT | PCTSTRINGCONSTANT ;
 OptLocalName ::= LocalName | _ ;
 
-OptAddrSpace ::= - addrspace "(" ^ EUINT64VAL ^ ")" | _ ;
+OptAddrSpace ::= - addrspace "(" ^ EUINT64VAL ^ ")" | _ ;
 
 OptLocalAssign ::= LocalName "=" | _ ;
 
@@ -82,7 +83,9 @@ GlobalAssign ::= GlobalName "=" ;
 GVInternalLinkage
   ::= + internal
  | weak
+ | "weak_odr"
  | linkonce
+ | "linkonce_odr"
  | appending
  | dllexport
  | common
@@ -111,11 +114,13 @@ FunctionDefineLinkage
   ::= + _
  | internal
  | linkonce
+ | "linkonce_odr"
  | weak
+ | "weak_odr"
  | dllexport
  ;
 
-AliasLinkage ::= + _ | weak | internal ;
+AliasLinkage ::= + _ | weak | "weak_odr" | internal ;
 
 OptCallingConv ::= + _ |
                  ccc |
@@ -123,16 +128,14 @@ OptCallingConv ::= + _ |
                  coldcc |
                  "x86_stdcallcc" |
                  "x86_fastcallcc" |
-                 "x86_ssecallcc" |
                  cc EUINT64VAL ;
 
 ParamAttr ::= zeroext
- | zext
  | signext
- | sext
  | inreg
  | sret
  | noalias
+ | nocapture
  | byval
  | nest
  | align EUINT64VAL
@@ -140,29 +143,32 @@ ParamAttr ::= zeroext
 
 OptParamAttrs ::= + _ | OptParamAttrs ParamAttr ;
 
+RetAttr       ::= inreg
+              | zeroext
+              | signext
+              | noalias
+              ;
+
+OptRetAttrs  ::= _
+             | OptRetAttrs RetAttr
+             ;
+
 FuncAttr      ::= noreturn
  | nounwind
+ | inreg
  | zeroext
  | signext
  | readnone
  | readonly
+ | noinline
+ | alwaysinline
+ | optsize
+ | ssp
+ | sspreq
  ;
 
 OptFuncAttrs  ::= + _ | OptFuncAttrs FuncAttr ;
 
-FuncNoteList  ::= FuncNote
-              | FuncNoteList ^ "," FuncNote
-              ;
-
-FuncNote      ::= inline ^ "=" ^ never
-              | inline ^ "=" ^ always
-              | "opt_size"
-              ;
-
-OptFuncNotes  ::= _
-              | notes ^ "(" ^ FuncNoteList ^ ")"
-              ;
-
 OptGC         ::= + _ | gc STRINGCONSTANT ;
 
 OptAlign      ::= + _ | align EUINT64VAL ;
@@ -217,13 +223,13 @@ ConstVal::= Types "[" ^ ConstVector ^ "]"
  | Types SymbolicValueRef
  | Types ConstExpr
  | Types zeroinitializer
- | IntType ESINT64VAL
- | IntType ESAPINTVAL
- | IntType EUINT64VAL
- | IntType EUAPINTVAL
- | INTTYPE true
- | INTTYPE false
- | FPType FPVAL ;
+ | Types ESINT64VAL
+ | Types ESAPINTVAL
+ | Types EUINT64VAL
+ | Types EUAPINTVAL
+ | Types true
+ | Types false
+ | Types FPVAL ;
 
 ConstExpr::= CastOps "(" ^ ConstVal to Types ^ ")"
  | getelementptr "(" ^ ConstVal IndexList ^ ")"
@@ -258,13 +264,12 @@ Definition
  | declare FunctionProto
  | - module asm AsmBlock
  | OptLocalAssign type Types
- | OptLocalAssign type void
- | OptGlobalAssign GVVisibilityStyle ThreadLocal GlobalType ConstVal
-   OptAddrSpace GlobalVarAttributes
- | OptGlobalAssign GVInternalLinkage GVVisibilityStyle ThreadLocal GlobalType
-   ConstVal OptAddrSpace GlobalVarAttributes
- | OptGlobalAssign GVExternalLinkage GVVisibilityStyle ThreadLocal GlobalType
-   Types OptAddrSpace GlobalVarAttributes
+ | OptGlobalAssign GVVisibilityStyle ThreadLocal OptAddrSpace GlobalType
+   ConstVal GlobalVarAttributes
+ | OptGlobalAssign GVInternalLinkage GVVisibilityStyle ThreadLocal OptAddrSpace
+   GlobalType ConstVal GlobalVarAttributes
+ | OptGlobalAssign GVExternalLinkage GVVisibilityStyle ThreadLocal OptAddrSpace
+   GlobalType Types GlobalVarAttributes
  | OptGlobalAssign GVVisibilityStyle alias AliasLinkage AliaseeRef
  | target TargetDefinition
  | deplibs "=" LibrariesDefinition
@@ -275,17 +280,18 @@ AsmBlock ::= STRINGCONSTANT ;
 TargetDefinition ::= triple "=" STRINGCONSTANT
  | datalayout "=" STRINGCONSTANT ;
 
-LibrariesDefinition ::= "[" LibList "]";
+LibrariesDefinition ::= "[" ( LibList | _ ) "]";
 
-LibList ::= LibList ^ "," STRINGCONSTANT | STRINGCONSTANT | _ ;
+LibList ::= LibList ^ "," STRINGCONSTANT | STRINGCONSTANT ;
 
 ArgListH ::= ArgListH ^ "," Types OptParamAttrs OptLocalName
  | Types OptParamAttrs OptLocalName ;
 
 ArgList ::= ArgListH | ArgListH ^ "," "..." | "..." | _ ;
 
-FunctionHeaderH ::= OptCallingConv ResultTypes GlobalName "(" ^ ArgList ^ ")"
-                  OptFuncAttrs OptSection OptAlign OptGC OptFuncNotes ;
+FunctionHeaderH ::= OptCallingConv OptRetAttrs ResultTypes
+                  GlobalName ^ "(" ^ ArgList ^ ")"
+                  OptFuncAttrs OptSection OptAlign OptGC ;
 
 BEGIN ::= ( begin | "{" ) ^ "\n";