diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-11-27 01:05:10 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-11-27 01:05:10 +0000 |
commit | 3da59db637a887474c1b1346c1f3ccf53b6c4663 (patch) | |
tree | b061e2133efdb9ea9bb334c1b15ceea881bb88f8 /lib/AsmParser/llvmAsmParser.cpp.cvs | |
parent | 5fed9b90447a9a95a1f670ccd9c23aea8c937451 (diff) |
For PR950:
The long awaited CAST patch. This introduces 12 new instructions into LLVM
to replace the cast instruction. Corresponding changes throughout LLVM are
provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the
exception of 175.vpr which fails only on a slight floating point output
difference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.cpp.cvs')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.cpp.cvs | 2611 |
1 files changed, 1365 insertions, 1246 deletions
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs index c2742e7dbf..c5774e146b 100644 --- a/lib/AsmParser/llvmAsmParser.cpp.cvs +++ b/lib/AsmParser/llvmAsmParser.cpp.cvs @@ -163,18 +163,29 @@ LOAD = 354, STORE = 355, GETELEMENTPTR = 356, - PHI_TOK = 357, - CAST = 358, - SELECT = 359, - SHL = 360, - LSHR = 361, - ASHR = 362, - VAARG = 363, - EXTRACTELEMENT = 364, - INSERTELEMENT = 365, - SHUFFLEVECTOR = 366, - VAARG_old = 367, - VANEXT_old = 368 + TRUNC = 357, + ZEXT = 358, + SEXT = 359, + FPTRUNC = 360, + FPEXT = 361, + BITCAST = 362, + UITOFP = 363, + SITOFP = 364, + FPTOUI = 365, + FPTOSI = 366, + INTTOPTR = 367, + PTRTOINT = 368, + PHI_TOK = 369, + SELECT = 370, + SHL = 371, + LSHR = 372, + ASHR = 373, + VAARG = 374, + EXTRACTELEMENT = 375, + INSERTELEMENT = 376, + SHUFFLEVECTOR = 377, + VAARG_old = 378, + VANEXT_old = 379 }; #endif /* Tokens. */ @@ -277,24 +288,35 @@ #define LOAD 354 #define STORE 355 #define GETELEMENTPTR 356 -#define PHI_TOK 357 -#define CAST 358 -#define SELECT 359 -#define SHL 360 -#define LSHR 361 -#define ASHR 362 -#define VAARG 363 -#define EXTRACTELEMENT 364 -#define INSERTELEMENT 365 -#define SHUFFLEVECTOR 366 -#define VAARG_old 367 -#define VANEXT_old 368 +#define TRUNC 357 +#define ZEXT 358 +#define SEXT 359 +#define FPTRUNC 360 +#define FPEXT 361 +#define BITCAST 362 +#define UITOFP 363 +#define SITOFP 364 +#define FPTOUI 365 +#define FPTOSI 366 +#define INTTOPTR 367 +#define PTRTOINT 368 +#define PHI_TOK 369 +#define SELECT 370 +#define SHL 371 +#define LSHR 372 +#define ASHR 373 +#define VAARG 374 +#define EXTRACTELEMENT 375 +#define INSERTELEMENT 376 +#define SHUFFLEVECTOR 377 +#define VAARG_old 378 +#define VANEXT_old 379 /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" +#line 14 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -367,8 +389,8 @@ static struct PerModuleInfo { Module *CurrentModule; std::map<const Type *, ValueList> Values; // Module level numbered definitions std::map<const Type *,ValueList> LateResolveValues; - std::vector<PATypeHolder> Types; - std::map<ValID, PATypeHolder> LateResolveTypes; + std::vector<TypeInfo> Types; + std::map<ValID, TypeInfo> LateResolveTypes; /// PlaceHolderInfo - When temporary placeholder objects are created, remember /// how they were referenced and on which line of the input they came from so @@ -501,7 +523,7 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) { case ValID::NumberVal: // Is it a numbered definition? // Module constants occupy the lowest numbered slots... if ((unsigned)D.Num < CurModule.Types.size()) - return CurModule.Types[(unsigned)D.Num]; + return CurModule.Types[(unsigned)D.Num].type->get(); break; case ValID::NameVal: // Is it a named definition? if (const Type *N = CurModule.CurrentModule->getTypeByName(D.Name)) { @@ -531,13 +553,15 @@ static const Type *getTypeVal(const ValID &D, bool DoNotImprovise = false) { } } - std::map<ValID, PATypeHolder>::iterator I =CurModule.LateResolveTypes.find(D); + std::map<ValID, TypeInfo>::iterator I =CurModule.LateResolveTypes.find(D); if (I != CurModule.LateResolveTypes.end()) - return I->second; + return I->second.type->get(); - Type *Typ = OpaqueType::get(); - CurModule.LateResolveTypes.insert(std::make_pair(D, Typ)); - return Typ; + TypeInfo TI; + TI.type = new PATypeHolder(OpaqueType::get()); + TI.signedness = isSignless; + CurModule.LateResolveTypes.insert(std::make_pair(D, TI)); + return TI.type->get(); } static Value *lookupInSymbolTable(const Type *Ty, const std::string &Name) { @@ -841,10 +865,10 @@ static void ResolveTypeTo(char *Name, const Type *ToTy) { if (Name) D = ValID::create(Name); else D = ValID::create((int)CurModule.Types.size()); - std::map<ValID, PATypeHolder>::iterator I = + std::map<ValID, TypeInfo>::iterator I = CurModule.LateResolveTypes.find(D); if (I != CurModule.LateResolveTypes.end()) { - ((DerivedType*)I->second.get())->refineAbstractTypeTo(ToTy); + ((DerivedType*)I->second.type->get())->refineAbstractTypeTo(ToTy); CurModule.LateResolveTypes.erase(I); } } @@ -1106,15 +1130,14 @@ static PATypeHolder HandleUpRefs(const Type *ty) { /// instruction. This function handles converting div -> [usf]div appropriately. /// @brief Convert obsolete BinaryOps opcodes to new values static void -sanitizeOpCode(OpcodeInfo<Instruction::BinaryOps> &OI, const PATypeHolder& PATy) +sanitizeOpcode(OpcodeInfo<Instruction::BinaryOps> &OI, const Type *Ty) { // If its not obsolete, don't do anything if (!OI.obsolete) return; // If its a packed type we want to use the element type - const Type* Ty = PATy; - if (const PackedType* PTy = dyn_cast<PackedType>(Ty)) + if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) Ty = PTy->getElementType(); // Depending on the opcode .. @@ -1140,17 +1163,16 @@ sanitizeOpCode(OpcodeInfo<Instruction::BinaryOps> &OI, const PATypeHolder& PATy) OI.obsolete = false; } -/// This function is similar to the previous overload of sanitizeOpCode but +/// This function is similar to the previous overload of sanitizeOpcode but /// operates on Instruction::OtherOps instead of Instruction::BinaryOps. /// @brief Convert obsolete OtherOps opcodes to new values static void -sanitizeOpCode(OpcodeInfo<Instruction::OtherOps> &OI, const PATypeHolder& PATy) +sanitizeOpcode(OpcodeInfo<Instruction::OtherOps> &OI, const Type *Ty) { // If its not obsolete, don't do anything if (!OI.obsolete) return; - const Type* Ty = PATy; // type conversion switch (OI.opcode) { default: GenerateError("Invalid obsolete opcode (check Lexer.l)"); @@ -1340,23 +1362,22 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) { #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 1040 "/proj/llvm/llvm-3/lib/AsmParser/llvmAsmParser.y" +#line 1040 "/proj/llvm/llvm-1/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; - std::pair<llvm::PATypeHolder*, char*> *ArgVal; + std::pair<TypeInfo, char*> *ArgVal; llvm::BasicBlock *BasicBlockVal; llvm::TerminatorInst *TermInstVal; llvm::Instruction *InstVal; llvm::Constant *ConstVal; - const llvm::Type *PrimType; - llvm::PATypeHolder *TypeVal; + TypeInfo TypeVal; llvm::Value *ValueVal; - std::vector<std::pair<llvm::PATypeHolder*,char*> > *ArgList; + std::vector<std::pair<TypeInfo,char*> >*ArgList; std::vector<llvm::Value*> *ValueList; - std::list<llvm::PATypeHolder> *TypeList; + std::list<TypeInfo> *TypeList; // Represent the RHS of PHI node std::list<std::pair<llvm::Value*, llvm::BasicBlock*> > *PHIList; @@ -1377,11 +1398,12 @@ typedef union YYSTYPE { BinaryOpInfo BinaryOpVal; TermOpInfo TermOpVal; MemOpInfo MemOpVal; + CastOpInfo CastOpVal; OtherOpInfo OtherOpVal; llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 1385 "llvmAsmParser.tab.c" +#line 1407 "llvmAsmParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -1393,7 +1415,7 @@ typedef union YYSTYPE { /* Line 219 of yacc.c. */ -#line 1397 "llvmAsmParser.tab.c" +#line 1419 "llvmAsmParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -1544,20 +1566,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1310 +#define YYLAST 1410 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 128 +#define YYNTOKENS 139 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 75 +#define YYNNTS 76 /* YYNRULES -- Number of rules. */ -#define YYNRULES 257 +#define YYNRULES 269 /* YYNRULES -- Number of states. */ -#define YYNSTATES 522 +#define YYNSTATES 534 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 368 +#define YYMAXUTOK 379 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1569,15 +1591,15 @@ static const unsigned char yytranslate[] = 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 117, 118, 126, 2, 115, 2, 2, 2, 2, 2, + 128, 129, 137, 2, 126, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 122, 114, 123, 2, 2, 2, 2, 2, 2, 2, + 133, 125, 134, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 119, 116, 121, 2, 2, 2, 2, 2, 127, + 2, 130, 127, 132, 2, 2, 2, 2, 2, 138, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 120, 2, 2, 124, 2, 125, 2, 2, 2, 2, + 131, 2, 2, 135, 2, 136, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -1601,7 +1623,8 @@ static const unsigned char yytranslate[] = 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, - 105, 106, 107, 108, 109, 110, 111, 112, 113 + 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, + 115, 116, 117, 118, 119, 120, 121, 122, 123, 124 }; #if YYDEBUG @@ -1613,147 +1636,152 @@ static const unsigned short int yyprhs[] = 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, - 80, 81, 83, 85, 87, 89, 91, 93, 95, 96, - 97, 99, 101, 103, 105, 107, 109, 112, 113, 116, - 117, 121, 124, 125, 127, 128, 132, 134, 137, 139, - 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, + 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, + 99, 101, 104, 105, 107, 109, 111, 113, 115, 117, + 119, 120, 121, 123, 125, 127, 129, 131, 133, 136, + 137, 140, 141, 145, 148, 149, 151, 152, 156, 158, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, - 182, 187, 193, 199, 203, 206, 209, 211, 215, 217, - 221, 223, 224, 229, 233, 237, 242, 247, 251, 254, - 257, 260, 263, 266, 269, 272, 275, 278, 281, 288, - 294, 303, 310, 317, 324, 331, 338, 347, 356, 360, - 362, 364, 366, 368, 371, 374, 379, 382, 384, 389, - 392, 397, 398, 406, 407, 415, 416, 424, 425, 433, - 437, 442, 443, 445, 447, 449, 453, 457, 461, 465, - 469, 473, 475, 476, 478, 480, 482, 483, 486, 490, - 492, 494, 498, 500, 501, 510, 512, 514, 518, 520, - 522, 525, 526, 528, 530, 531, 536, 537, 539, 541, - 543, 545, 547, 549, 551, 553, 555, 559, 561, 567, - 569, 571, 573, 575, 578, 581, 584, 588, 591, 592, - 594, 597, 600, 604, 614, 624, 633, 647, 649, 651, - 658, 664, 667, 674, 682, 684, 688, 690, 691, 694, - 696, 702, 708, 714, 717, 722, 727, 734, 739, 744, - 749, 754, 761, 768, 771, 779, 781, 784, 785, 787, - 788, 792, 799, 803, 810, 813, 818, 825 + 181, 183, 185, 187, 189, 191, 193, 195, 197, 199, + 201, 203, 206, 211, 217, 223, 227, 230, 233, 235, + 239, 241, 245, 247, 248, 253, 257, 261, 266, 271, + 275, 278, 281, 284, 287, 290, 293, 296, 299, 302, + 305, 312, 318, 327, 334, 341, 348, 355, 362, 371, + 380, 384, 386, 388, 390, 392, 395, 398, 403, 406, + 408, 413, 416, 421, 422, 430, 431, 439, 440, 448, + 449, 457, 461, 466, 467, 469, 471, 473, 477, 481, + 485, 489, 493, 497, 499, 500, 502, 504, 506, 507, + 510, 514, 516, 518, 522, 524, 525, 534, 536, 538, + 542, 544, 546, 549, 550, 552, 554, 555, 560, 561, + 563, 565, 567, 569, 571, 573, 575, 577, 579, 583, + 585, 591, 593, 595, 597, 599, 602, 605, 608, 612, + 615, 616, 618, 621, 624, 628, 638, 648, 657, 671, + 673, 675, 682, 688, 691, 698, 706, 708, 712, 714, + 715, 718, 720, 726, 732, 738, 741, 746, 751, 758, + 763, 768, 773, 778, 785, 792, 795, 803, 805, 808, + 809, 811, 812, 816, 823, 827, 834, 837, 842, 849 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 159, 0, -1, 5, -1, 6, -1, 3, -1, 4, + 171, 0, -1, 5, -1, 6, -1, 3, -1, 4, -1, 78, -1, 79, -1, 80, -1, 81, -1, 82, -1, 83, -1, 84, -1, 85, -1, 86, -1, 87, -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, - -1, 93, -1, 94, -1, 95, -1, 105, -1, 106, - -1, 107, -1, 16, -1, 14, -1, 12, -1, 10, - -1, 17, -1, 15, -1, 13, -1, 11, -1, 135, - -1, 136, -1, 18, -1, 19, -1, 171, 114, -1, - -1, 41, -1, 42, -1, 43, -1, 44, -1, 45, - -1, 46, -1, 47, -1, -1, -1, 65, -1, 66, - -1, 67, -1, 68, -1, 69, -1, 70, -1, 64, - 4, -1, -1, 57, 4, -1, -1, 115, 57, 4, - -1, 34, 24, -1, -1, 144, -1, -1, 115, 147, - 146, -1, 144, -1, 57, 4, -1, 150, -1, 8, - -1, 152, -1, 8, -1, 152, -1, 9, -1, 10, - -1, 11, -1, 12, -1, 13, -1, 14, -1, 15, - -1, 16, -1, 17, -1, 18, -1, 19, -1, 20, - -1, 21, -1, 48, -1, 151, -1, 186, -1, 116, - 4, -1, 149, 117, 154, 118, -1, 119, 4, 120, - 152, 121, -1, 122, 4, 120, 152, 123, -1, 124, - 153, 125, -1, 124, 125, -1, 152, 126, -1, 152, - -1, 153, 115, 152, -1, 153, -1, 153, 115, 37, - -1, 37, -1, -1, 150, 119, 157, 121, -1, 150, - 119, 121, -1, 150, 127, 24, -1, 150, 122, 157, - 123, -1, 150, 124, 157, 125, -1, 150, 124, 125, - -1, 150, 38, -1, 150, 39, -1, 150, 186, -1, - 150, 156, -1, 150, 26, -1, 135, 130, -1, 136, - 4, -1, 9, 27, -1, 9, 28, -1, 138, 7, - -1, 103, 117, 155, 36, 150, 118, -1, 101, 117, - 155, 200, 118, -1, 104, 117, 155, 115, 155, 115, - 155, 118, -1, 131, 117, 155, 115, 155, 118, -1, - 132, 117, 155, 115, 155, 118, -1, 133, 117, 155, - 115, 155, 118, -1, 134, 117, 155, 115, 155, 118, - -1, 109, 117, 155, 115, 155, 118, -1, 110, 117, - 155, 115, 155, 115, 155, 118, -1, 111, 117, 155, - 115, 155, 115, 155, 118, -1, 157, 115, 155, -1, - 155, -1, 32, -1, 33, -1, 160, -1, 160, 180, - -1, 160, 182, -1, 160, 62, 61, 166, -1, 160, - 25, -1, 161, -1, 161, 139, 20, 148, -1, 161, - 182, -1, 161, 62, 61, 166, -1, -1, 161, 139, - 140, 158, 155, 162, 146, -1, -1, 161, 139, 50, - 158, 150, 163, 146, -1, -1, 161, 139, 45, 158, - 150, 164, 146, -1, -1, 161, 139, 47, 158, 150, - 165, 146, -1, 161, 51, 168, -1, 161, 58, 114, - 169, -1, -1, 24, -1, 56, -1, 55, -1, 53, - 114, 167, -1, 54, 114, 4, -1, 52, 114, 24, - -1, 71, 114, 24, -1, 119, 170, 121, -1, 170, - 115, 24, -1, 24, -1, -1, 22, -1, 24, -1, - 171, -1, -1, 150, 172, -1, 174, 115, 173, -1, - 173, -1, 174, -1, 174, 115, 37, -1, 37, -1, - -1, 141, 148, 171, 117, 175, 118, 145, 142, -1, - 29, -1, 124, -1, 140, 176, 177, -1, 30, -1, - 125, -1, 189, 179, -1, -1, 45, -1, 47, -1, - -1, 31, 183, 181, 176, -1, -1, 63, -1, 3, - -1, 4, -1, 7, -1, 27, -1, 28, -1, 38, - -1, 39, -1, 26, -1, 122, 157, 123, -1, 156, - -1, 61, 184, 24, 115, 24, -1, 129, -1, 171, - -1, 186, -1, 185, -1, 150, 187, -1, 189, 190, - -1, 178, 190, -1, 191, 139, 192, -1, 191, 194, - -1, -1, 23, -1, 72, 188, -1, 72, 8, -1, - 73, 21, 187, -1, 73, 9, 187, 115, 21, 187, - 115, 21, 187, -1, 74, 137, 187, 115, 21, 187, - 119, 193, 121, -1, 74, 137, 187, 115, 21, 187, - 119, 121, -1, 75, 141, 148, 187, 117, 197, 118, - 36, 21, 187, 76, 21, 187, -1, 76, -1, 77, - -1, 193, 137, 185, 115, 21, 187, -1, 137, 185, - 115, 21, 187, -1, 139, 199, -1, 150, 119, 187, - 115, 187, 121, -1, 195, 115, 119, 187, 115, 187, - 121, -1, 188, -1, 196, 115, 188, -1, 196, -1, - -1, 60, 59, -1, 59, -1, 131, 150, 187, 115, - 187, -1, 132, 150, 187, 115, 187, -1, 133, 150, - 187, 115, 187, -1, 49, 188, -1, 134, 188, 115, - 188, -1, 103, 188, 36, 150, -1, 104, 188, 115, - 188, 115, 188, -1, 108, 188, 115, 150, -1, 112, - 188, 115, 150, -1, 113, 188, 115, 150, -1, 109, - 188, 115, 188, -1, 110, 188, 115, 188, 115, 188, - -1, 111, 188, 115, 188, 115, 188, -1, 102, 195, - -1, 198, 141, 148, 187, 117, 197, 118, -1, 202, - -1, 115, 196, -1, -1, 35, -1, -1, 96, 150, - 143, -1, 96, 150, 115, 15, 187, 143, -1, 97, - 150, 143, -1, 97, 150, 115, 15, 187, 143, -1, - 98, 188, -1, 201, 99, 150, 187, -1, 201, 100, - 188, 115, 150, 187, -1, 101, 150, 187, 200, -1 + -1, 93, -1, 94, -1, 95, -1, 102, -1, 103, + -1, 104, -1, 105, -1, 106, -1, 107, -1, 108, + -1, 109, -1, 110, -1, 111, -1, 112, -1, 113, + -1, 116, -1, 117, -1, 118, -1, 16, -1, 14, + -1, 12, -1, 10, -1, 17, -1, 15, -1, 13, + -1, 11, -1, 147, -1, 148, -1, 18, -1, 19, + -1, 183, 125, -1, -1, 41, -1, 42, -1, 43, + -1, 44, -1, 45, -1, 46, -1, 47, -1, -1, + -1, 65, -1, 66, -1, 67, -1, 68, -1, 69, + -1, 70, -1, 64, 4, -1, -1, 57, 4, -1, + -1, 126, 57, 4, -1, 34, 24, -1, -1, 156, + -1, -1, 126, 159, 158, -1, 156, -1, 57, 4, + -1, 162, -1, 8, -1, 164, -1, 8, -1, 164, + -1, 9, -1, 10, -1, 11, -1, 12, -1, 13, + -1, 14, -1, 15, -1, 16, -1, 17, -1, 18, + -1, 19, -1, 20, -1, 21, -1, 48, -1, 163, + -1, 198, -1, 127, 4, -1, 161, 128, 166, 129, + -1, 130, 4, 131, 164, 132, -1, 133, 4, 131, + 164, 134, -1, 135, 165, 136, -1, 135, 136, -1, + 164, 137, -1, 164, -1, 165, 126, 164, -1, 165, + -1, 165, 126, 37, -1, 37, -1, -1, 162, 130, + 169, 132, -1, 162, 130, 132, -1, 162, 138, 24, + -1, 162, 133, 169, 134, -1, 162, 135, 169, 136, + -1, 162, 135, 136, -1, 162, 38, -1, 162, 39, + -1, 162, 198, -1, 162, 168, -1, 162, 26, -1, + 147, 141, -1, 148, 4, -1, 9, 27, -1, 9, + 28, -1, 150, 7, -1, 145, 128, 167, 36, 162, + 129, -1, 101, 128, 167, 212, 129, -1, 115, 128, + 167, 126, 167, 126, 167, 129, -1, 142, 128, 167, + 126, 167, 129, -1, 143, 128, 167, 126, 167, 129, + -1, 144, 128, 167, 126, 167, 129, -1, 146, 128, + 167, 126, 167, 129, -1, 120, 128, 167, 126, 167, + 129, -1, 121, 128, 167, 126, 167, 126, 167, 129, + -1, 122, 128, 167, 126, 167, 126, 167, 129, -1, + 169, 126, 167, -1, 167, -1, 32, -1, 33, -1, + 172, -1, 172, 192, -1, 172, 194, -1, 172, 62, + 61, 178, -1, 172, 25, -1, 173, -1, 173, 151, + 20, 160, -1, 173, 194, -1, 173, 62, 61, 178, + -1, -1, 173, 151, 152, 170, 167, 174, 158, -1, + -1, 173, 151, 50, 170, 162, 175, 158, -1, -1, + 173, 151, 45, 170, 162, 176, 158, -1, -1, 173, + 151, 47, 170, 162, 177, 158, -1, 173, 51, 180, + -1, 173, 58, 125, 181, -1, -1, 24, -1, 56, + -1, 55, -1, 53, 125, 179, -1, 54, 125, 4, + -1, 52, 125, 24, -1, 71, 125, 24, -1, 130, + 182, 132, -1, 182, 126, 24, -1, 24, -1, -1, + 22, -1, 24, -1, 183, -1, -1, 162, 184, -1, + 186, 126, 185, -1, 185, -1, 186, -1, 186, 126, + 37, -1, 37, -1, -1, 153, 160, 183, 128, 187, + 129, 157, 154, -1, 29, -1, 135, -1, 152, 188, + 189, -1, 30, -1, 136, -1, 201, 191, -1, -1, + 45, -1, 47, -1, -1, 31, 195, 193, 188, -1, + -1, 63, -1, 3, -1, 4, -1, 7, -1, 27, + -1, 28, -1, 38, -1, 39, -1, 26, -1, 133, + 169, 134, -1, 168, -1, 61, 196, 24, 126, 24, + -1, 140, -1, 183, -1, 198, -1, 197, -1, 162, + 199, -1, 201, 202, -1, 190, 202, -1, 203, 151, + 204, -1, 203, 206, -1, -1, 23, -1, 72, 200, + -1, 72, 8, -1, 73, 21, 199, -1, 73, 9, + 199, 126, 21, 199, 126, 21, 199, -1, 74, 149, + 199, 126, 21, 199, 130, 205, 132, -1, 74, 149, + 199, 126, 21, 199, 130, 132, -1, 75, 153, 160, + 199, 128, 209, 129, 36, 21, 199, 76, 21, 199, + -1, 76, -1, 77, -1, 205, 149, 197, 126, 21, + 199, -1, 149, 197, 126, 21, 199, -1, 151, 211, + -1, 162, 130, 199, 126, 199, 132, -1, 207, 126, + 130, 199, 126, 199, 132, -1, 200, -1, 208, 126, + 200, -1, 208, -1, -1, 60, 59, -1, 59, -1, + 142, 162, 199, 126, 199, -1, 143, 162, 199, 126, + 199, -1, 144, 162, 199, 126, 199, -1, 49, 200, + -1, 146, 200, 126, 200, -1, 145, 200, 36, 162, + -1, 115, 200, 126, 200, 126, 200, -1, 119, 200, + 126, 162, -1, 123, 200, 126, 162, -1, 124, 200, + 126, 162, -1, 120, 200, 126, 200, -1, 121, 200, + 126, 200, 126, 200, -1, 122, 200, 126, 200, 126, + 200, -1, 114, 207, -1, 210, 153, 160, 199, 128, + 209, 129, -1, 214, -1, 126, 208, -1, -1, 35, + -1, -1, 96, 162, 155, -1, 96, 162, 126, 15, + 199, 155, -1, 97, 162, 155, -1, 97, 162, 126, + 15, 199, 155, -1, 98, 200, -1, 213, 99, 162, + 199, -1, 213, 100, 200, 126, 162, 199, -1, 101, + 162, 199, 212, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1163, 1163, 1164, 1172, 1173, 1183, 1183, 1183, 1183, - 1183, 1183, 1183, 1183, 1183, 1184, 1184, 1184, 1185, 1185, - 1185, 1185, 1185, 1185, 1187, 1187, 1187, 1191, 1191, 1191, - 1191, 1192, 1192, 1192, 1192, 1193, 1193, 1194, 1194, 1197, - 1201, 1206, 1207, 1208, 1209, 1210, 1211, 1212, 1213, 1215, - 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1231, 1232, 1238, - 1239, 1247, 1255, 1256, 1261, 1262, 1263, 1268, 1282, 1282, - 1283, 1283, 1285, 1295, 1295, 1295, 1295, 1295, 1295, 1295, - 1296, 1296, 1296, 1296, 1296, 1296, 1297, 1301, 1305, 1313, - 1321, 1334, 1339, 1351, 1361, 1365, 1376, 1381, 1387, 1388, - 1392, 1396, 1407, 1433, 1447, 1477, 1503, 1524, 1537, 1547, - 1552, 1613, 1620, 1629, 1635, 1641, 1645, 1649, 1657, 1668, - 1700, 1708, 1735, 1746, 1752, 1763, 1769, 1775, 1784, 1788, - 1796, 1796, 1806, 1814, 1819, 1823, 1827, 1831, 1846, 1868, - 1871, 1874, 1874, 1882, 1882, 1890, 1890, 1898, 1898, 1907, - 1910, 1913, 1917, 1930, 1931, 1933, 1937, 1946, 1950, 1955, - 1957, 1962, 1967, 1976, 1976, 1977, 1977, 1979, 1986, 1992, - 1999, 2003, 2009, 2014, 2019, 2114, 2114, 2116, 2124, 2124, - 2126, 2131, 2132, 2133, 2135, 2135, 2145, 2149, 2154, 2158, - 2162, 2166, 2170, 2174, 2178, 2182, 2186, 2211, 2215, 2229, - 2233, 2239, 2239, 2245, 2250, 2254, 2263, 2274, 2279, 2291, - 2304, 2308, 2312, 2317, 2326, 2345, 2354, 2410, 2414, 2421, - 2432, 2445, 2454, 2463, 2473, 2477, 2484, 2484, 2486, 2490, - 2495, 2517, 2532, 2546, 2559, 2570, 2578, 2586, 2592, 2612, - 2635, 2641, 2647, 2653, 2668, 2727, 2734, 2737, 2742, 2746, - 2753, 2758, 2764, 2769, 2775, 2783, 2795, 2810 + 0, 1168, 1168, 1169, 1177, 1178, 1188, 1188, 1188, 1188, + 1188, 1188, 1188, 1188, 1188, 1189, 1189, 1189, 1190, 1190, + 1190, 1190, 1190, 1190, 1191, 1191, 1191, 1191, 1191, 1191, + 1192, 1192, 1192, 1192, 1192, 1192, 1193, 1193, 1193, 1197, + 1197, 1197, 1197, 1198, 1198, 1198, 1198, 1199, 1199, 1200, + 1200, 1203, 1207, 1212, 1213, 1214, 1215, 1216, 1217, 1218, + 1219, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1237, + 1238, 1244, 1245, 1253, 1261, 1262, 1267, 1268, 1269, 1274, + 1288, 1288, 1292, 1292, 1297, 1308, 1308, 1308, 1308, 1308, + 1308, 1308, 1309, 1309, 1309, 1309, 1309, 1309, 1310, 1315, + 1319, 1328, 1337, 1352, 1359, 1373, 1384, 1389, 1401, 1406, + 1412, 1413, 1419, 1425, 1436, 1462, 1476, 1506, 1532, 1553, + 1566, 1576, 1581, 1642, 1649, 1658, 1664, 1670, 1674, 1678, + 1686, 1712, 1744, 1752, 1779, 1790, 1796, 1807, 1813, 1819, + 1828, 1832, 1840, 1840, 1850, 1858, 1863, 1867, 1871, 1875, + 1890, 1912, 1915, 1918, 1918, 1926, 1926, 1935, 1935, 1944, + 1944, 1954, 1957, 1960, 1964, 1977, 1978, 1980, 1984, 1993, + 1997, 2002, 2004, 2009, 2014, 2023, 2023, 2024, 2024, 2026, + 2033, 2039, 2046, 2050, 2058, 2066, 2071, 2165, 2165, 2167, + 2175, 2175, 2177, 2182, 2183, 2184, 2186, 2186, 2196, 2200, + 2205, 2209, 2213, 2217, 2221, 2225, 2229, 2233, 2237, 2257, + 2261, 2275, 2279, 2285, 2285, 2291, 2296, 2300, 2309, 2320, + 2329, 2341, 2354, 2358, 2362, 2367, 2376, 2395, 2404, 2460, + 2464, 2471, 2482, 2495, 2504, 2513, 2523, 2527, 2534, 2534, + 2536, 2540, 2545, 2567, 2582, 2596, 2609, 2620, 2646, 2654, + 2660, 2680, 2703, 2709, 2715, 2721, 2736, 2796, 2803, 2806, + 2811, 2815, 2822, 2827, 2833, 2838, 2844, 2852, 2864, 2879 }; #endif @@ -1777,22 +1805,24 @@ static const char *const yytname[] = "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", "MUL", "UDIV", "SDIV", "FDIV", "UREM", "SREM", "FREM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", - "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", - "SELECT", "SHL", "LSHR", "ASHR", "VAARG", "EXTRACTELEMENT", - "INSERTELEMENT", "SHUFFLEVECTOR", "VAARG_old", "VANEXT_old", "'='", - "','", "'\\\\'", "'('", "')'", "'['", "'x'", "']'", "'<'", "'>'", "'{'", - "'}'", "'*'", "'c'", "$accept", "INTVAL", "EINT64VAL", "ArithmeticOps", - "LogicalOps", "SetCondOps", "ShiftOps", "SIntType", "UIntType", - "IntType", "FPType", "OptAssign", "OptLinkage", "OptCallingConv", - "OptAlign", "OptCAlign", "SectionString", "OptSection", - "GlobalVarAttributes", "GlobalVarAttribute", "TypesV", "UpRTypesV", - "Types", "PrimType", "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal", - "ConstExpr", "ConstVector", "GlobalType", "Module", "FunctionList", - "ConstPool", "@1", "@2", "@3", "@4", "AsmBlock", "BigOrLittle", - "TargetDefinition", "LibrariesDefinition", "LibList", "Name", "OptName", - "ArgVal", "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", - "FunctionHeader", "END", "Function", "FnDeclareLinkage", "FunctionProto", - "@5", "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef", + "ALLOCA", "FREE", "LOAD", "STORE", "GETELEMENTPTR", "TRUNC", "ZEXT", + "SEXT", "FPTRUNC", "FPEXT", "BITCAST", "UITOFP", "SITOFP", "FPTOUI", + "FPTOSI", "INTTOPTR", "PTRTOINT", "PHI_TOK", "SELECT", "SHL", "LSHR", + "ASHR", "VAARG", "EXTRACTELEMENT", "INSERTELEMENT", "SHUFFLEVECTOR", + "VAARG_old", "VANEXT_old", "'='", "','", "'\\\\'", "'('", "')'", "'['", + "'x'", "']'", "'<'", "'>'", "'{'", "'}'", "'*'", "'c'", "$accept", + "INTVAL", "EINT64VAL", "ArithmeticOps", "LogicalOps", "SetCondOps", + "CastOps", "ShiftOps", "SIntType", "UIntType", "IntType", "FPType", + "OptAssign", "OptLinkage", "OptCallingConv", "OptAlign", "OptCAlign", + "SectionString", "OptSection", "GlobalVarAttributes", + "GlobalVarAttribute", "TypesV", "UpRTypesV", "Types", "PrimType", + "UpRTypes", "TypeListI", "ArgTypeListI", "ConstVal", "ConstExpr", + "ConstVector", "GlobalType", "Module", "FunctionList", "ConstPool", "@1", + "@2", "@3", "@4", "AsmBlock", "BigOrLittle", "TargetDefinition", + "LibrariesDefinition", "LibList", "Name", "OptName", "ArgVal", + "ArgListH", "ArgList", "FunctionHeaderH", "BEGIN", "FunctionHeader", + "END", "Function", "FnDeclareLinkage", "FunctionProto", "@5", + "OptSideEffect", "ConstValueRef", "SymbolicValueRef", "ValueRef", "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList", "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList", "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile", @@ -1816,40 +1846,42 @@ static const unsigned short int yytoknum[] = 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, - 365, 366, 367, 368, 61, 44, 92, 40, 41, 91, - 120, 93, 60, 62, 123, 125, 42, 99 + 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, + 375, 376, 377, 378, 379, 61, 44, 92, 40, 41, + 91, 120, 93, 60, 62, 123, 125, 42, 99 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 128, 129, 129, 130, 130, 131, 131, 131, 131, - 131, 131, 131, 131, 131, 132, 132, 132, 133, 133, - 133, 133, 133, 133, 134, 134, 134, 135, 135, 135, - 135, 136, 136, 136, 136, 137, 137, 138, 138, 139, - 139, 140, 140, 140, 140, 140, 140, 140, 140, 141, - 141, 141, 141, 141, 141, 141, 141, 142, 142, 143, - 143, 144, 145, 145, 146, 146, 147, 147, 148, 148, - 149, 149, 150, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 151, 151, 151, 152, 152, 152, 152, - 152, 152, 152, 152, 152, 152, 153, 153, 154, 154, - 154, 154, 155, 155, 155, 155, 155, 155, 155, 155, - 155, 155, 155, 155, 155, 155, 155, 155, 156, 156, - 156, 156, 156, 156, 156, 156, 156, 156, 157, 157, - 158, 158, 159, 160, 160, 160, 160, 160, 161, 161, - 161, 162, 161, 163, 161, 164, 161, 165, 161, 161, - 161, 161, 166, 167, 167, 168, 168, 168, 168, 169, - 170, 170, 170, 171, 171, 172, 172, 173, 174, 174, - 175, 175, 175, 175, 176, 177, 177, 178, 179, 179, - 180, 181, 181, 181, 183, 182, 184, 184, 185, 185, - 185, 185, 185, 185, 185, 185, 185, 185, 185, 186, - 186, 187, 187, 188, 189, 189, 190, 191, 191, 191, - 192, 192, 192, 192, 192, 192, 192, 192, 192, 193, - 193, 194, 195, 195, 196, 196, 197, 197, 198, 198, - 199, 199, 199, 199, 199, 199, 199, 199, 199, 199, - 199, 199, 199, 199, 199, 199, 200, 200, 201, 201, - 202, 202, 202, 202, 202, 202, 202, 202 + 0, 139, 140, 140, 141, 141, 142, 142, 142, 142, + 142, 142, 142, 142, 142, 143, 143, 143, 144, 144, + 144, 144, 144, 144, 145, 145, 145, 145, 145, 145, + 145, 145, 145, 145, 145, 145, 146, 146, 146, 147, + 147, 147, 147, 148, 148, 148, 148, 149, 149, 150, + 150, 151, 151, 152, 152, 152, 152, 152, 152, 152, + 152, 153, 153, 153, 153, 153, 153, 153, 153, 154, + 154, 155, 155, 156, 157, 157, 158, 158, 159, 159, + 160, 160, 161, 161, 162, 163, 163, 163, 163, 163, + 163, 163, 163, 163, 163, 163, 163, 163, 164, 164, + 164, 164, 164, 164, 164, 164, 164, 164, 165, 165, + 166, 166, 166, 166, 167, 167, 167, 167, 167, 167, + 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, + 168, 168, 168, 168, 168, 168, 168, 168, 168, 168, + 169, 169, 170, 170, 171, 172, 172, 172, 172, 172, + 173, 173, 173, 174, 173, 175, 173, 176, 173, 177, + 173, 173, 173, 173, 178, 179, 179, 180, 180, 180, + 180, 181, 182, 182, 182, 183, 183, 184, 184, 185, + 186, 186, 187, 187, 187, 187, 188, 189, 189, 190, + 191, 191, 192, 193, 193, 193, 195, 194, 196, 196, + 197, 197, 197, 197, 197, 197, 197, 197, 197, 197, + 197, 198, 198, 199, 199, 200, 201, 201, 202, 203, + 203, 203, 204, 204, 204, 204, 204, 204, 204, 204, + 204, 205, 205, 206, 207, 207, 208, 208, 209, 209, + 210, 210, 211, 211, 211, 211, 211, 211, 211, 211, + 211, 211, 211, 211, 211, 211, 211, 211, 212, 212, + 213, 213, 214, 214, 214, 214, 214, 214, 214, 214 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1858,29 +1890,30 @@ static const unsigned char yyr2[] = 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, - 1, 1, 1, 1, 1, 1, 2, 0, 2, 0, - 3, 2, 0, 1, 0, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, - 4, 5, 5, 3, 2, 2, 1, 3, 1, 3, - 1, 0, 4, 3, 3, 4, 4, 3, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 6, 5, - 8, 6, 6, 6, 6, 6, 8, 8, 3, 1, - 1, 1, 1, 2, 2, 4, 2, 1, 4, 2, - 4, 0, 7, 0, 7, 0, 7, 0, 7, 3, - 4, 0, 1, 1, 1, 3, 3, 3, 3, 3, - 3, 1, 0, 1, 1, 1, 0, 2, 3, 1, - 1, 3, 1, 0, 8, 1, 1, 3, 1, 1, - 2, 0, 1, 1, 0, 4, 0, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 3, 1, 5, 1, - 1, 1, 1, 2, 2, 2, 3, 2, 0, 1, - 2, 2, 3, 9, 9, 8, 13, 1, 1, 6, - 5, 2, 6, 7, 1, 3, 1, 0, 2, 1, - 5, 5, 5, 2, 4, 4, 6, 4, 4, 4, - 4, 6, 6, 2, 7, 1, 2, 0, 1, 0, - 3, 6, 3, 6, 2, 4, 6, 4 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 0, 1, 1, 1, 1, 1, 1, 2, 0, + 2, 0, 3, 2, 0, 1, 0, 3, 1, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 2, 4, 5, 5, 3, 2, 2, 1, 3, + 1, 3, 1, 0, 4, 3, 3, 4, 4, 3, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 6, 5, 8, 6, 6, 6, 6, 6, 8, 8, + 3, 1, 1, 1, 1, 2, 2, 4, 2, 1, + 4, 2, 4, 0, 7, 0, 7, 0, 7, 0, + 7, 3, 4, 0, 1, 1, 1, 3, 3, 3, + 3, 3, 3, 1, 0, 1, 1, 1, 0, 2, + 3, 1, 1, 3, 1, 0, 8, 1, 1, 3, + 1, 1, 2, 0, 1, 1, 0, 4, 0, 1, + 1, 1, 1, |