diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-10-26 06:15:43 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-10-26 06:15:43 +0000 |
commit | 1628cec4d7fce310d9cde0bcc73997e5a71692c4 (patch) | |
tree | 6dff5a70de8406b153e32fdd2d60c782d6202f63 /lib/AsmParser/llvmAsmParser.cpp.cvs | |
parent | 7043d00750c558a518d08a638638ebe4d241f159 (diff) |
For PR950:
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/llvmAsmParser.cpp.cvs')
-rw-r--r-- | lib/AsmParser/llvmAsmParser.cpp.cvs | 2224 |
1 files changed, 1132 insertions, 1092 deletions
diff --git a/lib/AsmParser/llvmAsmParser.cpp.cvs b/lib/AsmParser/llvmAsmParser.cpp.cvs index 2a873eeba5..6837528d6c 100644 --- a/lib/AsmParser/llvmAsmParser.cpp.cvs +++ b/lib/AsmParser/llvmAsmParser.cpp.cvs @@ -142,34 +142,36 @@ ADD = 333, SUB = 334, MUL = 335, - DIV = 336, - REM = 337, - AND = 338, - OR = 339, - XOR = 340, - SETLE = 341, - SETGE = 342, - SETLT = 343, - SETGT = 344, - SETEQ = 345, - SETNE = 346, - MALLOC = 347, - ALLOCA = 348, - FREE = 349, - LOAD = 350, - STORE = 351, - GETELEMENTPTR = 352, - PHI_TOK = 353, - CAST = 354, - SELECT = 355, - SHL = 356, - SHR = 357, - VAARG = 358, - EXTRACTELEMENT = 359, - INSERTELEMENT = 360, - SHUFFLEVECTOR = 361, - VAARG_old = 362, - VANEXT_old = 363 + UDIV = 336, + SDIV = 337, + FDIV = 338, + REM = 339, + AND = 340, + OR = 341, + XOR = 342, + SETLE = 343, + SETGE = 344, + SETLT = 345, + SETGT = 346, + SETEQ = 347, + SETNE = 348, + MALLOC = 349, + ALLOCA = 350, + FREE = 351, + LOAD = 352, + STORE = 353, + GETELEMENTPTR = 354, + PHI_TOK = 355, + CAST = 356, + SELECT = 357, + SHL = 358, + SHR = 359, + VAARG = 360, + EXTRACTELEMENT = 361, + INSERTELEMENT = 362, + SHUFFLEVECTOR = 363, + VAARG_old = 364, + VANEXT_old = 365 }; #endif /* Tokens. */ @@ -251,40 +253,42 @@ #define ADD 333 #define SUB 334 #define MUL 335 -#define DIV 336 -#define REM 337 -#define AND 338 -#define OR 339 -#define XOR 340 -#define SETLE 341 -#define SETGE 342 -#define SETLT 343 -#define SETGT 344 -#define SETEQ 345 -#define SETNE 346 -#define MALLOC 347 -#define ALLOCA 348 -#define FREE 349 -#define LOAD 350 -#define STORE 351 -#define GETELEMENTPTR 352 -#define PHI_TOK 353 -#define CAST 354 -#define SELECT 355 -#define SHL 356 -#define SHR 357 -#define VAARG 358 -#define EXTRACTELEMENT 359 -#define INSERTELEMENT 360 -#define SHUFFLEVECTOR 361 -#define VAARG_old 362 -#define VANEXT_old 363 +#define UDIV 336 +#define SDIV 337 +#define FDIV 338 +#define REM 339 +#define AND 340 +#define OR 341 +#define XOR 342 +#define SETLE 343 +#define SETGE 344 +#define SETLT 345 +#define SETGT 346 +#define SETEQ 347 +#define SETNE 348 +#define MALLOC 349 +#define ALLOCA 350 +#define FREE 351 +#define LOAD 352 +#define STORE 353 +#define GETELEMENTPTR 354 +#define PHI_TOK 355 +#define CAST 356 +#define SELECT 357 +#define SHL 358 +#define SHR 359 +#define VAARG 360 +#define EXTRACTELEMENT 361 +#define INSERTELEMENT 362 +#define SHUFFLEVECTOR 363 +#define VAARG_old 364 +#define VANEXT_old 365 /* Copy the first part of user declarations. */ -#line 14 "/proj/llvm/llvm_nc/lib/AsmParser/llvmAsmParser.y" +#line 14 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" #include "ParserInternals.h" #include "llvm/CallingConv.h" @@ -1087,6 +1091,43 @@ static PATypeHolder HandleUpRefs(const Type *ty) { return Ty; } +/// This function is used to obtain the correct opcode for an instruction when +/// an obsolete opcode is encountered. The OI parameter (OpcodeInfo) has both +/// an opcode and an "obsolete" flag. These are generated by the lexer and +/// the "obsolete" member will be true when the lexer encounters the token for +/// an obsolete opcode. For example, "div" was replaced by [usf]div but we need +/// to maintain backwards compatibility for asm files that still have the "div" +/// instruction. This function handles converting div -> [usf]div appropriately. +/// @brief Convert obsolete opcodes to new values +static void +sanitizeOpCode(OpcodeInfo<Instruction::BinaryOps> &OI, const PATypeHolder& PATy) +{ + // 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)) + Ty = PTy->getElementType(); + + // Depending on the opcode .. + switch (OI.opcode) { + default: + GenerateError("Invalid Obsolete OpCode"); + break; + case Instruction::UDiv: + // Handle cases where the opcode needs to change + if (Ty->isFloatingPoint()) + OI.opcode = Instruction::FDiv; + else if (Ty->isSigned()) + OI.opcode = Instruction::SDiv; + break; + } + // Its not obsolete any more, we fixed it. + OI.obsolete = false; +} + // common code from the two 'RunVMAsmParser' functions static Module* RunParser(Module * M) { @@ -1264,7 +1305,7 @@ Module *llvm::RunVMAsmParser(const char * AsmString, Module * M) { #endif #if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED) -#line 974 "/proj/llvm/llvm_nc/lib/AsmParser/llvmAsmParser.y" +#line 1011 "/proj/llvm/llvm/lib/AsmParser/llvmAsmParser.y" typedef union YYSTYPE { llvm::Module *ModuleVal; llvm::Function *FunctionVal; @@ -1296,16 +1337,16 @@ typedef union YYSTYPE { bool BoolVal; char *StrVal; // This memory is strdup'd! - llvm::ValID ValIDVal; // strdup'd memory maybe! + llvm::ValID ValIDVal; // strdup'd memory maybe! - llvm::Instruction::BinaryOps BinaryOpVal; - llvm::Instruction::TermOps TermOpVal; - llvm::Instruction::MemoryOps MemOpVal; - llvm::Instruction::OtherOps OtherOpVal; - llvm::Module::Endianness Endianness; + BinaryOpInfo BinaryOpVal; + TermOpInfo TermOpVal; + MemOpInfo MemOpVal; + OtherOpInfo OtherOpVal; + llvm::Module::Endianness Endianness; } YYSTYPE; /* Line 196 of yacc.c. */ -#line 1309 "llvmAsmParser.tab.c" +#line 1350 "llvmAsmParser.tab.c" # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_TRIVIAL 1 @@ -1317,7 +1358,7 @@ typedef union YYSTYPE { /* Line 219 of yacc.c. */ -#line 1321 "llvmAsmParser.tab.c" +#line 1362 "llvmAsmParser.tab.c" #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) # define YYSIZE_T __SIZE_TYPE__ @@ -1468,20 +1509,20 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 4 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 1339 +#define YYLAST 1288 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 123 +#define YYNTOKENS 125 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 75 /* YYNRULES -- Number of rules. */ -#define YYNRULES 252 +#define YYNRULES 254 /* YYNRULES -- Number of states. */ -#define YYNSTATES 517 +#define YYNSTATES 519 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 363 +#define YYMAXUTOK 365 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -1493,15 +1534,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, - 112, 113, 121, 2, 110, 2, 2, 2, 2, 2, + 114, 115, 123, 2, 112, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 117, 109, 118, 2, 2, 2, 2, 2, 2, 2, + 119, 111, 120, 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, 114, 111, 116, 2, 2, 2, 2, 2, 122, + 2, 116, 113, 118, 2, 2, 2, 2, 2, 124, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 115, 2, 2, 119, 2, 120, 2, 2, 2, 2, + 117, 2, 2, 121, 2, 122, 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, @@ -1525,7 +1566,7 @@ 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 + 105, 106, 107, 108, 109, 110 }; #if YYDEBUG @@ -1536,147 +1577,148 @@ static const unsigned short int yyprhs[] = 0, 0, 3, 5, 7, 9, 11, 13, 15, 17, 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, 70, 71, 73, 75, 77, - 79, 81, 83, 85, 86, 87, 89, 91, 93, 95, - 97, 99, 102, 103, 106, 107, 111, 114, 115, 117, - 118, 122, 124, 127, 129, 131, 133, 135, 137, 139, + 59, 61, 63, 65, 67, 69, 71, 74, 75, 77, + 79, 81, 83, 85, 87, 89, 90, 91, 93, 95, + 97, 99, 101, 103, 106, 107, 110, 111, 115, 118, + 119, 121, 122, 126, 128, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, - 161, 163, 165, 167, 169, 172, 177, 183, 189, 193, - 196, 199, 201, 205, 207, 211, 213, 214, 219, 223, - 227, 232, 237, 241, 244, 247, 250, 253, 256, 259, - 262, 265, 268, 271, 278, 284, 293, 300, 307, 314, - 321, 328, 337, 346, 350, 352, 354, 356, 358, 361, - 364, 369, 372, 374, 379, 382, 387, 388, 396, 397, - 405, 406, 414, 415, 423, 427, 432, 433, 435, 437, - 439, 443, 447, 451, 455, 459, 463, 465, 466, 468, - 470, 472, 473, 476, 480, 482, 484, 488, 490, 491, - 500, 502, 504, 508, 510, 512, 515, 516, 518, 520, - 521, 526, 527, 529, 531, 533, 535, 537, 539, 541, - 543, 545, 549, 551, 557, 559, 561, 563, 565, 568, - 571, 574, 578, 581, 582, 584, 587, 590, 594, 604, - 614, 623, 637, 639, 641, 648, 654, 657, 664, 672, - 674, 678, 680, 681, 684, 686, 692, 698, 704, 707, - 712, 717, 724, 729, 734, 739, 744, 751, 758, 761, - 769, 771, 774, 775, 777, 778, 782, 789, 793, 800, - 803, 808, 815 + 161, 163, 165, 167, 169, 171, 173, 176, 181, 187, + 193, 197, 200, 203, 205, 209, 211, 215, 217, 218, + 223, 227, 231, 236, 241, 245, 248, 251, 254, 257, + 260, 263, 266, 269, 272, 275, 282, 288, 297, 304, + 311, 318, 325, 332, 341, 350, 354, 356, 358, 360, + 362, 365, 368, 373, 376, 378, 383, 386, 391, 392, + 400, 401, 409, 410, 418, 419, 427, 431, 436, 437, + 439, 441, 443, 447, 451, 455, 459, 463, 467, 469, + 470, 472, 474, 476, 477, 480, 484, 486, 488, 492, + 494, 495, 504, 506, 508, 512, 514, 516, 519, 520, + 522, 524, 525, 530, 531, 533, 535, 537, 539, 541, + 543, 545, 547, 549, 553, 555, 561, 563, 565, 567, + 569, 572, 575, 578, 582, 585, 586, 588, 591, 594, + 598, 608, 618, 627, 641, 643, 645, 652, 658, 661, + 668, 676, 678, 682, 684, 685, 688, 690, 696, 702, + 708, 711, 716, 721, 728, 733, 738, 743, 748, 755, + 762, 765, 773, 775, 778, 779, 781, 782, 786, 793, + 797, 804, 807, 812, 819 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 154, 0, -1, 5, -1, 6, -1, 3, -1, 4, + 156, 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, 101, - -1, 102, -1, 16, -1, 14, -1, 12, -1, 10, - -1, 17, -1, 15, -1, 13, -1, 11, -1, 130, - -1, 131, -1, 18, -1, 19, -1, 166, 109, -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, 110, 57, 4, - -1, 34, 24, -1, -1, 139, -1, -1, 110, 142, - 141, -1, 139, -1, 57, 4, -1, 145, -1, 8, - -1, 147, -1, 8, -1, 147, -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, 146, -1, 181, -1, 111, - 4, -1, 144, 112, 149, 113, -1, 114, 4, 115, - 147, 116, -1, 117, 4, 115, 147, 118, -1, 119, - 148, 120, -1, 119, 120, -1, 147, 121, -1, 147, - -1, 148, 110, 147, -1, 148, -1, 148, 110, 37, - -1, 37, -1, -1, 145, 114, 152, 116, -1, 145, - 114, 116, -1, 145, 122, 24, -1, 145, 117, 152, - 118, -1, 145, 119, 152, 120, -1, 145, 119, 120, - -1, 145, 38, -1, 145, 39, -1, 145, 181, -1, - 145, 151, -1, 145, 26, -1, 130, 125, -1, 131, - 4, -1, 9, 27, -1, 9, 28, -1, 133, 7, - -1, 99, 112, 150, 36, 145, 113, -1, 97, 112, - 150, 195, 113, -1, 100, 112, 150, 110, 150, 110, - 150, 113, -1, 126, 112, 150, 110, 150, 113, -1, - 127, 112, 150, 110, 150, 113, -1, 128, 112, 150, - 110, 150, 113, -1, 129, 112, 150, 110, 150, 113, - -1, 104, 112, 150, 110, 150, 113, -1, 105, 112, - 150, 110, 150, 110, 150, 113, -1, 106, 112, 150, - 110, 150, 110, 150, 113, -1, 152, 110, 150, -1, - 150, -1, 32, -1, 33, -1, 155, -1, 155, 175, - -1, 155, 177, -1, 155, 62, 61, 161, -1, 155, - 25, -1, 156, -1, 156, 134, 20, 143, -1, 156, - 177, -1, 156, 62, 61, 161, -1, -1, 156, 134, - 135, 153, 150, 157, 141, -1, -1, 156, 134, 50, - 153, 145, 158, 141, -1, -1, 156, 134, 45, 153, - 145, 159, 141, -1, -1, 156, 134, 47, 153, 145, - 160, 141, -1, 156, 51, 163, -1, 156, 58, 109, - 164, -1, -1, 24, -1, 56, -1, 55, -1, 53, - 109, 162, -1, 54, 109, 4, -1, 52, 109, 24, - -1, 71, 109, 24, -1, 114, 165, 116, -1, 165, - 110, 24, -1, 24, -1, -1, 22, -1, 24, -1, - 166, -1, -1, 145, 167, -1, 169, 110, 168, -1, - 168, -1, 169, -1, 169, 110, 37, -1, 37, -1, - -1, 136, 143, 166, 112, 170, 113, 140, 137, -1, - 29, -1, 119, -1, 135, 171, 172, -1, 30, -1, - 120, -1, 184, 174, -1, -1, 45, -1, 47, -1, - -1, 31, 178, 176, 171, -1, -1, 63, -1, 3, - -1, 4, -1, 7, -1, 27, -1, 28, -1, 38, - -1, 39, -1, 26, -1, 117, 152, 118, -1, 151, - -1, 61, 179, 24, 110, 24, -1, 124, -1, 166, - -1, 181, -1, 180, -1, 145, 182, -1, 184, 185, - -1, 173, 185, -1, 186, 134, 187, -1, 186, 189, - -1, -1, 23, -1, 72, 183, -1, 72, 8, -1, - 73, 21, 182, -1, 73, 9, 182, 110, 21, 182, - 110, 21, 182, -1, 74, 132, 182, 110, 21, 182, - 114, 188, 116, -1, 74, 132, 182, 110, 21, 182, - 114, 116, -1, 75, 136, 143, 182, 112, 192, 113, - 36, 21, 182, 76, 21, 182, -1, 76, -1, 77, - -1, 188, 132, 180, 110, 21, 182, -1, 132, 180, - 110, 21, 182, -1, 134, 194, -1, 145, 114, 182, - 110, 182, 116, -1, 190, 110, 114, 182, 110, 182, - 116, -1, 183, -1, 191, 110, 183, -1, 191, -1, - -1, 60, 59, -1, 59, -1, 126, 145, 182, 110, - 182, -1, 127, 145, 182, 110, 182, -1, 128, 145, - 182, 110, 182, -1, 49, 183, -1, 129, 183, 110, - 183, -1, 99, 183, 36, 145, -1, 100, 183, 110, - 183, 110, 183, -1, 103, 183, 110, 145, -1, 107, - 183, 110, 145, -1, 108, 183, 110, 145, -1, 104, - 183, 110, 183, -1, 105, 183, 110, 183, 110, 183, - -1, 106, 183, 110, 183, 110, 183, -1, 98, 190, - -1, 193, 136, 143, 182, 112, 192, 113, -1, 197, - -1, 110, 191, -1, -1, 35, -1, -1, 92, 145, - 138, -1, 92, 145, 110, 15, 182, 138, -1, 93, - 145, 138, -1, 93, 145, 110, 15, 182, 138, -1, - 94, 183, -1, 196, 95, 145, 182, -1, 196, 96, - 183, 110, 145, 182, -1, 97, 145, 182, 195, -1 + -1, 88, -1, 89, -1, 90, -1, 91, -1, 92, + -1, 93, -1, 103, -1, 104, -1, 16, -1, 14, + -1, 12, -1, 10, -1, 17, -1, 15, -1, 13, + -1, 11, -1, 132, -1, 133, -1, 18, -1, 19, + -1, 168, 111, -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, 112, 57, 4, -1, 34, 24, -1, -1, 141, + -1, -1, 112, 144, 143, -1, 141, -1, 57, 4, + -1, 147, -1, 8, -1, 149, -1, 8, -1, 149, + -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, 148, + -1, 183, -1, 113, 4, -1, 146, 114, 151, 115, + -1, 116, 4, 117, 149, 118, -1, 119, 4, 117, + 149, 120, -1, 121, 150, 122, -1, 121, 122, -1, + 149, 123, -1, 149, -1, 150, 112, 149, -1, 150, + -1, 150, 112, 37, -1, 37, -1, -1, 147, 116, + 154, 118, -1, 147, 116, 118, -1, 147, 124, 24, + -1, 147, 119, 154, 120, -1, 147, 121, 154, 122, + -1, 147, 121, 122, -1, 147, 38, -1, 147, 39, + -1, 147, 183, -1, 147, 153, -1, 147, 26, -1, + 132, 127, -1, 133, 4, -1, 9, 27, -1, 9, + 28, -1, 135, 7, -1, 101, 114, 152, 36, 147, + 115, -1, 99, 114, 152, 197, 115, -1, 102, 114, + 152, 112, 152, 112, 152, 115, -1, 128, 114, 152, + 112, 152, 115, -1, 129, 114, 152, 112, 152, 115, + -1, 130, 114, 152, 112, 152, 115, -1, 131, 114, + 152, 112, 152, 115, -1, 106, 114, 152, 112, 152, + 115, -1, 107, 114, 152, 112, 152, 112, 152, 115, + -1, 108, 114, 152, 112, 152, 112, 152, 115, -1, + 154, 112, 152, -1, 152, -1, 32, -1, 33, -1, + 157, -1, 157, 177, -1, 157, 179, -1, 157, 62, + 61, 163, -1, 157, 25, -1, 158, -1, 158, 136, + 20, 145, -1, 158, 179, -1, 158, 62, 61, 163, + -1, -1, 158, 136, 137, 155, 152, 159, 143, -1, + -1, 158, 136, 50, 155, 147, 160, 143, -1, -1, + 158, 136, 45, 155, 147, 161, 143, -1, -1, 158, + 136, 47, 155, 147, 162, 143, -1, 158, 51, 165, + -1, 158, 58, 111, 166, -1, -1, 24, -1, 56, + -1, 55, -1, 53, 111, 164, -1, 54, 111, 4, + -1, 52, 111, 24, -1, 71, 111, 24, -1, 116, + 167, 118, -1, 167, 112, 24, -1, 24, -1, -1, + 22, -1, 24, -1, 168, -1, -1, 147, 169, -1, + 171, 112, 170, -1, 170, -1, 171, -1, 171, 112, + 37, -1, 37, -1, -1, 138, 145, 168, 114, 172, + 115, 142, 139, -1, 29, -1, 121, -1, 137, 173, + 174, -1, 30, -1, 122, -1, 186, 176, -1, -1, + 45, -1, 47, -1, -1, 31, 180, 178, 173, -1, + -1, 63, -1, 3, -1, 4, -1, 7, -1, 27, + -1, 28, -1, 38, -1, 39, -1, 26, -1, 119, + 154, 120, -1, 153, -1, 61, 181, 24, 112, 24, + -1, 126, -1, 168, -1, 183, -1, 182, -1, 147, + 184, -1, 186, 187, -1, 175, 187, -1, 188, 136, + 189, -1, 188, 191, -1, -1, 23, -1, 72, 185, + -1, 72, 8, -1, 73, 21, 184, -1, 73, 9, + 184, 112, 21, 184, 112, 21, 184, -1, 74, 134, + 184, 112, 21, 184, 116, 190, 118, -1, 74, 134, + 184, 112, 21, 184, 116, 118, -1, 75, 138, 145, + 184, 114, 194, 115, 36, 21, 184, 76, 21, 184, + -1, 76, -1, 77, -1, 190, 134, 182, 112, 21, + 184, -1, 134, 182, 112, 21, 184, -1, 136, 196, + -1, 147, 116, 184, 112, 184, 118, -1, 192, 112, + 116, 184, 112, 184, 118, -1, 185, -1, 193, 112, + 185, -1, 193, -1, -1, 60, 59, -1, 59, -1, + 128, 147, 184, 112, 184, -1, 129, 147, 184, 112, + 184, -1, 130, 147, 184, 112, 184, -1, 49, 185, + -1, 131, 185, 112, 185, -1, 101, 185, 36, 147, + -1, 102, 185, 112, 185, 112, 185, -1, 105, 185, + 112, 147, -1, 109, 185, 112, 147, -1, 110, 185, + 112, 147, -1, 106, 185, 112, 185, -1, 107, 185, + 112, 185, 112, 185, -1, 108, 185, 112, 185, 112, + 185, -1, 100, 192, -1, 195, 138, 145, 184, 114, + 194, 115, -1, 199, -1, 112, 193, -1, -1, 35, + -1, -1, 94, 147, 140, -1, 94, 147, 112, 15, + 184, 140, -1, 95, 147, 140, -1, 95, 147, 112, + 15, 184, 140, -1, 96, 185, -1, 198, 97, 147, + 184, -1, 198, 98, 185, 112, 147, 184, -1, 99, + 147, 184, 197, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 1097, 1097, 1098, 1106, 1107, 1117, 1117, 1117, 1117, - 1117, 1118, 1118, 1118, 1119, 1119, 1119, 1119, 1119, 1119, - 1121, 1121, 1125, 1125, 1125, 1125, 1126, 1126, 1126, 1126, - 1127, 1127, 1128, 1128, 1131, 1135, 1140, 1141, 1142, 1143, - 1144, 1145, 1146, 1147, 1149, 1150, 1151, 1152, 1153, 1154, - 1155, 1156, 1165, 1166, 1172, 1173, 1181, 1189, 1190, 1195, - 1196, 1197, 1202, 1216, 1216, 1217, 1217, 1219, 1229, 1229, - 1229, 1229, 1229, 1229, 1229, 1230, 1230, 1230, 1230, 1230, - 1230, 1231, 1235, 1239, 1247, 1255, 1268, 1273, 1285, 1295, - 1299, 1310, 1315, 1321, 1322, 1326, 1330, 1341, 1367, 1381, - 1411, 1437, 1458, 1471, 1481, 1486, 1547, 1554, 1563, 1569, - 1575, 1579, 1583, 1591, 1602, 1634, 1642, 1664, 1675, 1681, - 1689, 1695, 1701, 1710, 1714, 1722, 1722, 1732, 1740, 1745, - 1749, 1753, 1757, 1772, 1794, 1797, 1800, 1800, 1808, 1808, - 1816, 1816, 1824, 1824, 1833, 1836, 1839, 1843, 1856, 1857, - 1859, 1863, 1872, 1876, 1881, 1883, 1888, 1893, 1902, 1902, - 1903, 1903, 1905, 1912, 1918, 1925, 1929, 1935, 1940, 1945, - 2040, 2040, 2042, 2050, 2050, 2052, 2057, 2058, 2059, 2061, - 2061, 2071, 2075, 2080, 2084, 2088, 2092, 2096, 2100, 2104, - 2108, 2112, 2137, 2141, 2155, 2159, 2165, 2165, 2171, 2176, - 2180, 2189, 2200, 2205, 2217, 2230, 2234, 2238, 2243, 2252, - 2271, 2280, 2336, 2340, 2347, 2358, 2371, 2380, 2389, 2399, - 2403, 2410, 2410, 2412, 2416, 2421, 2437, 2452, 2466, 2479, - 2487, 2495, 2503, 2509, 2529, 2552, 2558, 2564, 2570, 2585, - 2644, 2651, 2654, 2659, 2663, 2670, 2675, 2681, 2686, 2692, - 2700, 2712, 2727 + 0, 1134, 1134, 1135, 1143, 1144, 1154, 1154, 1154, 1154, + 1154, 1154, 1154, 1155, 1155, 1155, 1156, 1156, 1156, 1156, + 1156, 1156, 1158, 1158, 1162, 1162, 1162, 1162, 1163, 1163, + 1163, 1163, 1164, 1164, 1165, 1165, 1168, 1172, 1177, 1178, + 1179, 1180, 1181, 1182, 1183, 1184, 1186, 1187, 1188, 1189, + 1190, 1191, 1192, 1193, 1202, 1203, 1209, 1210, 1218, 1226, + 1227, 1232, 1233, 1234, 1239, 1253, 1253, 1254, 1254, 1256, + 1266, 1266, 1266, 1266, 1266, 1266, 1266, 1267, 1267, 1267, + 1267, 1267, 1267, 1268, 1272, 1276, 1284, 1292, 1305, 1310, + 1322, 1332, 1336, 1347, 1352, 1358, 1359, 1363, 1367, 1378, + 1404, 1418, 1448, 1474, 1495, 1508, 1518, 1523, 1584, 1591, + 1600, 1606, 1612, 1616, 1620, 1628, 1639, 1671, 1679, 1706, + 1717, 1723, 1731, 1737, 1743, 1752, 1756, 1764, 1764, 1774, + 1782, 1787, 1791, 1795, 1799, 1814, 1836, 1839, 1842, 1842, + 1850, 1850, 1858, 1858, 1866, 1866, 1875, 1878, 1881, 1885, + 1898, 1899, 1901, 1905, 1914, 1918, 1923, 1925, 1930, 1935, + 1944, 1944, 1945, 1945, 1947, 1954, 1960, 1967, 1971, 1977, + 1982, 1987, 2082, 2082, 2084, 2092, 2092, 2094, 2099, 2100, + 2101, 2103, 2103, 2113, 2117, 2122, 2126, 2130, 2134, 2138, + 2142, 2146, 2150, 2154, 2179, 2183, 2197, 2201, 2207, 2207, + 2213, 2218, 2222, 2231, 2242, 2247, 2259, 2272, 2276, 2280, + 2285, 2294, 2313, 2322, 2378, 2382, 2389, 2400, 2413, 2422, + 2431, 2441, 2445, 2452, 2452, 2454, 2458, 2463, 2482, 2497, + 2511, 2524, 2532, 2540, 2548, 2554, 2574, 2597, 2603, 2609, + 2615, 2630, 2689, 2696, 2699, 2704, 2708, 2715, 2720, 2726, + 2731, 2737, 2745, 2757, 2772 }; #endif @@ -1698,27 +1740,27 @@ static const char *const yytname[] = "SIDEEFFECT", "CC_TOK", "CCC_TOK", "CSRETCC_TOK", "FASTCC_TOK", "COLDCC_TOK", "X86_STDCALLCC_TOK", "X86_FASTCALLCC_TOK", "DATALAYOUT", "RET", "BR", "SWITCH", "INVOKE", "UNWIND", "UNREACHABLE", "ADD", "SUB", - "MUL", "DIV", "REM", "AND", "OR", "XOR", "SETLE", "SETGE", "SETLT", - "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", "LOAD", "STORE", - "GETELEMENTPTR", "PHI_TOK", "CAST", "SELECT", "SHL", "SHR", "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", - "ResolvedVal", "BasicBlockList", "BasicBlock", "InstructionList", - "BBTerminatorInst", "JumpTable", "Inst", "PHIList", "ValueRefList", - "ValueRefListE", "OptTailCall", "InstVal", "IndexList", "OptVolatile", - "MemoryInst", 0 + "MUL", "UDIV", "SDIV", "FDIV", "REM", "AND", "OR", "XOR", "SETLE", + "SETGE", "SETLT", "SETGT", "SETEQ", "SETNE", "MALLOC", "ALLOCA", "FREE", + "LOAD", "STORE", "GETELEMENTPTR", "PHI_TOK", "CAST", "SELECT", "SHL", + "SHR", "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", "ResolvedVal", + "BasicBlockList", "BasicBlock", "InstructionList", "BBTerminatorInst", + "JumpTable", "Inst", "PHIList", "ValueRefList", "ValueRefListE", + "OptTailCall", "InstVal", "IndexList", "OptVolatile", "MemoryInst", 0 }; #endif @@ -1737,41 +1779,41 @@ static const unsigned short int yytoknum[] = 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 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, 61, - 44, 92, 40, 41, 91, 120, 93, 60, 62, 123, - 125, 42, 99 + 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, + 365, 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, 123, 124, 124, 125, 125, 126, 126, 126, 126, - 126, 127, 127, 127, 128, 128, 128, 128, 128, 128, - 129, 129, 130, 130, 130, 130, 131, 131, 131, 131, - 132, 132, 133, 133, 134, 134, 135, 135, 135, 135, - 135, 135, 135, 135, 136, 136, 136, 136, 136, 136, - 136, 136, 137, 137, 138, 138, 139, 140, 140, 141, - 141, 142, 142, 143, 143, 144, 144, 145, 146, 146, - 146, 146, 146, 146, 146, 146, 146, 146, 146, 146, - 146, 147, 147, 147, 147, 147, 147, 147, 147, 147, - 147, 148, 148, 149, 149, 149, 149, 150, 150, 150, - 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, - 150, 150, 150, 151, 151, 151, 151, 151, 151, 151, - 151, 151, 151, 152, 152, 153, 153, 154, 155, 155, - 155, 155, 155, 156, 156, 156, 157, 156, 158, 156, - 159, 156, 160, 156, 156, 156, 156, 161, 162, 162, - 163, 163, 163, 163, 164, 165, 165, 165, 166, 166, - 167, 167, 168, 169, 169, 170, 170, 170, 170, 171, - 172, 172, 173, 174, 174, 175, 176, 176, 176, 178, - 177, 179, 179, 180, 180, 180, 180, 180, 180, 180, - 180, 180, 180, 180, 181, 181, 182, 182, 183, 184, - 184, 185, 186, 186, 186, 187, 187, 187, 187, 187, - 187, 187, 187, 187, 188, 188, 189, 190, 190, 191, - 191, 192, 192, 193, 193, 194, 194, 194, 194, 194, - 194, 194, 194, 194, 194, 194, 194, 194, 194, 194, - 194, 195, 195, 196, 196, 197, 197, 197, 197, 197, - 197, 197, 197 + 0, 125, 126, 126, 127, 127, 128, 128, 128, 128, + 128, 128, 128, 129, 129, 129, 130, 130, 130, 130, + 130, 130, 131, 131, 132, 132, 132, 132, 133, 133, + 133, 133, 134, 134, 135, 135, 136, 136, 137, 137, + 137, 137, 137, 137, 137, 137, 138, 138, 138, 138, + 138, 138, 138, 138, 139, 139, 140, 140, 141, 142, + 142, 143, 143, 144, 144, 145, 145, 146, 146, 147, + 148, 148, 148, 148, 148, 148, 148, 148, 148, 148, + 148, 148, 148, 149, 149, 149, 149, 149, 149, 149, + 149, 149, 149, 150, 150, 151, 151, 151, 151, 152, + 152, 152, 152, 152, 152, 152, 152, 152, 152, 152, + 152, 152, 152, 152, 152, 153, 153, 153, 153, 153, + 153, 153, 153, 153, 153, 154, 154, 155, 155, 156, + 157, 157, 157, 157, 157, 158, 158, 158, 159, 158, + 160, 158, 161, 158, 162, 158, 158, 158, 158, 163, + 164, 164, 165, 165, 165, 165, 166, 167, 167, 167, + 168, 168, 169, 169, 170, 171, 171, 172, 172, 172, + 172, 173, 174, 174, 175, 176, 176, 177, 178, 178, + 178, 180, 179, 181, 181, 182, 182, 182, 182, 182, + 182, 182, 182, 182, 182, 182, 183, 183, 184, 184, + 185, 186, 186, 187, 188, 188, 188, 189, 189, 189, + 189, 189, 189, 189, 189, 189, 190, 190, 191, 192, + 192, 193, 193, 194, 194, 195, 195, 196, 196, 196, + 196, 196, 196, 196, 196, 196, 196, 196, 196, 196, + 196, 196, 196, 197, 197, 198, 198, 199, 199, 199, + 199, 199, 199, 199, 199 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -1780,29 +1822,29 @@ 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, 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, 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, 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, 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 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -1810,482 +1852,472 @@ static const unsigned char yyr2[] = means the default is an error. */ static const unsigned char yydefact[] = { - 146, 0, 43, 132, 1, 131, 179, 36, 37, 38, - 39, 40, 41, 42, 0, 44, 203, 128, 129, 203, - 158, 159, 0, 0, 0, 43, 0, 134, 176, 0, - 0, 45, 46, 47, 48, 49, 50, 0, 0, 204, - 200, 35, 173, 174, 175, 199, 0, 0, 0, 0, - 144, 0, 0, 0, 0, 0, 0, 0, 34, 177, - 178, 44, 147, 130, 51, 2, 3, 64, 68, 69, - 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - 80, 81, 0, 0, 0, 0, 194, 0, 0, 63, - 82, 67, 195, 83, 170, 171, 172, 244, 202, 0, - 0, 0, 0, 157, 145, 135, 133, 125, 126, 0, - 0, 0, 0, 180, 84, 0, 0, 66, 89, 91, - 0, 0, 96, 90, 243, 0, 224, 0, 0, 0, - 0, 44, 212, 213, 6, 7, 8, 9, 10, 11, - 12, 13, 14, 15, 16, 17, 18, 19, 0, 0, - 0, 0, 0, 0, 0, 20, 21, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 201, 44, 216, - 0, 240, 152, 149, 148, 150, 151, 153, 156, 0, - 140, 142, 138, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 0, 0, 0, 0, 136, 0, - 0, 0, 88, 168, |