Commit fefae6ee authored by Russ Cox's avatar Russ Cox

cmd/6g, cmd/8g: move panicindex calls out of line

The old code generated for a bounds check was
                CMP
                JLT ok
                CALL panicindex
        ok:
                ...

The new code is (once the linker finishes with it):
                CMP
                JGE panic
                ...
        panic:
                CALL panicindex

which moves the calls out of line, putting more useful
code in each cache line.  This matters especially in tight
loops, such as in Fannkuch.  The benefit is more modest
elsewhere, but real.

From test/bench/go1, amd64:

benchmark                old ns/op    new ns/op    delta
BenchmarkBinaryTree17   6096092000   6088808000   -0.12%
BenchmarkFannkuch11     6151404000   4020463000  -34.64%
BenchmarkGobDecode        28990050     28894630   -0.33%
BenchmarkGobEncode        12406310     12136730   -2.17%
BenchmarkGzip               179923       179903   -0.01%
BenchmarkGunzip              11219        11130   -0.79%
BenchmarkJSONEncode       86429350     86515900   +0.10%
BenchmarkJSONDecode      334593800    315728400   -5.64%
BenchmarkRevcomp25M     1219763000   1180767000   -3.20%
BenchmarkTemplate        492947600    483646800   -1.89%

And 386:

benchmark                old ns/op    new ns/op    delta
BenchmarkBinaryTree17   6354902000   6243000000   -1.76%
BenchmarkFannkuch11     8043769000   7326965000   -8.91%
BenchmarkGobDecode        19010800     18941230   -0.37%
BenchmarkGobEncode        14077500     13792460   -2.02%
BenchmarkGzip               194087       193619   -0.24%
BenchmarkGunzip              12495        12457   -0.30%
BenchmarkJSONEncode      125636400    125451400   -0.15%
BenchmarkJSONDecode      696648600    685032800   -1.67%
BenchmarkRevcomp25M     2058088000   2052545000   -0.27%
BenchmarkTemplate        602140000    589876800   -2.04%

To implement this, two new instruction forms:

        JLT target      // same as always
        JLT $0, target  // branch expected not taken
        JLT $1, target  // branch expected taken

The linker could also emit the prediction prefixes, but it
does not: expected taken branches are reversed so that the
expected case is not taken (as in example above), and
the default expectaton for such a jump is not taken
already.

R=golang-dev, gri, r, dave
CC=golang-dev
https://golang.org/cl/6248049
parent b9918dbf
...@@ -176,6 +176,11 @@ nonrel: ...@@ -176,6 +176,11 @@ nonrel:
$$.from = nullgen; $$.from = nullgen;
$$.to = $1; $$.to = $1;
} }
| imm ',' rel
{
$$.from = $1;
$$.to = $3;
}
spec1: /* DATA */ spec1: /* DATA */
nam '/' con ',' imm nam '/' con ',' imm
......
...@@ -406,16 +406,16 @@ union yyalloc ...@@ -406,16 +406,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 2 #define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 548 #define YYLAST 554
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 54 #define YYNTOKENS 54
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 40 #define YYNNTS 40
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 131 #define YYNRULES 132
/* YYNRULES -- Number of states. */ /* YYNRULES -- Number of states. */
#define YYNSTATES 260 #define YYNSTATES 263
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
...@@ -468,16 +468,16 @@ static const yytype_uint16 yyprhs[] = ...@@ -468,16 +468,16 @@ static const yytype_uint16 yyprhs[] =
23, 26, 29, 33, 37, 40, 43, 46, 49, 52, 23, 26, 29, 33, 37, 40, 43, 46, 49, 52,
55, 58, 61, 64, 67, 70, 73, 76, 79, 82, 55, 58, 61, 64, 67, 70, 73, 76, 79, 82,
85, 88, 89, 91, 95, 99, 102, 104, 107, 109, 85, 88, 89, 91, 95, 99, 102, 104, 107, 109,
112, 114, 120, 124, 130, 133, 135, 137, 139, 143, 112, 114, 118, 124, 128, 134, 137, 139, 141, 143,
149, 153, 159, 162, 164, 168, 174, 180, 181, 183, 147, 153, 157, 163, 166, 168, 172, 178, 184, 185,
187, 193, 195, 197, 199, 201, 204, 207, 209, 211, 187, 191, 197, 199, 201, 203, 205, 208, 211, 213,
213, 215, 220, 223, 226, 228, 230, 232, 234, 236, 215, 217, 219, 224, 227, 230, 232, 234, 236, 238,
238, 240, 243, 246, 249, 252, 255, 260, 266, 270, 240, 242, 244, 247, 250, 253, 256, 259, 264, 270,
272, 274, 276, 281, 286, 291, 298, 308, 312, 316, 274, 276, 278, 280, 285, 290, 295, 302, 312, 316,
322, 331, 333, 340, 346, 354, 355, 358, 361, 363, 320, 326, 335, 337, 344, 350, 358, 359, 362, 365,
365, 367, 369, 371, 374, 377, 380, 384, 386, 389, 367, 369, 371, 373, 375, 378, 381, 384, 388, 390,
393, 398, 400, 404, 408, 412, 416, 420, 425, 430, 393, 397, 402, 404, 408, 412, 416, 420, 424, 429,
434, 438 434, 438, 442
}; };
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
...@@ -494,40 +494,40 @@ static const yytype_int8 yyrhs[] = ...@@ -494,40 +494,40 @@ static const yytype_int8 yyrhs[] =
75, -1, 29, 76, -1, 23, 77, -1, -1, 49, 75, -1, 29, 76, -1, 23, 77, -1, -1, 49,
-1, 80, 49, 78, -1, 78, 49, 80, -1, 80, -1, 80, 49, 78, -1, 78, 49, 80, -1, 80,
49, -1, 80, -1, 49, 78, -1, 78, -1, 49, 49, -1, 80, -1, 49, 78, -1, 78, -1, 49,
81, -1, 81, -1, 88, 11, 91, 49, 84, -1, 81, -1, 81, -1, 84, 49, 81, -1, 88, 11,
85, 49, 83, -1, 85, 49, 91, 49, 83, -1, 91, 49, 84, -1, 85, 49, 83, -1, 85, 49,
49, 79, -1, 79, -1, 61, -1, 65, -1, 80, 91, 49, 83, -1, 49, 79, -1, 79, -1, 61,
49, 78, -1, 80, 49, 78, 46, 35, -1, 80, -1, 65, -1, 80, 49, 78, -1, 80, 49, 78,
49, 78, -1, 80, 49, 78, 46, 36, -1, 80, 46, 35, -1, 80, 49, 78, -1, 80, 49, 78,
49, -1, 80, -1, 80, 49, 78, -1, 82, 49, 46, 36, -1, 80, 49, -1, 80, -1, 80, 49,
78, 49, 91, -1, 84, 49, 78, 49, 82, -1, 78, -1, 82, 49, 78, 49, 91, -1, 84, 49,
-1, 84, -1, 85, 49, 84, -1, 85, 49, 91, 78, 49, 82, -1, -1, 84, -1, 85, 49, 84,
49, 84, -1, 82, -1, 85, -1, 81, -1, 87, -1, 85, 49, 91, 49, 84, -1, 82, -1, 85,
-1, 10, 82, -1, 10, 86, -1, 82, -1, 86, -1, 81, -1, 87, -1, 10, 82, -1, 10, 86,
-1, 78, -1, 84, -1, 91, 50, 32, 51, -1, -1, 82, -1, 86, -1, 78, -1, 84, -1, 91,
43, 89, -1, 44, 89, -1, 34, -1, 37, -1, 50, 32, 51, -1, 43, 89, -1, 44, 89, -1,
35, -1, 38, -1, 42, -1, 36, -1, 39, -1, 34, -1, 37, -1, 35, -1, 38, -1, 42, -1,
52, 92, -1, 52, 91, -1, 52, 88, -1, 52, 36, -1, 39, -1, 52, 92, -1, 52, 91, -1,
41, -1, 52, 40, -1, 52, 50, 40, 51, -1, 52, 88, -1, 52, 41, -1, 52, 40, -1, 52,
52, 50, 9, 40, 51, -1, 52, 9, 40, -1, 50, 40, 51, -1, 52, 50, 9, 40, 51, -1,
86, -1, 87, -1, 91, -1, 91, 50, 35, 51, 52, 9, 40, -1, 86, -1, 87, -1, 91, -1,
-1, 91, 50, 42, 51, -1, 91, 50, 36, 51, 91, 50, 35, 51, -1, 91, 50, 42, 51, -1,
-1, 91, 50, 35, 10, 91, 51, -1, 91, 50, 91, 50, 36, 51, -1, 91, 50, 35, 10, 91,
35, 51, 50, 35, 10, 91, 51, -1, 50, 35, 51, -1, 91, 50, 35, 51, 50, 35, 10, 91,
51, -1, 50, 42, 51, -1, 50, 35, 10, 91, 51, -1, 50, 35, 51, -1, 50, 42, 51, -1,
51, -1, 50, 35, 51, 50, 35, 10, 91, 51, 50, 35, 10, 91, 51, -1, 50, 35, 51, 50,
-1, 88, -1, 88, 50, 35, 10, 91, 51, -1, 35, 10, 91, 51, -1, 88, -1, 88, 50, 35,
43, 89, 50, 90, 51, -1, 43, 6, 7, 89, 10, 91, 51, -1, 43, 89, 50, 90, 51, -1,
50, 33, 51, -1, -1, 8, 91, -1, 9, 91, 43, 6, 7, 89, 50, 33, 51, -1, -1, 8,
-1, 33, -1, 42, -1, 31, -1, 30, -1, 45, 91, -1, 9, 91, -1, 33, -1, 42, -1, 31,
-1, 9, 91, -1, 8, 91, -1, 53, 91, -1, -1, 30, -1, 45, -1, 9, 91, -1, 8, 91,
50, 93, 51, -1, 30, -1, 9, 30, -1, 30, -1, 53, 91, -1, 50, 93, 51, -1, 30, -1,
9, 30, -1, 9, 30, 9, 30, -1, 91, -1, 9, 30, -1, 30, 9, 30, -1, 9, 30, 9,
93, 8, 93, -1, 93, 9, 93, -1, 93, 10, 30, -1, 91, -1, 93, 8, 93, -1, 93, 9,
93, -1, 93, 11, 93, -1, 93, 12, 93, -1, 93, -1, 93, 10, 93, -1, 93, 11, 93, -1,
93, 6, 6, 93, -1, 93, 7, 7, 93, -1, 93, 12, 93, -1, 93, 6, 6, 93, -1, 93,
93, 5, 93, -1, 93, 4, 93, -1, 93, 3, 7, 7, 93, -1, 93, 5, 93, -1, 93, 4,
93, -1 93, -1, 93, 3, 93, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
...@@ -537,16 +537,16 @@ static const yytype_uint16 yyrline[] = ...@@ -537,16 +537,16 @@ static const yytype_uint16 yyrline[] =
86, 87, 90, 95, 101, 102, 103, 104, 105, 106, 86, 87, 90, 95, 101, 102, 103, 104, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 120, 124, 131, 138, 145, 150, 157, 162, 169, 117, 120, 124, 131, 138, 145, 150, 157, 162, 169,
174, 181, 189, 194, 202, 207, 214, 215, 218, 223, 174, 179, 186, 194, 199, 207, 212, 219, 220, 223,
233, 238, 248, 253, 258, 265, 273, 283, 287, 294, 228, 238, 243, 253, 258, 263, 270, 278, 288, 292,
299, 307, 308, 311, 312, 313, 317, 321, 322, 325, 299, 304, 312, 313, 316, 317, 318, 322, 326, 327,
326, 329, 335, 344, 353, 358, 363, 368, 373, 378, 330, 331, 334, 340, 349, 358, 363, 368, 373, 378,
383, 389, 397, 403, 414, 420, 426, 432, 438, 446, 383, 388, 394, 402, 408, 419, 425, 431, 437, 443,
447, 450, 456, 462, 468, 474, 483, 492, 497, 502, 451, 452, 455, 461, 467, 473, 479, 488, 497, 502,
510, 520, 524, 533, 540, 549, 552, 556, 562, 563, 507, 515, 525, 529, 538, 545, 554, 557, 561, 567,
567, 570, 571, 575, 579, 583, 587, 593, 597, 601, 568, 572, 575, 576, 580, 584, 588, 592, 598, 602,
606, 613, 614, 618, 622, 626, 630, 634, 638, 642, 606, 611, 618, 619, 623, 627, 631, 635, 639, 643,
646, 650 647, 651, 655
}; };
#endif #endif
...@@ -591,16 +591,16 @@ static const yytype_uint8 yyr1[] = ...@@ -591,16 +591,16 @@ static const yytype_uint8 yyr1[] =
57, 57, 60, 60, 60, 60, 60, 60, 60, 60, 57, 57, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 61, 61, 62, 63, 64, 64, 65, 65, 66, 60, 61, 61, 62, 63, 64, 64, 65, 65, 66,
66, 67, 68, 68, 69, 69, 70, 70, 71, 71, 66, 66, 67, 68, 68, 69, 69, 70, 70, 71,
72, 72, 73, 73, 73, 74, 75, 76, 76, 77, 71, 72, 72, 73, 73, 73, 74, 75, 76, 76,
77, 78, 78, 79, 79, 79, 79, 79, 79, 80, 77, 77, 78, 78, 79, 79, 79, 79, 79, 79,
80, 81, 81, 81, 82, 82, 82, 82, 82, 82, 80, 80, 81, 81, 81, 82, 82, 82, 82, 82,
82, 83, 84, 84, 84, 84, 84, 84, 84, 85, 82, 82, 83, 84, 84, 84, 84, 84, 84, 84,
85, 86, 86, 86, 86, 86, 86, 86, 86, 86, 85, 85, 86, 86, 86, 86, 86, 86, 86, 86,
86, 87, 87, 88, 88, 89, 89, 89, 90, 90, 86, 86, 87, 87, 88, 88, 89, 89, 89, 90,
90, 91, 91, 91, 91, 91, 91, 92, 92, 92, 90, 90, 91, 91, 91, 91, 91, 91, 92, 92,
92, 93, 93, 93, 93, 93, 93, 93, 93, 93, 92, 92, 93, 93, 93, 93, 93, 93, 93, 93,
93, 93 93, 93, 93
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
...@@ -610,16 +610,16 @@ static const yytype_uint8 yyr2[] = ...@@ -610,16 +610,16 @@ static const yytype_uint8 yyr2[] =
2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 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, 0, 1, 3, 3, 2, 1, 2, 1, 2, 2, 0, 1, 3, 3, 2, 1, 2, 1, 2,
1, 5, 3, 5, 2, 1, 1, 1, 3, 5, 1, 3, 5, 3, 5, 2, 1, 1, 1, 3,
3, 5, 2, 1, 3, 5, 5, 0, 1, 3, 5, 3, 5, 2, 1, 3, 5, 5, 0, 1,
5, 1, 1, 1, 1, 2, 2, 1, 1, 1, 3, 5, 1, 1, 1, 1, 2, 2, 1, 1,
1, 4, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 2, 1, 1, 1, 1, 1,
1, 2, 2, 2, 2, 2, 4, 5, 3, 1, 1, 1, 2, 2, 2, 2, 2, 4, 5, 3,
1, 1, 4, 4, 4, 6, 9, 3, 3, 5, 1, 1, 1, 4, 4, 4, 6, 9, 3, 3,
8, 1, 6, 5, 7, 0, 2, 2, 1, 1, 5, 8, 1, 6, 5, 7, 0, 2, 2, 1,
1, 1, 1, 2, 2, 2, 3, 1, 2, 3, 1, 1, 1, 1, 2, 2, 2, 3, 1, 2,
4, 1, 3, 3, 3, 3, 3, 4, 4, 3, 3, 4, 1, 3, 3, 3, 3, 3, 4, 4,
3, 3 3, 3, 3
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
...@@ -629,39 +629,40 @@ static const yytype_uint8 yydefact[] = ...@@ -629,39 +629,40 @@ static const yytype_uint8 yydefact[] =
{ {
2, 3, 1, 0, 0, 31, 0, 0, 0, 0, 2, 3, 1, 0, 0, 31, 0, 0, 0, 0,
0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
0, 57, 0, 0, 0, 9, 4, 0, 11, 32, 0, 58, 0, 0, 0, 9, 4, 0, 11, 32,
14, 0, 0, 111, 74, 76, 79, 75, 77, 80, 14, 0, 0, 112, 75, 77, 80, 76, 78, 81,
78, 105, 112, 0, 0, 0, 15, 38, 61, 62, 79, 106, 113, 0, 0, 0, 15, 38, 62, 63,
89, 90, 101, 91, 0, 16, 69, 36, 70, 17, 90, 91, 102, 92, 0, 16, 70, 36, 71, 17,
0, 18, 0, 0, 105, 105, 0, 22, 45, 63, 0, 18, 0, 0, 106, 106, 0, 22, 46, 64,
67, 68, 64, 91, 20, 0, 32, 46, 47, 23, 68, 69, 65, 92, 20, 0, 32, 47, 48, 23,
105, 0, 0, 19, 40, 0, 21, 0, 30, 0, 106, 0, 0, 19, 40, 0, 0, 21, 0, 30,
24, 0, 25, 0, 26, 53, 27, 0, 28, 0, 0, 24, 0, 25, 0, 26, 54, 27, 0, 28,
29, 58, 7, 0, 5, 0, 10, 114, 113, 0, 0, 29, 59, 7, 0, 5, 0, 10, 115, 114,
0, 0, 0, 37, 0, 0, 121, 0, 115, 0, 0, 0, 0, 0, 37, 0, 0, 122, 0, 116,
0, 0, 85, 84, 0, 83, 82, 35, 0, 0, 0, 0, 0, 86, 85, 0, 84, 83, 35, 0,
65, 66, 72, 73, 44, 0, 0, 72, 39, 0, 0, 66, 67, 73, 74, 45, 0, 0, 73, 39,
0, 0, 0, 0, 52, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 53, 0, 0, 0,
13, 105, 106, 107, 0, 0, 97, 98, 0, 0, 12, 0, 13, 106, 107, 108, 0, 0, 98, 99,
0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 88, 0, 0, 33, 34, 0, 0, 117, 0, 0, 0, 0, 89, 0, 0, 33, 34,
0, 42, 0, 59, 0, 48, 50, 54, 0, 0, 0, 0, 41, 0, 43, 0, 60, 0, 49, 51,
8, 6, 0, 110, 108, 109, 0, 0, 0, 131, 55, 0, 0, 8, 6, 0, 111, 109, 110, 0,
130, 129, 0, 0, 122, 123, 124, 125, 126, 0, 0, 0, 132, 131, 130, 0, 0, 123, 124, 125,
0, 92, 94, 93, 0, 86, 71, 0, 0, 117, 126, 127, 0, 0, 93, 95, 94, 0, 87, 72,
81, 0, 0, 0, 0, 0, 0, 0, 103, 99, 0, 0, 118, 82, 0, 0, 0, 0, 0, 0,
0, 127, 128, 0, 0, 0, 87, 41, 118, 0, 0, 104, 100, 0, 128, 129, 0, 0, 0, 88,
43, 60, 49, 51, 55, 56, 0, 0, 102, 95, 42, 119, 0, 44, 61, 50, 52, 56, 57, 0,
0, 0, 119, 104, 0, 0, 120, 100, 0, 96 0, 103, 96, 0, 0, 120, 105, 0, 0, 121,
101, 0, 97
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] = static const yytype_int16 yydefgoto[] =
{ {
-1, 1, 3, 26, 149, 147, 27, 30, 59, 61, -1, 1, 3, 26, 151, 149, 27, 30, 59, 61,
55, 46, 83, 74, 86, 67, 79, 90, 92, 94, 55, 46, 83, 74, 87, 67, 79, 91, 93, 95,
96, 98, 100, 88, 56, 68, 57, 69, 48, 181, 97, 99, 101, 89, 56, 68, 57, 69, 48, 184,
58, 49, 50, 51, 52, 112, 196, 53, 220, 117 58, 49, 50, 51, 52, 113, 199, 53, 223, 118
}; };
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
...@@ -669,41 +670,42 @@ static const yytype_int16 yydefgoto[] = ...@@ -669,41 +670,42 @@ static const yytype_int16 yydefgoto[] =
#define YYPACT_NINF -97 #define YYPACT_NINF -97
static const yytype_int16 yypact[] = static const yytype_int16 yypact[] =
{ {
-97, 29, -97, 206, -39, -36, 254, 278, 278, 326, -97, 40, -97, 208, 5, -4, 140, 295, 295, 343,
230, 15, 302, 59, 412, 412, 278, 278, 278, 82, 233, 15, 319, 381, 91, 91, 295, 295, 295, 222,
-20, -20, -22, -6, 2, -97, -97, 12, -97, -97, 24, 24, -15, 22, 14, -97, -97, 30, -97, -97,
-97, 476, 476, -97, -97, -97, -97, -97, -97, -97, -97, 486, 486, -97, -97, -97, -97, -97, -97, -97,
-97, 88, -97, 326, 366, 476, -97, -97, -97, -97, -97, 42, -97, 343, 406, 486, -97, -97, -97, -97,
-97, -97, 14, 16, 364, -97, -97, 33, -97, -97, -97, -97, 45, 48, 399, -97, -97, 20, -97, -97,
39, -97, 41, 350, 88, 11, 152, -97, -97, -97, 67, -97, 68, 367, 42, 19, 271, -97, -97, -97,
-97, -97, -97, 31, -97, 51, 326, -97, -97, -97, -97, -97, -97, 87, -97, 127, 343, -97, -97, -97,
11, 382, 476, -97, -97, 42, -97, 50, -97, 56, 19, 437, 486, -97, -97, 90, 92, -97, 94, -97,
-97, 58, -97, 61, -97, 64, -97, 66, -97, 79, 96, -97, 104, -97, 105, -97, 111, -97, 118, -97,
-97, -97, -97, 476, -97, 476, -97, -97, -97, 84, 119, -97, -97, -97, 486, -97, 486, -97, -97, -97,
476, 476, 92, -97, 18, 78, -97, 129, -97, 108, 133, 486, 486, 121, -97, 8, 122, -97, 80, -97,
-5, 414, -97, -97, 421, -97, -97, -97, 326, 278, 134, 78, 413, -97, -97, 446, -97, -97, -97, 343,
-97, -97, 92, -97, -97, 13, 476, -97, -97, 112, 295, -97, -97, 121, -97, -97, 7, 486, -97, -97,
428, 438, 326, 326, 326, 326, 326, 206, 527, 206, 437, 148, 453, 462, 343, 343, 343, 343, 343, 208,
527, 11, -97, -97, 10, 476, 96, -97, 476, 476, 284, 208, 284, 19, -97, -97, -1, 486, 131, -97,
476, 141, 144, 476, 476, 476, 476, 476, -97, 142, 486, 486, 486, 166, 177, 486, 486, 486, 486, 486,
23, 126, 127, -97, 467, 128, -97, -97, 130, 110, -97, 176, 10, 136, 137, -97, 480, 141, -97, -97,
8, -97, 114, -97, 134, 138, 139, -97, 149, 154, 143, 142, -97, 16, -97, 149, -97, 150, 151, 154,
-97, -97, 163, -97, -97, -97, 153, 165, 179, 536, -97, 152, 155, -97, -97, 156, -97, -97, -97, 157,
493, 159, 476, 476, 65, 65, -97, -97, -97, 476, 159, 170, 99, 535, 542, 486, 486, 26, 26, -97,
476, 168, -97, -97, 185, -97, -97, -20, 211, 233, -97, -97, 486, 486, 161, -97, -97, 162, -97, -97,
-97, 191, -20, 209, 210, 476, 82, 214, -97, -97, 24, 184, 198, -97, 163, 24, 181, 183, 486, 222,
238, 200, 200, 201, 203, 220, -97, -97, 247, 227, 205, -97, -97, 229, 114, 114, 193, 194, 211, -97,
-97, -97, -97, -97, -97, -97, 207, 476, -97, -97, -97, 238, 219, -97, -97, -97, -97, -97, -97, 199,
249, 231, -97, -97, 219, 476, -97, -97, 225, -97 486, -97, -97, 244, 232, -97, -97, 214, 486, -97,
-97, 215, -97
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] = static const yytype_int16 yypgoto[] =
{ {
-97, -97, -97, -96, -97, -97, -97, 259, -97, -97, -97, -97, -97, -96, -97, -97, -97, 261, -97, -97,
-97, 265, -97, -97, -97, -97, -97, -97, -97, -97, -97, 262, -97, -97, -97, -97, -97, -97, -97, -97,
-97, -97, -97, -97, 30, 212, -2, -11, -9, 60, -97, -97, -97, -97, 17, 218, -2, -11, -9, 61,
-16, 32, -3, -1, 7, -53, -97, -10, -97, -80 -8, 51, 1, -3, -7, -56, -97, -10, -97, -87
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
...@@ -713,120 +715,122 @@ static const yytype_int16 yypgoto[] = ...@@ -713,120 +715,122 @@ static const yytype_int16 yypgoto[] =
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
static const yytype_uint16 yytable[] = static const yytype_uint16 yytable[] =
{ {
73, 70, 84, 85, 99, 101, 60, 71, 28, 72, 73, 70, 84, 86, 75, 85, 60, 72, 133, 134,
97, 132, 133, 29, 91, 93, 95, 218, 75, 110, 98, 71, 100, 102, 92, 94, 96, 150, 157, 152,
111, 107, 108, 148, 102, 150, 103, 137, 155, 2, 213, 108, 109, 47, 138, 221, 62, 111, 112, 47,
170, 171, 54, 210, 116, 118, 47, 172, 219, 62, 196, 103, 197, 104, 117, 119, 167, 168, 169, 180,
104, 193, 47, 194, 126, 178, 87, 89, 170, 171, 2, 198, 172, 173, 127, 29, 222, 126, 110, 174,
105, 190, 195, 191, 130, 172, 73, 70, 41, 106, 111, 112, 28, 193, 131, 194, 73, 70, 41, 158,
131, 125, 136, 71, 119, 72, 120, 31, 32, 156, 114, 214, 106, 72, 132, 88, 90, 71, 105, 128,
138, 85, 116, 113, 211, 165, 166, 167, 199, 200, 139, 86, 117, 202, 203, 204, 54, 107, 207, 208,
201, 135, 127, 204, 205, 206, 207, 208, 128, 33, 209, 210, 211, 160, 161, 162, 163, 164, 165, 166,
129, 151, 139, 116, 109, 116, 110, 111, 192, 140, 167, 168, 169, 114, 117, 120, 117, 195, 121, 31,
152, 153, 80, 65, 42, 141, 113, 142, 81, 82, 32, 154, 155, 161, 162, 163, 164, 165, 166, 167,
143, 108, 45, 144, 116, 145, 34, 35, 36, 37, 168, 169, 109, 172, 173, 117, 129, 130, 234, 235,
38, 39, 231, 232, 40, 183, 179, 177, 146, 157, 174, 33, 165, 166, 167, 168, 169, 181, 179, 182,
182, 184, 158, 159, 160, 161, 162, 163, 164, 165, 86, 170, 185, 187, 41, 186, 42, 136, 137, 140,
166, 167, 154, 169, 178, 197, 198, 202, 116, 116, 153, 44, 141, 142, 45, 143, 178, 200, 31, 32,
116, 203, 209, 116, 116, 116, 116, 116, 176, 217, 117, 117, 117, 144, 145, 117, 117, 117, 117, 117,
31, 32, 63, 221, 108, 161, 162, 163, 164, 165, 146, 188, 189, 190, 191, 192, 109, 147, 148, 171,
166, 167, 185, 186, 187, 188, 189, 212, 213, 215, 33, 156, 205, 159, 34, 35, 36, 37, 38, 39,
168, 216, 33, 222, 223, 224, 34, 35, 36, 37, 180, 201, 40, 41, 206, 42, 212, 215, 216, 43,
38, 39, 116, 116, 40, 64, 65, 42, 225, 233, 44, 220, 218, 45, 219, 117, 117, 226, 224, 225,
234, 237, 44, 226, 228, 45, 241, 4, 163, 164, 227, 228, 236, 237, 229, 233, 230, 242, 231, 4,
165, 166, 167, 227, 230, 244, 229, 245, 235, 5, 232, 238, 240, 239, 241, 183, 245, 244, 247, 246,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 248, 5, 6, 7, 8, 9, 10, 11, 12, 13,
16, 17, 18, 19, 20, 21, 236, 254, 31, 32, 14, 15, 16, 17, 18, 19, 20, 21, 249, 250,
63, 238, 239, 180, 242, 258, 243, 246, 247, 22, 257, 31, 32, 63, 251, 252, 253, 254, 261, 255,
23, 24, 248, 25, 249, 250, 251, 252, 253, 255, 256, 22, 23, 24, 258, 25, 34, 35, 36, 37,
33, 256, 31, 32, 34, 35, 36, 37, 38, 39, 38, 39, 259, 33, 40, 260, 262, 34, 35, 36,
257, 77, 40, 64, 65, 42, 259, 78, 134, 66, 37, 38, 39, 77, 78, 40, 64, 65, 42, 31,
44, 240, 0, 45, 33, 0, 31, 32, 34, 35, 32, 63, 66, 44, 135, 243, 45, 160, 161, 162,
36, 37, 38, 39, 0, 0, 40, 41, 0, 42, 163, 164, 165, 166, 167, 168, 169, 0, 0, 0,
0, 0, 0, 43, 44, 0, 0, 45, 33, 0, 0, 33, 0, 31, 32, 34, 35, 36, 37, 38,
31, 32, 34, 35, 36, 37, 38, 39, 0, 0, 39, 0, 0, 40, 64, 65, 42, 0, 0, 0,
40, 41, 0, 42, 0, 0, 0, 0, 44, 0, 0, 44, 0, 0, 45, 33, 0, 31, 32, 34,
54, 45, 33, 0, 31, 32, 34, 35, 36, 37, 35, 36, 37, 38, 39, 0, 0, 40, 41, 0,
38, 39, 0, 0, 40, 41, 0, 42, 0, 0, 42, 0, 0, 0, 0, 44, 0, 54, 45, 33,
0, 76, 44, 0, 0, 45, 33, 0, 31, 32, 0, 31, 32, 34, 35, 36, 37, 38, 39, 0,
34, 35, 36, 37, 38, 39, 0, 0, 40, 41, 0, 40, 41, 0, 42, 0, 0, 0, 76, 44,
0, 42, 31, 121, 31, 32, 44, 0, 0, 45, 0, 0, 45, 33, 0, 31, 32, 34, 35, 36,
33, 0, 0, 0, 34, 35, 36, 37, 38, 39, 37, 38, 39, 0, 0, 40, 41, 0, 42, 31,
31, 32, 40, 0, 33, 42, 33, 0, 0, 0, 32, 0, 0, 44, 0, 0, 45, 33, 0, 0,
44, 114, 0, 45, 122, 123, 0, 41, 115, 42, 0, 34, 35, 36, 37, 38, 39, 31, 122, 40,
0, 42, 33, 0, 124, 0, 82, 45, 0, 45, 0, 33, 42, 0, 31, 32, 0, 44, 0, 0,
31, 32, 31, 32, 0, 80, 65, 42, 0, 31, 45, 31, 32, 0, 80, 65, 42, 0, 0, 33,
174, 0, 82, 0, 0, 45, 31, 32, 0, 0, 81, 82, 0, 54, 45, 0, 33, 0, 0, 123,
0, 0, 33, 0, 33, 0, 31, 32, 0, 0, 124, 115, 41, 33, 42, 31, 32, 0, 116, 125,
0, 33, 0, 0, 173, 41, 0, 42, 33, 42, 0, 42, 45, 175, 31, 176, 82, 0, 42, 45,
0, 175, 44, 0, 82, 45, 42, 45, 33, 0, 0, 31, 32, 82, 0, 0, 45, 33, 0, 0,
0, 82, 0, 42, 45, 31, 32, 0, 82, 0, 31, 32, 0, 0, 0, 0, 33, 0, 0, 0,
180, 45, 0, 42, 31, 32, 0, 0, 82, 0, 80, 65, 42, 33, 0, 0, 177, 82, 31, 32,
54, 45, 0, 0, 0, 0, 0, 33, 160, 161, 45, 42, 33, 0, 31, 32, 82, 0, 42, 45,
162, 163, 164, 165, 166, 167, 33, 214, 0, 0, 0, 0, 0, 82, 0, 183, 45, 42, 0, 0,
0, 0, 42, 0, 0, 0, 0, 82, 0, 0, 33, 0, 82, 0, 54, 45, 33, 0, 0, 0,
45, 42, 0, 0, 0, 0, 82, 0, 0, 45, 217, 0, 0, 0, 0, 42, 0, 0, 0, 0,
158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 82, 42, 0, 45, 0, 0, 82, 0, 0, 45,
159, 160, 161, 162, 163, 164, 165, 166, 167 162, 163, 164, 165, 166, 167, 168, 169, 163, 164,
165, 166, 167, 168, 169
}; };
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
10, 10, 13, 13, 20, 21, 8, 10, 47, 10, 10, 10, 13, 13, 11, 13, 8, 10, 64, 65,
19, 64, 65, 49, 16, 17, 18, 9, 11, 8, 19, 10, 20, 21, 16, 17, 18, 104, 10, 106,
9, 31, 32, 103, 46, 105, 48, 80, 10, 0, 10, 31, 32, 6, 80, 9, 9, 8, 9, 12,
35, 36, 52, 10, 44, 45, 6, 42, 30, 9, 31, 46, 33, 48, 44, 45, 10, 11, 12, 32,
46, 31, 12, 33, 54, 32, 14, 15, 35, 36, 0, 42, 35, 36, 54, 49, 30, 54, 6, 42,
48, 147, 42, 149, 63, 42, 66, 66, 43, 47, 8, 9, 47, 149, 63, 151, 66, 66, 43, 51,
63, 54, 11, 66, 50, 66, 50, 8, 9, 51, 43, 51, 48, 66, 63, 14, 15, 66, 46, 49,
81, 81, 82, 43, 51, 10, 11, 12, 158, 159, 81, 81, 82, 160, 161, 162, 52, 47, 165, 166,
160, 50, 49, 163, 164, 165, 166, 167, 49, 30, 167, 168, 169, 3, 4, 5, 6, 7, 8, 9,
49, 7, 50, 103, 6, 105, 8, 9, 151, 49, 10, 11, 12, 76, 104, 50, 106, 153, 50, 8,
110, 111, 43, 44, 45, 49, 76, 49, 49, 50, 9, 111, 112, 4, 5, 6, 7, 8, 9, 10,
49, 121, 53, 49, 124, 49, 34, 35, 36, 37, 11, 12, 122, 35, 36, 125, 49, 49, 205, 206,
38, 39, 202, 203, 42, 141, 136, 129, 49, 51, 42, 30, 8, 9, 10, 11, 12, 137, 130, 140,
140, 141, 3, 4, 5, 6, 7, 8, 9, 10, 140, 51, 142, 143, 43, 143, 45, 50, 11, 49,
11, 12, 50, 35, 32, 155, 50, 6, 158, 159, 7, 50, 50, 49, 53, 49, 129, 157, 8, 9,
160, 7, 10, 163, 164, 165, 166, 167, 128, 49, 160, 161, 162, 49, 49, 165, 166, 167, 168, 169,
8, 9, 10, 49, 174, 6, 7, 8, 9, 10, 49, 144, 145, 146, 147, 148, 176, 49, 49, 35,
11, 12, 142, 143, 144, 145, 146, 51, 51, 51, 30, 50, 6, 51, 34, 35, 36, 37, 38, 39,
51, 51, 30, 49, 46, 46, 34, 35, 36, 37, 32, 50, 42, 43, 7, 45, 10, 51, 51, 49,
38, 39, 202, 203, 42, 43, 44, 45, 49, 209, 50, 49, 51, 53, 51, 205, 206, 46, 49, 49,
210, 217, 50, 49, 51, 53, 222, 1, 8, 9, 46, 49, 212, 213, 49, 35, 50, 9, 51, 1,
10, 11, 12, 50, 35, 225, 51, 226, 50, 13, 51, 50, 220, 51, 30, 52, 35, 225, 228, 36,
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 229, 13, 14, 15, 16, 17, 18, 19, 20, 21,
24, 25, 26, 27, 28, 29, 51, 247, 8, 9, 22, 23, 24, 25, 26, 27, 28, 29, 33, 10,
10, 30, 9, 52, 35, 255, 36, 33, 10, 43, 250, 8, 9, 10, 51, 51, 35, 9, 258, 30,
44, 45, 51, 47, 51, 35, 9, 30, 51, 10, 51, 43, 44, 45, 10, 47, 34, 35, 36, 37,
30, 30, 8, 9, 34, 35, 36, 37, 38, 39, 38, 39, 30, 30, 42, 51, 51, 34, 35, 36,
51, 12, 42, 43, 44, 45, 51, 12, 66, 49, 37, 38, 39, 12, 12, 42, 43, 44, 45, 8,
50, 221, -1, 53, 30, -1, 8, 9, 34, 35, 9, 10, 49, 50, 66, 224, 53, 3, 4, 5,
36, 37, 38, 39, -1, -1, 42, 43, -1, 45, 6, 7, 8, 9, 10, 11, 12, -1, -1, -1,
-1, -1, -1, 49, 50, -1, -1, 53, 30, -1, -1, 30, -1, 8, 9, 34, 35, 36, 37, 38,
8, 9, 34, 35, 36, 37, 38, 39, -1, -1, 39, -1, -1, 42, 43, 44, 45, -1, -1, -1,
42, 43, -1, 45, -1, -1, -1, -1, 50, -1, -1, 50, -1, -1, 53, 30, -1, 8, 9, 34,
52, 53, 30, -1, 8, 9, 34, 35, 36, 37, 35, 36, 37, 38, 39, -1, -1, 42, 43, -1,
38, 39, -1, -1, 42, 43, -1, 45, -1, -1, 45, -1, -1, -1, -1, 50, -1, 52, 53, 30,
-1, 49, 50, -1, -1, 53, 30, -1, 8, 9, -1, 8, 9, 34, 35, 36, 37, 38, 39, -1,
34, 35, 36, 37, 38, 39, -1, -1, 42, 43, -1, 42, 43, -1, 45, -1, -1, -1, 49, 50,
-1, 45, 8, 9, 8, 9, 50, -1, -1, 53, -1, -1, 53, 30, -1, 8, 9, 34, 35, 36,
30, -1, -1, -1, 34, 35, 36, 37, 38, 39, 37, 38, 39, -1, -1, 42, 43, -1, 45, 8,
8, 9, 42, -1, 30, 45, 30, -1, -1, -1, 9, -1, -1, 50, -1, -1, 53, 30, -1, -1,
50, 35, -1, 53, 40, 41, -1, 43, 42, 45, -1, 34, 35, 36, 37, 38, 39, 8, 9, 42,
-1, 45, 30, -1, 50, -1, 50, 53, -1, 53, -1, 30, 45, -1, 8, 9, -1, 50, -1, -1,
8, 9, 8, 9, -1, 43, 44, 45, -1, 8, 53, 8, 9, -1, 43, 44, 45, -1, -1, 30,
9, -1, 50, -1, -1, 53, 8, 9, -1, -1, 49, 50, -1, 52, 53, -1, 30, -1, -1, 40,
-1, -1, 30, -1, 30, -1, 8, 9, -1, -1, 41, 35, 43, 30, 45, 8, 9, -1, 42, 50,
-1, 30, -1, -1, 40, 43, -1, 45, 30, 45, -1, 45, 53, 40, 8, 9, 50, -1, 45, 53,
-1, 40, 50, -1, 50, 53, 45, 53, 30, -1, -1, 8, 9, 50, -1, -1, 53, 30, -1, -1,
-1, 50, -1, 45, 53, 8, 9, -1, 50, -1, 8, 9, -1, -1, -1, -1, 30, -1, -1, -1,
52, 53, -1, 45, 8, 9, -1, -1, 50, -1, 43, 44, 45, 30, -1, -1, 40, 50, 8, 9,
52, 53, -1, -1, -1, -1, -1, 30, 5, 6, 53, 45, 30, -1, 8, 9, 50, -1, 45, 53,
7, 8, 9, 10, 11, 12, 30, 40, -1, -1, -1, -1, -1, 50, -1, 52, 53, 45, -1, -1,
-1, -1, 45, -1, -1, -1, -1, 50, -1, -1, 30, -1, 50, -1, 52, 53, 30, -1, -1, -1,
53, 45, -1, -1, -1, -1, 50, -1, -1, 53, 40, -1, -1, -1, -1, 45, -1, -1, -1, -1,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 50, 45, -1, 53, -1, -1, 50, -1, -1, 53,
4, 5, 6, 7, 8, 9, 10, 11, 12 5, 6, 7, 8, 9, 10, 11, 12, 6, 7,
8, 9, 10, 11, 12
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
...@@ -841,24 +845,25 @@ static const yytype_uint8 yystos[] = ...@@ -841,24 +845,25 @@ static const yytype_uint8 yystos[] =
86, 87, 88, 91, 52, 64, 78, 80, 84, 62, 86, 87, 88, 91, 52, 64, 78, 80, 84, 62,
80, 63, 78, 10, 43, 44, 49, 69, 79, 81, 80, 63, 78, 10, 43, 44, 49, 69, 79, 81,
82, 86, 87, 91, 67, 88, 49, 61, 65, 70, 82, 86, 87, 91, 67, 88, 49, 61, 65, 70,
43, 49, 50, 66, 81, 91, 68, 85, 77, 85, 43, 49, 50, 66, 81, 84, 91, 68, 85, 77,
71, 80, 72, 80, 73, 80, 74, 82, 75, 84, 85, 71, 80, 72, 80, 73, 80, 74, 82, 75,
76, 84, 46, 48, 46, 48, 47, 91, 91, 6, 84, 76, 84, 46, 48, 46, 48, 47, 91, 91,
8, 9, 89, 78, 35, 42, 91, 93, 91, 50, 6, 8, 9, 89, 78, 35, 42, 91, 93, 91,
50, 9, 40, 41, 50, 88, 91, 49, 49, 49, 50, 50, 9, 40, 41, 50, 88, 91, 49, 49,
82, 86, 89, 89, 79, 50, 11, 89, 81, 50, 49, 82, 86, 89, 89, 79, 50, 11, 89, 81,
49, 49, 49, 49, 49, 49, 49, 59, 93, 58, 49, 50, 49, 49, 49, 49, 49, 49, 49, 59,
93, 7, 91, 91, 50, 10, 51, 51, 3, 4, 93, 58, 93, 7, 91, 91, 50, 10, 51, 51,
5, 6, 7, 8, 9, 10, 11, 12, 51, 35, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
35, 36, 42, 40, 9, 40, 78, 80, 32, 91, 51, 35, 35, 36, 42, 40, 9, 40, 78, 80,
52, 83, 91, 84, 91, 78, 78, 78, 78, 78, 32, 91, 81, 52, 83, 91, 84, 91, 78, 78,
57, 57, 89, 31, 33, 42, 90, 91, 50, 93, 78, 78, 78, 57, 57, 89, 31, 33, 42, 90,
93, 93, 6, 7, 93, 93, 93, 93, 93, 10, 91, 50, 93, 93, 93, 6, 7, 93, 93, 93,
10, 51, 51, 51, 40, 51, 51, 49, 9, 30, 93, 93, 10, 10, 51, 51, 51, 40, 51, 51,
92, 49, 49, 46, 46, 49, 49, 50, 51, 51, 49, 9, 30, 92, 49, 49, 46, 46, 49, 49,
35, 93, 93, 91, 91, 50, 51, 84, 30, 9, 50, 51, 51, 35, 93, 93, 91, 91, 50, 51,
83, 84, 35, 36, 91, 82, 33, 10, 51, 51, 84, 30, 9, 83, 84, 35, 36, 91, 82, 33,
35, 9, 30, 51, 91, 10, 30, 51, 91, 51 10, 51, 51, 35, 9, 30, 51, 91, 10, 30,
51, 91, 51
}; };
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
...@@ -1879,7 +1884,15 @@ yyreduce: ...@@ -1879,7 +1884,15 @@ yyreduce:
break; break;
case 41: case 41:
#line 182 "a.y" #line 180 "a.y"
{
(yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen);
}
break;
case 42:
#line 187 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval);
...@@ -1887,16 +1900,16 @@ yyreduce: ...@@ -1887,16 +1900,16 @@ yyreduce:
} }
break; break;
case 42: case 43:
#line 190 "a.y" #line 195 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 43: case 44:
#line 195 "a.y" #line 200 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval);
...@@ -1904,32 +1917,32 @@ yyreduce: ...@@ -1904,32 +1917,32 @@ yyreduce:
} }
break; break;
case 44: case 45:
#line 203 "a.y" #line 208 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
(yyval.gen2).to = (yyvsp[(2) - (2)].gen); (yyval.gen2).to = (yyvsp[(2) - (2)].gen);
} }
break; break;
case 45: case 46:
#line 208 "a.y" #line 213 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
(yyval.gen2).to = (yyvsp[(1) - (1)].gen); (yyval.gen2).to = (yyvsp[(1) - (1)].gen);
} }
break; break;
case 48: case 49:
#line 219 "a.y" #line 224 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 49: case 50:
#line 224 "a.y" #line 229 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).to = (yyvsp[(3) - (5)].gen); (yyval.gen2).to = (yyvsp[(3) - (5)].gen);
...@@ -1939,16 +1952,16 @@ yyreduce: ...@@ -1939,16 +1952,16 @@ yyreduce:
} }
break; break;
case 50: case 51:
#line 234 "a.y" #line 239 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 51: case 52:
#line 239 "a.y" #line 244 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).to = (yyvsp[(3) - (5)].gen); (yyval.gen2).to = (yyvsp[(3) - (5)].gen);
...@@ -1958,32 +1971,32 @@ yyreduce: ...@@ -1958,32 +1971,32 @@ yyreduce:
} }
break; break;
case 52: case 53:
#line 249 "a.y" #line 254 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (2)].gen); (yyval.gen2).from = (yyvsp[(1) - (2)].gen);
(yyval.gen2).to = nullgen; (yyval.gen2).to = nullgen;
} }
break; break;
case 53: case 54:
#line 254 "a.y" #line 259 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (1)].gen); (yyval.gen2).from = (yyvsp[(1) - (1)].gen);
(yyval.gen2).to = nullgen; (yyval.gen2).to = nullgen;
} }
break; break;
case 54: case 55:
#line 259 "a.y" #line 264 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 55: case 56:
#line 266 "a.y" #line 271 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).to = (yyvsp[(3) - (5)].gen); (yyval.gen2).to = (yyvsp[(3) - (5)].gen);
...@@ -1991,8 +2004,8 @@ yyreduce: ...@@ -1991,8 +2004,8 @@ yyreduce:
} }
break; break;
case 56: case 57:
#line 274 "a.y" #line 279 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(3) - (5)].gen); (yyval.gen2).from = (yyvsp[(3) - (5)].gen);
(yyval.gen2).to = (yyvsp[(5) - (5)].gen); (yyval.gen2).to = (yyvsp[(5) - (5)].gen);
...@@ -2002,32 +2015,32 @@ yyreduce: ...@@ -2002,32 +2015,32 @@ yyreduce:
} }
break; break;
case 57: case 58:
#line 283 "a.y" #line 288 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
(yyval.gen2).to = nullgen; (yyval.gen2).to = nullgen;
} }
break; break;
case 58: case 59:
#line 288 "a.y" #line 293 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (1)].gen); (yyval.gen2).from = (yyvsp[(1) - (1)].gen);
(yyval.gen2).to = nullgen; (yyval.gen2).to = nullgen;
} }
break; break;
case 59: case 60:
#line 295 "a.y" #line 300 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 60: case 61:
#line 300 "a.y" #line 305 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval);
...@@ -2035,22 +2048,22 @@ yyreduce: ...@@ -2035,22 +2048,22 @@ yyreduce:
} }
break; break;
case 65: case 66:
#line 314 "a.y" #line 319 "a.y"
{ {
(yyval.gen) = (yyvsp[(2) - (2)].gen); (yyval.gen) = (yyvsp[(2) - (2)].gen);
} }
break; break;
case 66: case 67:
#line 318 "a.y" #line 323 "a.y"
{ {
(yyval.gen) = (yyvsp[(2) - (2)].gen); (yyval.gen) = (yyvsp[(2) - (2)].gen);
} }
break; break;
case 71: case 72:
#line 330 "a.y" #line 335 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_BRANCH; (yyval.gen).type = D_BRANCH;
...@@ -2058,8 +2071,8 @@ yyreduce: ...@@ -2058,8 +2071,8 @@ yyreduce:
} }
break; break;
case 72: case 73:
#line 336 "a.y" #line 341 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
if(pass == 2) if(pass == 2)
...@@ -2070,8 +2083,8 @@ yyreduce: ...@@ -2070,8 +2083,8 @@ yyreduce:
} }
break; break;
case 73: case 74:
#line 345 "a.y" #line 350 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_BRANCH; (yyval.gen).type = D_BRANCH;
...@@ -2080,14 +2093,6 @@ yyreduce: ...@@ -2080,14 +2093,6 @@ yyreduce:
} }
break; break;
case 74:
#line 354 "a.y"
{
(yyval.gen) = nullgen;
(yyval.gen).type = (yyvsp[(1) - (1)].lval);
}
break;
case 75: case 75:
#line 359 "a.y" #line 359 "a.y"
{ {
...@@ -2116,7 +2121,7 @@ yyreduce: ...@@ -2116,7 +2121,7 @@ yyreduce:
#line 374 "a.y" #line 374 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_SP; (yyval.gen).type = (yyvsp[(1) - (1)].lval);
} }
break; break;
...@@ -2124,7 +2129,7 @@ yyreduce: ...@@ -2124,7 +2129,7 @@ yyreduce:
#line 379 "a.y" #line 379 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = (yyvsp[(1) - (1)].lval); (yyval.gen).type = D_SP;
} }
break; break;
...@@ -2137,16 +2142,15 @@ yyreduce: ...@@ -2137,16 +2142,15 @@ yyreduce:
break; break;
case 81: case 81:
#line 390 "a.y" #line 389 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_CONST; (yyval.gen).type = (yyvsp[(1) - (1)].lval);
(yyval.gen).offset = (yyvsp[(2) - (2)].lval);
} }
break; break;
case 82: case 82:
#line 398 "a.y" #line 395 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_CONST; (yyval.gen).type = D_CONST;
...@@ -2155,7 +2159,16 @@ yyreduce: ...@@ -2155,7 +2159,16 @@ yyreduce:
break; break;
case 83: case 83:
#line 404 "a.y" #line 403 "a.y"
{
(yyval.gen) = nullgen;
(yyval.gen).type = D_CONST;
(yyval.gen).offset = (yyvsp[(2) - (2)].lval);
}
break;
case 84:
#line 409 "a.y"
{ {
(yyval.gen) = (yyvsp[(2) - (2)].gen); (yyval.gen) = (yyvsp[(2) - (2)].gen);
(yyval.gen).index = (yyvsp[(2) - (2)].gen).type; (yyval.gen).index = (yyvsp[(2) - (2)].gen).type;
...@@ -2168,8 +2181,8 @@ yyreduce: ...@@ -2168,8 +2181,8 @@ yyreduce:
} }
break; break;
case 84: case 85:
#line 415 "a.y" #line 420 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_SCONST; (yyval.gen).type = D_SCONST;
...@@ -2177,8 +2190,8 @@ yyreduce: ...@@ -2177,8 +2190,8 @@ yyreduce:
} }
break; break;
case 85: case 86:
#line 421 "a.y" #line 426 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2186,8 +2199,8 @@ yyreduce: ...@@ -2186,8 +2199,8 @@ yyreduce:
} }
break; break;
case 86: case 87:
#line 427 "a.y" #line 432 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2195,8 +2208,8 @@ yyreduce: ...@@ -2195,8 +2208,8 @@ yyreduce:
} }
break; break;
case 87: case 88:
#line 433 "a.y" #line 438 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2204,8 +2217,8 @@ yyreduce: ...@@ -2204,8 +2217,8 @@ yyreduce:
} }
break; break;
case 88: case 89:
#line 439 "a.y" #line 444 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2213,8 +2226,8 @@ yyreduce: ...@@ -2213,8 +2226,8 @@ yyreduce:
} }
break; break;
case 91: case 92:
#line 451 "a.y" #line 456 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_NONE; (yyval.gen).type = D_INDIR+D_NONE;
...@@ -2222,8 +2235,8 @@ yyreduce: ...@@ -2222,8 +2235,8 @@ yyreduce:
} }
break; break;
case 92: case 93:
#line 457 "a.y" #line 462 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval);
...@@ -2231,8 +2244,8 @@ yyreduce: ...@@ -2231,8 +2244,8 @@ yyreduce:
} }
break; break;
case 93: case 94:
#line 463 "a.y" #line 468 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_SP; (yyval.gen).type = D_INDIR+D_SP;
...@@ -2240,8 +2253,8 @@ yyreduce: ...@@ -2240,8 +2253,8 @@ yyreduce:
} }
break; break;
case 94: case 95:
#line 469 "a.y" #line 474 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval);
...@@ -2249,8 +2262,8 @@ yyreduce: ...@@ -2249,8 +2262,8 @@ yyreduce:
} }
break; break;
case 95: case 96:
#line 475 "a.y" #line 480 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_NONE; (yyval.gen).type = D_INDIR+D_NONE;
...@@ -2261,8 +2274,8 @@ yyreduce: ...@@ -2261,8 +2274,8 @@ yyreduce:
} }
break; break;
case 96: case 97:
#line 484 "a.y" #line 489 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(3) - (9)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(3) - (9)].lval);
...@@ -2273,24 +2286,24 @@ yyreduce: ...@@ -2273,24 +2286,24 @@ yyreduce:
} }
break; break;
case 97: case 98:
#line 493 "a.y" #line 498 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(2) - (3)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(2) - (3)].lval);
} }
break; break;
case 98: case 99:
#line 498 "a.y" #line 503 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_SP; (yyval.gen).type = D_INDIR+D_SP;
} }
break; break;
case 99: case 100:
#line 503 "a.y" #line 508 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_NONE; (yyval.gen).type = D_INDIR+D_NONE;
...@@ -2300,8 +2313,8 @@ yyreduce: ...@@ -2300,8 +2313,8 @@ yyreduce:
} }
break; break;
case 100: case 101:
#line 511 "a.y" #line 516 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(2) - (8)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(2) - (8)].lval);
...@@ -2311,15 +2324,15 @@ yyreduce: ...@@ -2311,15 +2324,15 @@ yyreduce:
} }
break; break;
case 101: case 102:
#line 521 "a.y" #line 526 "a.y"
{ {
(yyval.gen) = (yyvsp[(1) - (1)].gen); (yyval.gen) = (yyvsp[(1) - (1)].gen);
} }
break; break;
case 102: case 103:
#line 525 "a.y" #line 530 "a.y"
{ {
(yyval.gen) = (yyvsp[(1) - (6)].gen); (yyval.gen) = (yyvsp[(1) - (6)].gen);
(yyval.gen).index = (yyvsp[(3) - (6)].lval); (yyval.gen).index = (yyvsp[(3) - (6)].lval);
...@@ -2328,8 +2341,8 @@ yyreduce: ...@@ -2328,8 +2341,8 @@ yyreduce:
} }
break; break;
case 103: case 104:
#line 534 "a.y" #line 539 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = (yyvsp[(4) - (5)].lval); (yyval.gen).type = (yyvsp[(4) - (5)].lval);
...@@ -2338,8 +2351,8 @@ yyreduce: ...@@ -2338,8 +2351,8 @@ yyreduce:
} }
break; break;
case 104: case 105:
#line 541 "a.y" #line 546 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_STATIC; (yyval.gen).type = D_STATIC;
...@@ -2348,164 +2361,164 @@ yyreduce: ...@@ -2348,164 +2361,164 @@ yyreduce:
} }
break; break;
case 105: case 106:
#line 549 "a.y" #line 554 "a.y"
{ {
(yyval.lval) = 0; (yyval.lval) = 0;
} }
break; break;
case 106: case 107:
#line 553 "a.y" #line 558 "a.y"
{ {
(yyval.lval) = (yyvsp[(2) - (2)].lval); (yyval.lval) = (yyvsp[(2) - (2)].lval);
} }
break; break;
case 107: case 108:
#line 557 "a.y" #line 562 "a.y"
{ {
(yyval.lval) = -(yyvsp[(2) - (2)].lval); (yyval.lval) = -(yyvsp[(2) - (2)].lval);
} }
break; break;
case 109: case 110:
#line 564 "a.y" #line 569 "a.y"
{ {
(yyval.lval) = D_AUTO; (yyval.lval) = D_AUTO;
} }
break; break;
case 112: case 113:
#line 572 "a.y" #line 577 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (1)].sym)->value; (yyval.lval) = (yyvsp[(1) - (1)].sym)->value;
} }
break; break;
case 113: case 114:
#line 576 "a.y" #line 581 "a.y"
{ {
(yyval.lval) = -(yyvsp[(2) - (2)].lval); (yyval.lval) = -(yyvsp[(2) - (2)].lval);
} }
break; break;
case 114: case 115:
#line 580 "a.y" #line 585 "a.y"
{ {
(yyval.lval) = (yyvsp[(2) - (2)].lval); (yyval.lval) = (yyvsp[(2) - (2)].lval);
} }
break; break;
case 115: case 116:
#line 584 "a.y" #line 589 "a.y"
{ {
(yyval.lval) = ~(yyvsp[(2) - (2)].lval); (yyval.lval) = ~(yyvsp[(2) - (2)].lval);
} }
break; break;
case 116: case 117:
#line 588 "a.y" #line 593 "a.y"
{ {
(yyval.lval) = (yyvsp[(2) - (3)].lval); (yyval.lval) = (yyvsp[(2) - (3)].lval);
} }
break; break;
case 117: case 118:
#line 594 "a.y" #line 599 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (1)].lval) & 0xffffffffLL; (yyval.lval) = (yyvsp[(1) - (1)].lval) & 0xffffffffLL;
} }
break; break;
case 118: case 119:
#line 598 "a.y" #line 603 "a.y"
{ {
(yyval.lval) = -(yyvsp[(2) - (2)].lval) & 0xffffffffLL; (yyval.lval) = -(yyvsp[(2) - (2)].lval) & 0xffffffffLL;
} }
break; break;
case 119: case 120:
#line 602 "a.y" #line 607 "a.y"
{ {
(yyval.lval) = ((yyvsp[(1) - (3)].lval) & 0xffffffffLL) + (yyval.lval) = ((yyvsp[(1) - (3)].lval) & 0xffffffffLL) +
(((yyvsp[(3) - (3)].lval) & 0xffffLL) << 32); (((yyvsp[(3) - (3)].lval) & 0xffffLL) << 32);
} }
break; break;
case 120: case 121:
#line 607 "a.y" #line 612 "a.y"
{ {
(yyval.lval) = (-(yyvsp[(2) - (4)].lval) & 0xffffffffLL) + (yyval.lval) = (-(yyvsp[(2) - (4)].lval) & 0xffffffffLL) +
(((yyvsp[(4) - (4)].lval) & 0xffffLL) << 32); (((yyvsp[(4) - (4)].lval) & 0xffffLL) << 32);
} }
break; break;
case 122: case 123:
#line 615 "a.y" #line 620 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) + (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) + (yyvsp[(3) - (3)].lval);
} }
break; break;
case 123: case 124:
#line 619 "a.y" #line 624 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) - (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) - (yyvsp[(3) - (3)].lval);
} }
break; break;
case 124: case 125:
#line 623 "a.y" #line 628 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) * (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) * (yyvsp[(3) - (3)].lval);
} }
break; break;
case 125: case 126:
#line 627 "a.y" #line 632 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) / (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) / (yyvsp[(3) - (3)].lval);
} }
break; break;
case 126: case 127:
#line 631 "a.y" #line 636 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) % (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) % (yyvsp[(3) - (3)].lval);
} }
break; break;
case 127: case 128:
#line 635 "a.y" #line 640 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (4)].lval) << (yyvsp[(4) - (4)].lval); (yyval.lval) = (yyvsp[(1) - (4)].lval) << (yyvsp[(4) - (4)].lval);
} }
break; break;
case 128: case 129:
#line 639 "a.y" #line 644 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (4)].lval) >> (yyvsp[(4) - (4)].lval); (yyval.lval) = (yyvsp[(1) - (4)].lval) >> (yyvsp[(4) - (4)].lval);
} }
break; break;
case 129: case 130:
#line 643 "a.y" #line 648 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) & (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) & (yyvsp[(3) - (3)].lval);
} }
break; break;
case 130: case 131:
#line 647 "a.y" #line 652 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) ^ (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) ^ (yyvsp[(3) - (3)].lval);
} }
break; break;
case 131: case 132:
#line 651 "a.y" #line 656 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) | (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) | (yyvsp[(3) - (3)].lval);
} }
...@@ -2513,7 +2526,7 @@ yyreduce: ...@@ -2513,7 +2526,7 @@ yyreduce:
/* Line 1267 of yacc.c. */ /* Line 1267 of yacc.c. */
#line 2517 "y.tab.c" #line 2530 "y.tab.c"
default: break; default: break;
} }
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
......
...@@ -575,6 +575,7 @@ agen(Node *n, Node *res) ...@@ -575,6 +575,7 @@ agen(Node *n, Node *res)
nodconst(&n2, types[TUINT32], v); nodconst(&n2, types[TUINT32], v);
gins(optoas(OCMP, types[TUINT32]), &n1, &n2); gins(optoas(OCMP, types[TUINT32]), &n1, &n2);
p1 = gbranch(optoas(OGT, types[TUINT32]), T); p1 = gbranch(optoas(OGT, types[TUINT32]), T);
expecttaken(p1, 1);
ginscall(panicindex, 0); ginscall(panicindex, 0);
patch(p1, pc); patch(p1, pc);
} }
...@@ -625,6 +626,7 @@ agen(Node *n, Node *res) ...@@ -625,6 +626,7 @@ agen(Node *n, Node *res)
} }
gins(optoas(OCMP, t), &n2, &n1); gins(optoas(OCMP, t), &n2, &n1);
p1 = gbranch(optoas(OLT, t), T); p1 = gbranch(optoas(OLT, t), T);
expecttaken(p1, 1);
if(n5.op != OXXX) if(n5.op != OXXX)
regfree(&n5); regfree(&n5);
ginscall(panicindex, 0); ginscall(panicindex, 0);
......
...@@ -104,6 +104,7 @@ int componentgen(Node*, Node*); ...@@ -104,6 +104,7 @@ int componentgen(Node*, Node*);
void clearp(Prog*); void clearp(Prog*);
void proglist(void); void proglist(void);
Prog* gbranch(int, Type*); Prog* gbranch(int, Type*);
void expecttaken(Prog*, int);
Prog* prog(int); Prog* prog(int);
void gaddoffset(Node*); void gaddoffset(Node*);
void gconv(int, int); void gconv(int, int);
......
...@@ -508,6 +508,7 @@ dodiv(int op, Node *nl, Node *nr, Node *res) ...@@ -508,6 +508,7 @@ dodiv(int op, Node *nl, Node *nr, Node *res)
nodconst(&n4, t, -1); nodconst(&n4, t, -1);
gins(optoas(OCMP, t), &n3, &n4); gins(optoas(OCMP, t), &n3, &n4);
p1 = gbranch(optoas(ONE, t), T); p1 = gbranch(optoas(ONE, t), T);
expecttaken(p1, 1);
nodconst(&n4, t, -1LL<<(t->width*8-1)); nodconst(&n4, t, -1LL<<(t->width*8-1));
if(t->width == 8) { if(t->width == 8) {
n5 = n4; n5 = n4;
...@@ -516,6 +517,7 @@ dodiv(int op, Node *nl, Node *nr, Node *res) ...@@ -516,6 +517,7 @@ dodiv(int op, Node *nl, Node *nr, Node *res)
} }
gins(optoas(OCMP, t), &ax, &n4); gins(optoas(OCMP, t), &ax, &n4);
p2 = gbranch(optoas(ONE, t), T); p2 = gbranch(optoas(ONE, t), T);
expecttaken(p2, 1);
if(op == ODIV) if(op == ODIV)
gmove(&n4, res); gmove(&n4, res);
if(t->width == 8) if(t->width == 8)
...@@ -943,6 +945,7 @@ cgen_shift(int op, int bounded, Node *nl, Node *nr, Node *res) ...@@ -943,6 +945,7 @@ cgen_shift(int op, int bounded, Node *nl, Node *nr, Node *res)
nodconst(&n3, tcount, nl->type->width*8); nodconst(&n3, tcount, nl->type->width*8);
gins(optoas(OCMP, tcount), &n1, &n3); gins(optoas(OCMP, tcount), &n1, &n3);
p1 = gbranch(optoas(OLT, tcount), T); p1 = gbranch(optoas(OLT, tcount), T);
expecttaken(p1, 1);
if(op == ORSH && issigned[nl->type->etype]) { if(op == ORSH && issigned[nl->type->etype]) {
nodconst(&n3, types[TUINT32], nl->type->width*8-1); nodconst(&n3, types[TUINT32], nl->type->width*8-1);
gins(a, &n3, &n2); gins(a, &n3, &n2);
...@@ -1158,12 +1161,14 @@ cmpandthrow(Node *nl, Node *nr) ...@@ -1158,12 +1161,14 @@ cmpandthrow(Node *nl, Node *nr)
regfree(&n1); regfree(&n1);
if(throwpc == nil) { if(throwpc == nil) {
p1 = gbranch(optoas(op, t), T); p1 = gbranch(optoas(op, t), T);
expecttaken(p1, 1);
throwpc = pc; throwpc = pc;
ginscall(panicslice, 0); ginscall(panicslice, 0);
patch(p1, pc); patch(p1, pc);
} else { } else {
op = brcom(op); op = brcom(op);
p1 = gbranch(optoas(op, t), T); p1 = gbranch(optoas(op, t), T);
expecttaken(p1, 0);
patch(p1, throwpc); patch(p1, throwpc);
} }
} }
......
...@@ -117,6 +117,16 @@ gbranch(int as, Type *t) ...@@ -117,6 +117,16 @@ gbranch(int as, Type *t)
return p; return p;
} }
/*
* mark branch as expected taken or not.
*/
void
expecttaken(Prog *p, int taken)
{
p->from.type = D_CONST;
p->from.offset = taken;
}
/* /*
* patch previous branch to jump to to. * patch previous branch to jump to to.
*/ */
...@@ -2120,6 +2130,7 @@ oindex: ...@@ -2120,6 +2130,7 @@ oindex:
} }
gins(optoas(OCMP, t), reg1, &n2); gins(optoas(OCMP, t), reg1, &n2);
p1 = gbranch(optoas(OLT, t), T); p1 = gbranch(optoas(OLT, t), T);
expecttaken(p1, 1);
if(n4.op != OXXX) if(n4.op != OXXX)
regfree(&n4); regfree(&n4);
ginscall(panicindex, 0); ginscall(panicindex, 0);
...@@ -2229,6 +2240,7 @@ oindex_const_sudo: ...@@ -2229,6 +2240,7 @@ oindex_const_sudo:
p1 = gins(optoas(OCMP, types[TUINT32]), N, &n2); p1 = gins(optoas(OCMP, types[TUINT32]), N, &n2);
p1->from = *a; p1->from = *a;
p1 = gbranch(optoas(OGT, types[TUINT32]), T); p1 = gbranch(optoas(OGT, types[TUINT32]), T);
expecttaken(p1, 1);
ginscall(panicindex, 0); ginscall(panicindex, 0);
patch(p1, pc); patch(p1, pc);
a->offset -= Array_nel; a->offset -= Array_nel;
......
...@@ -314,7 +314,9 @@ uchar yscond[] = ...@@ -314,7 +314,9 @@ uchar yscond[] =
}; };
uchar yjcond[] = uchar yjcond[] =
{ {
Ynone, Ybr, Zbr, 1, Ynone, Ybr, Zbr, 0,
Yi0, Ybr, Zbr, 0,
Yi1, Ybr, Zbr, 1,
0 0
}; };
uchar yloop[] = uchar yloop[] =
......
...@@ -192,6 +192,18 @@ loop: ...@@ -192,6 +192,18 @@ loop:
* recurse to follow one path. * recurse to follow one path.
* continue loop on the other. * continue loop on the other.
*/ */
if(p->from.type == D_CONST) {
if(p->from.offset == 1) {
/*
* expect conditional jump to be taken.
* rewrite so that's the fall-through case.
*/
p->as = relinv(a);
q = p->link;
p->link = p->pcond;
p->pcond = q;
}
} else {
q = brchain(p->link); q = brchain(p->link);
if(q != P && q->mark) if(q != P && q->mark)
if(a != ALOOP) { if(a != ALOOP) {
...@@ -199,6 +211,7 @@ loop: ...@@ -199,6 +211,7 @@ loop:
p->link = p->pcond; p->link = p->pcond;
p->pcond = q; p->pcond = q;
} }
}
xfol(p->link, last); xfol(p->link, last);
q = brchain(p->pcond); q = brchain(p->pcond);
if(q->mark) { if(q->mark) {
...@@ -413,6 +426,14 @@ dostkoff(void) ...@@ -413,6 +426,14 @@ dostkoff(void)
if(autoffset < 0) if(autoffset < 0)
autoffset = 0; autoffset = 0;
if(autoffset < StackSmall && !(p->from.scale & NOSPLIT)) {
for(q = p; q != P; q = q->link)
if(q->as == ACALL)
goto noleaf;
p->from.scale |= NOSPLIT;
noleaf:;
}
q = P; q = P;
if((p->from.scale & NOSPLIT) && autoffset >= StackSmall) if((p->from.scale & NOSPLIT) && autoffset >= StackSmall)
diag("nosplit func likely to overflow stack"); diag("nosplit func likely to overflow stack");
......
...@@ -177,6 +177,11 @@ nonrel: ...@@ -177,6 +177,11 @@ nonrel:
$$.from = nullgen; $$.from = nullgen;
$$.to = $1; $$.to = $1;
} }
| imm ',' rel
{
$$.from = $1;
$$.to = $3;
}
spec1: /* DATA */ spec1: /* DATA */
nam '/' con ',' imm nam '/' con ',' imm
......
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C /* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation; either version 2, or (at your option)
(at your option) any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -17,7 +16,9 @@ ...@@ -17,7 +16,9 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
...@@ -46,7 +47,7 @@ ...@@ -46,7 +47,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.4.1" #define YYBISON_VERSION "2.3"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
...@@ -54,50 +55,11 @@ ...@@ -54,50 +55,11 @@
/* Pure parsers. */ /* Pure parsers. */
#define YYPURE 0 #define YYPURE 0
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Using locations. */ /* Using locations. */
#define YYLSP_NEEDED 0 #define YYLSP_NEEDED 0
/* Copy the first part of user declarations. */
/* Line 189 of yacc.c */
#line 31 "a.y"
#include <u.h>
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
#include <libc.h>
#include "a.h"
/* Line 189 of yacc.c */
#line 81 "y.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -167,13 +129,37 @@ ...@@ -167,13 +129,37 @@
/* Copy the first part of user declarations. */
#line 31 "a.y"
#include <u.h>
#include <stdio.h> /* if we don't, bison will, and a.h re-#defines getc */
#include <libc.h>
#include "a.h"
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
{
/* Line 214 of yacc.c */
#line 37 "a.y" #line 37 "a.y"
{
Sym *sym; Sym *sym;
int32 lval; int32 lval;
struct { struct {
...@@ -184,23 +170,22 @@ typedef union YYSTYPE ...@@ -184,23 +170,22 @@ typedef union YYSTYPE
char sval[8]; char sval[8];
Gen gen; Gen gen;
Gen2 gen2; Gen2 gen2;
}
/* Line 193 of yacc.c. */
#line 176 "y.tab.c"
/* Line 214 of yacc.c */ YYSTYPE;
#line 192 "y.tab.c"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif #endif
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 264 of yacc.c */ /* Line 216 of yacc.c. */
#line 204 "y.tab.c" #line 189 "y.tab.c"
#ifdef short #ifdef short
# undef short # undef short
...@@ -250,7 +235,7 @@ typedef short int yytype_int16; ...@@ -250,7 +235,7 @@ typedef short int yytype_int16;
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_ #ifndef YY_
# if YYENABLE_NLS # if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS # if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid) # define YY_(msgid) dgettext ("bison-runtime", msgid)
...@@ -275,14 +260,14 @@ typedef short int yytype_int16; ...@@ -275,14 +260,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
static int static int
YYID (int yyi) YYID (int i)
#else #else
static int static int
YYID (yyi) YYID (i)
int yyi; int i;
#endif #endif
{ {
return yyi; return i;
} }
#endif #endif
...@@ -363,9 +348,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ ...@@ -363,9 +348,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */ /* A type that is properly aligned for any stack member. */
union yyalloc union yyalloc
{ {
yytype_int16 yyss_alloc; yytype_int16 yyss;
YYSTYPE yyvs_alloc; YYSTYPE yyvs;
}; };
/* The size of the maximum gap between one aligned stack and the next. */ /* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
...@@ -399,12 +384,12 @@ union yyalloc ...@@ -399,12 +384,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next stack. Advance YYPTR to a properly aligned location for the next
stack. */ stack. */
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ # define YYSTACK_RELOCATE(Stack) \
do \ do \
{ \ { \
YYSIZE_T yynewbytes; \ YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \ Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \ yyptr += yynewbytes / sizeof (*yyptr); \
} \ } \
...@@ -415,16 +400,16 @@ union yyalloc ...@@ -415,16 +400,16 @@ union yyalloc
/* YYFINAL -- State number of the termination state. */ /* YYFINAL -- State number of the termination state. */
#define YYFINAL 2 #define YYFINAL 2
/* YYLAST -- Last index in YYTABLE. */ /* YYLAST -- Last index in YYTABLE. */
#define YYLAST 483 #define YYLAST 514
/* YYNTOKENS -- Number of terminals. */ /* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 49 #define YYNTOKENS 49
/* YYNNTS -- Number of nonterminals. */ /* YYNNTS -- Number of nonterminals. */
#define YYNNTS 37 #define YYNNTS 37
/* YYNRULES -- Number of rules. */ /* YYNRULES -- Number of rules. */
#define YYNRULES 124 #define YYNRULES 125
/* YYNRULES -- Number of states. */ /* YYNRULES -- Number of states. */
#define YYNSTATES 244 #define YYNSTATES 247
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2 #define YYUNDEFTOK 2
...@@ -475,16 +460,16 @@ static const yytype_uint16 yyprhs[] = ...@@ -475,16 +460,16 @@ static const yytype_uint16 yyprhs[] =
0, 0, 3, 4, 5, 9, 10, 15, 16, 21, 0, 0, 3, 4, 5, 9, 10, 15, 16, 21,
23, 26, 29, 33, 37, 40, 43, 46, 49, 52, 23, 26, 29, 33, 37, 40, 43, 46, 49, 52,
55, 58, 61, 64, 67, 70, 73, 76, 79, 80, 55, 58, 61, 64, 67, 70, 73, 76, 79, 80,
82, 86, 90, 93, 95, 98, 100, 103, 105, 111, 82, 86, 90, 93, 95, 98, 100, 103, 105, 109,
115, 121, 124, 126, 129, 131, 133, 137, 143, 147, 115, 119, 125, 128, 130, 133, 135, 137, 141, 147,
153, 156, 158, 162, 166, 172, 174, 176, 178, 180, 151, 157, 160, 162, 166, 170, 176, 178, 180, 182,
183, 186, 188, 190, 192, 194, 196, 201, 204, 207, 184, 187, 190, 192, 194, 196, 198, 200, 205, 208,
209, 211, 213, 215, 217, 220, 223, 226, 229, 234, 211, 213, 215, 217, 219, 221, 224, 227, 230, 233,
240, 244, 247, 249, 252, 256, 261, 263, 265, 267, 238, 244, 248, 251, 253, 256, 260, 265, 267, 269,
272, 277, 284, 294, 298, 302, 307, 313, 322, 324, 271, 276, 281, 288, 298, 302, 306, 311, 317, 326,
331, 337, 345, 346, 349, 352, 354, 356, 358, 360, 328, 335, 341, 349, 350, 353, 356, 358, 360, 362,
362, 365, 368, 371, 375, 377, 381, 385, 389, 393, 364, 366, 369, 372, 375, 379, 381, 385, 389, 393,
397, 402, 407, 411, 415 397, 401, 406, 411, 415, 419
}; };
/* YYRHS -- A `-1'-separated list of the rules' RHS. */ /* YYRHS -- A `-1'-separated list of the rules' RHS. */
...@@ -500,38 +485,39 @@ static const yytype_int8 yyrhs[] = ...@@ -500,38 +485,39 @@ static const yytype_int8 yyrhs[] =
24, 67, -1, 25, 68, -1, 26, 69, -1, -1, 24, 67, -1, 25, 68, -1, 26, 69, -1, -1,
44, -1, 72, 44, 70, -1, 70, 44, 72, -1, 44, -1, 72, 44, 70, -1, 70, 44, 72, -1,
72, 44, -1, 72, -1, 44, 70, -1, 70, -1, 72, 44, -1, 72, -1, 44, 70, -1, 70, -1,
44, 73, -1, 73, -1, 81, 11, 84, 44, 75, 44, 73, -1, 73, -1, 75, 44, 73, -1, 81,
-1, 78, 44, 76, -1, 78, 44, 84, 44, 76, 11, 84, 44, 75, -1, 78, 44, 76, -1, 78,
-1, 44, 71, -1, 71, -1, 10, 81, -1, 56, 44, 84, 44, 76, -1, 44, 71, -1, 71, -1,
-1, 60, -1, 72, 44, 70, -1, 72, 44, 70, 10, 81, -1, 56, -1, 60, -1, 72, 44, 70,
41, 32, -1, 72, 44, 70, -1, 72, 44, 70, -1, 72, 44, 70, 41, 32, -1, 72, 44, 70,
41, 33, -1, 72, 44, -1, 72, -1, 72, 44, -1, 72, 44, 70, 41, 33, -1, 72, 44, -1,
70, -1, 78, 44, 75, -1, 78, 44, 84, 44, 72, -1, 72, 44, 70, -1, 78, 44, 75, -1,
75, -1, 74, -1, 78, -1, 73, -1, 80, -1, 78, 44, 84, 44, 75, -1, 74, -1, 78, -1,
10, 74, -1, 10, 79, -1, 74, -1, 79, -1, 73, -1, 80, -1, 10, 74, -1, 10, 79, -1,
75, -1, 70, -1, 75, -1, 84, 45, 29, 46, 74, -1, 79, -1, 75, -1, 70, -1, 75, -1,
-1, 38, 82, -1, 39, 82, -1, 31, -1, 34, 84, 45, 29, 46, -1, 38, 82, -1, 39, 82,
-1, 32, -1, 37, -1, 33, -1, 47, 84, -1, -1, 31, -1, 34, -1, 32, -1, 37, -1, 33,
47, 81, -1, 47, 36, -1, 47, 35, -1, 47, -1, 47, 84, -1, 47, 81, -1, 47, 36, -1,
45, 35, 46, -1, 47, 45, 9, 35, 46, -1, 47, 35, -1, 47, 45, 35, 46, -1, 47, 45,
47, 9, 35, -1, 47, 77, -1, 27, -1, 9, 9, 35, 46, -1, 47, 9, 35, -1, 47, 77,
27, -1, 27, 9, 27, -1, 9, 27, 9, 27, -1, 27, -1, 9, 27, -1, 27, 9, 27, -1,
-1, 79, -1, 80, -1, 84, -1, 84, 45, 32, 9, 27, 9, 27, -1, 79, -1, 80, -1, 84,
46, -1, 84, 45, 37, 46, -1, 84, 45, 32, -1, 84, 45, 32, 46, -1, 84, 45, 37, 46,
10, 84, 46, -1, 84, 45, 32, 46, 45, 32, -1, 84, 45, 32, 10, 84, 46, -1, 84, 45,
10, 84, 46, -1, 45, 32, 46, -1, 45, 37, 32, 46, 45, 32, 10, 84, 46, -1, 45, 32,
46, -1, 84, 45, 33, 46, -1, 45, 32, 10, 46, -1, 45, 37, 46, -1, 84, 45, 33, 46,
84, 46, -1, 45, 32, 46, 45, 32, 10, 84, -1, 45, 32, 10, 84, 46, -1, 45, 32, 46,
46, -1, 81, -1, 81, 45, 32, 10, 84, 46, 45, 32, 10, 84, 46, -1, 81, -1, 81, 45,
-1, 38, 82, 45, 83, 46, -1, 38, 6, 7, 32, 10, 84, 46, -1, 38, 82, 45, 83, 46,
82, 45, 30, 46, -1, -1, 8, 84, -1, 9, -1, 38, 6, 7, 82, 45, 30, 46, -1, -1,
84, -1, 30, -1, 37, -1, 28, -1, 27, -1, 8, 84, -1, 9, 84, -1, 30, -1, 37, -1,
40, -1, 9, 84, -1, 8, 84, -1, 48, 84, 28, -1, 27, -1, 40, -1, 9, 84, -1, 8,
-1, 45, 85, 46, -1, 84, -1, 85, 8, 85, 84, -1, 48, 84, -1, 45, 85, 46, -1, 84,
-1, 85, 9, 85, -1, 85, 10, 85, -1, 85, -1, 85, 8, 85, -1, 85, 9, 85, -1, 85,
11, 85, -1, 85, 12, 85, -1, 85, 6, 6, 10, 85, -1, 85, 11, 85, -1, 85, 12, 85,
85, -1, 85, 7, 7, 85, -1, 85, 5, 85, -1, 85, 6, 6, 85, -1, 85, 7, 7, 85,
-1, 85, 4, 85, -1, 85, 3, 85, -1 -1, 85, 5, 85, -1, 85, 4, 85, -1, 85,
3, 85, -1
}; };
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
...@@ -540,16 +526,16 @@ static const yytype_uint16 yyrline[] = ...@@ -540,16 +526,16 @@ static const yytype_uint16 yyrline[] =
0, 68, 68, 70, 69, 77, 76, 84, 83, 89, 0, 68, 68, 70, 69, 77, 76, 84, 83, 89,
90, 91, 94, 99, 105, 106, 107, 108, 109, 110, 90, 91, 94, 99, 105, 106, 107, 108, 109, 110,
111, 112, 113, 114, 115, 116, 117, 118, 121, 125, 111, 112, 113, 114, 115, 116, 117, 118, 121, 125,
132, 139, 146, 151, 158, 163, 170, 175, 182, 190, 132, 139, 146, 151, 158, 163, 170, 175, 180, 187,
195, 203, 208, 213, 222, 223, 226, 231, 241, 246, 195, 200, 208, 213, 218, 227, 228, 231, 236, 246,
256, 261, 266, 273, 278, 286, 287, 290, 291, 292, 251, 261, 266, 271, 278, 283, 291, 292, 295, 296,
296, 300, 301, 302, 305, 306, 309, 315, 324, 333, 297, 301, 305, 306, 307, 310, 311, 314, 320, 329,
338, 343, 348, 353, 360, 366, 377, 383, 389, 395, 338, 343, 348, 353, 358, 365, 371, 382, 388, 394,
401, 409, 418, 423, 428, 433, 440, 441, 444, 450, 400, 406, 414, 423, 428, 433, 438, 445, 446, 449,
456, 462, 471, 480, 485, 490, 496, 504, 514, 518, 455, 461, 467, 476, 485, 490, 495, 501, 509, 519,
527, 534, 543, 546, 550, 556, 557, 561, 564, 565, 523, 532, 539, 548, 551, 555, 561, 562, 566, 569,
569, 573, 577, 581, 587, 588, 592, 596, 600, 604, 570, 574, 578, 582, 586, 592, 593, 597, 601, 605,
608, 612, 616, 620, 624 609, 613, 617, 621, 625, 629
}; };
#endif #endif
...@@ -564,11 +550,11 @@ static const char *const yytname[] = ...@@ -564,11 +550,11 @@ static const char *const yytname[] =
"LTYPEM", "LTYPEI", "LTYPEG", "LCONST", "LFP", "LPC", "LSB", "LBREG", "LTYPEM", "LTYPEI", "LTYPEG", "LCONST", "LFP", "LPC", "LSB", "LBREG",
"LLREG", "LSREG", "LFREG", "LFCONST", "LSCONST", "LSP", "LNAME", "LLAB", "LLREG", "LSREG", "LFREG", "LFCONST", "LSCONST", "LSP", "LNAME", "LLAB",
"LVAR", "':'", "';'", "'='", "','", "'('", "')'", "'$'", "'~'", "LVAR", "':'", "';'", "'='", "','", "'('", "')'", "'$'", "'~'",
"$accept", "prog", "$@1", "line", "$@2", "$@3", "inst", "nonnon", "$accept", "prog", "@1", "line", "@2", "@3", "inst", "nonnon", "rimrem",
"rimrem", "remrim", "rimnon", "nonrem", "nonrel", "spec1", "spec2", "remrim", "rimnon", "nonrem", "nonrel", "spec1", "spec2", "spec3",
"spec3", "spec4", "spec5", "spec6", "spec7", "spec8", "rem", "rom", "spec4", "spec5", "spec6", "spec7", "spec8", "rem", "rom", "rim", "rel",
"rim", "rel", "reg", "imm", "imm2", "con2", "mem", "omem", "nmem", "nam", "reg", "imm", "imm2", "con2", "mem", "omem", "nmem", "nam", "offset",
"offset", "pointer", "con", "expr", 0 "pointer", "con", "expr", 0
}; };
#endif #endif
...@@ -591,16 +577,16 @@ static const yytype_uint8 yyr1[] = ...@@ -591,16 +577,16 @@ static const yytype_uint8 yyr1[] =
0, 49, 50, 51, 50, 53, 52, 54, 52, 52, 0, 49, 50, 51, 50, 53, 52, 54, 52, 52,
52, 52, 55, 55, 55, 55, 55, 55, 55, 55, 52, 52, 55, 55, 55, 55, 55, 55, 55, 55,
55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56,
57, 58, 59, 59, 60, 60, 61, 61, 62, 63, 57, 58, 59, 59, 60, 60, 61, 61, 61, 62,
63, 64, 64, 64, 65, 65, 66, 66, 67, 67, 63, 63, 64, 64, 64, 65, 65, 66, 66, 67,
68, 68, 68, 69, 69, 70, 70, 71, 71, 71, 67, 68, 68, 68, 69, 69, 70, 70, 71, 71,
71, 71, 71, 71, 72, 72, 73, 73, 73, 74, 71, 71, 71, 71, 71, 72, 72, 73, 73, 73,
74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75,
75, 76, 77, 77, 77, 77, 78, 78, 79, 79, 75, 75, 76, 77, 77, 77, 77, 78, 78, 79,
79, 79, 79, 79, 79, 79, 79, 79, 80, 80, 79, 79, 79, 79, 79, 79, 79, 79, 79, 80,
81, 81, 82, 82, 82, 83, 83, 83, 84, 84, 80, 81, 81, 82, 82, 82, 83, 83, 83, 84,
84, 84, 84, 84, 85, 85, 85, 85, 85, 85, 84, 84, 84, 84, 84, 85, 85, 85, 85, 85,
85, 85, 85, 85, 85 85, 85, 85, 85, 85, 85
}; };
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
...@@ -609,16 +595,16 @@ static const yytype_uint8 yyr2[] = ...@@ -609,16 +595,16 @@ static const yytype_uint8 yyr2[] =
0, 2, 0, 0, 3, 0, 4, 0, 4, 1, 0, 2, 0, 0, 3, 0, 4, 0, 4, 1,
2, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 2, 2, 2, 2, 2, 2, 2, 2, 0, 1,
3, 3, 2, 1, 2, 1, 2, 1, 5, 3, 3, 3, 2, 1, 2, 1, 2, 1, 3, 5,
5, 2, 1, 2, 1, 1, 3, 5, 3, 5, 3, 5, 2, 1, 2, 1, 1, 3, 5, 3,
2, 1, 3, 3, 5, 1, 1, 1, 1, 2, 5, 2, 1, 3, 3, 5, 1, 1, 1, 1,
2, 1, 1, 1, 1, 1, 4, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 4, 2, 2,
1, 1, 1, 1, 2, 2, 2, 2, 4, 5, 1, 1, 1, 1, 1, 2, 2, 2, 2, 4,
3, 2, 1, 2, 3, 4, 1, 1, 1, 4, 5, 3, 2, 1, 2, 3, 4, 1, 1, 1,
4, 6, 9, 3, 3, 4, 5, 8, 1, 6, 4, 4, 6, 9, 3, 3, 4, 5, 8, 1,
5, 7, 0, 2, 2, 1, 1, 1, 1, 1, 6, 5, 7, 0, 2, 2, 1, 1, 1, 1,
2, 2, 2, 3, 1, 3, 3, 3, 3, 3, 1, 2, 2, 2, 3, 1, 3, 3, 3, 3,
4, 4, 3, 3, 3 3, 4, 4, 3, 3, 3
}; };
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
...@@ -629,78 +615,78 @@ static const yytype_uint8 yydefact[] = ...@@ -629,78 +615,78 @@ static const yytype_uint8 yydefact[] =
2, 3, 1, 0, 0, 28, 0, 0, 0, 0, 2, 3, 1, 0, 0, 28, 0, 0, 0, 0,
0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0,
0, 0, 9, 4, 0, 11, 29, 14, 0, 0, 0, 0, 9, 4, 0, 11, 29, 14, 0, 0,
108, 69, 71, 73, 70, 72, 102, 109, 0, 0, 109, 70, 72, 74, 71, 73, 103, 110, 0, 0,
0, 15, 35, 55, 56, 86, 87, 98, 88, 0, 0, 15, 35, 56, 57, 87, 88, 99, 89, 0,
16, 64, 33, 65, 17, 0, 18, 0, 0, 102, 16, 65, 33, 66, 17, 0, 18, 0, 0, 103,
102, 0, 22, 42, 57, 61, 63, 62, 58, 88, 103, 0, 22, 43, 58, 62, 64, 63, 59, 89,
20, 0, 29, 44, 45, 23, 102, 0, 0, 19, 20, 0, 29, 45, 46, 23, 103, 0, 0, 19,
37, 0, 21, 0, 24, 0, 25, 0, 26, 51, 37, 0, 0, 21, 0, 24, 0, 25, 0, 26,
27, 0, 7, 0, 5, 0, 10, 111, 110, 0, 52, 27, 0, 7, 0, 5, 0, 10, 112, 111,
0, 0, 0, 34, 0, 0, 114, 0, 112, 0, 0, 0, 0, 0, 34, 0, 0, 115, 0, 113,
0, 0, 77, 76, 0, 75, 74, 32, 0, 0, 0, 0, 0, 78, 77, 0, 76, 75, 32, 0,
59, 60, 43, 67, 68, 0, 41, 0, 0, 67, 0, 60, 61, 44, 68, 69, 0, 42, 0, 0,
36, 0, 0, 0, 0, 50, 0, 0, 12, 0, 68, 36, 0, 0, 0, 0, 0, 51, 0, 0,
13, 102, 103, 104, 0, 0, 93, 94, 0, 0, 12, 0, 13, 103, 104, 105, 0, 0, 94, 95,
0, 0, 0, 0, 0, 0, 0, 0, 113, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 80, 0, 0, 30, 31, 0, 0, 114, 0, 0, 0, 0, 81, 0, 0, 30, 31,
0, 39, 0, 46, 48, 52, 53, 0, 8, 6, 0, 0, 38, 0, 40, 0, 47, 49, 53, 54,
0, 107, 105, 106, 0, 0, 0, 124, 123, 122, 0, 8, 6, 0, 108, 106, 107, 0, 0, 0,
0, 0, 115, 116, 117, 118, 119, 0, 0, 89, 125, 124, 123, 0, 0, 116, 117, 118, 119, 120,
95, 90, 0, 78, 66, 0, 0, 82, 81, 0, 0, 0, 90, 96, 91, 0, 79, 67, 0, 0,
0, 0, 0, 0, 100, 96, 0, 120, 121, 0, 83, 82, 0, 0, 0, 0, 0, 101, 97, 0,
0, 0, 79, 38, 83, 0, 40, 47, 49, 54, 121, 122, 0, 0, 0, 80, 39, 84, 0, 41,
0, 0, 99, 91, 0, 0, 84, 101, 0, 0, 48, 50, 55, 0, 0, 100, 92, 0, 0, 85,
85, 97, 0, 92 102, 0, 0, 86, 98, 0, 93
}; };
/* YYDEFGOTO[NTERM-NUM]. */ /* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] = static const yytype_int16 yydefgoto[] =
{ {
-1, 1, 3, 23, 139, 137, 24, 27, 54, 56, -1, 1, 3, 23, 141, 139, 24, 27, 54, 56,
50, 41, 79, 70, 82, 62, 75, 84, 86, 88, 50, 41, 79, 70, 83, 62, 75, 85, 87, 89,
90, 51, 63, 52, 64, 43, 53, 171, 208, 44, 91, 51, 63, 52, 64, 43, 53, 174, 211, 44,
45, 46, 47, 102, 184, 48, 107 45, 46, 47, 103, 187, 48, 108
}; };
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */ STATE-NUM. */
#define YYPACT_NINF -107 #define YYPACT_NINF -63
static const yytype_int16 yypact[] = static const yytype_int16 yypact[] =
{ {
-107, 9, -107, 151, -28, -19, 235, 255, 255, 302, -63, 15, -63, 154, -17, 9, 238, 258, 258, 305,
175, 6, 282, 34, 363, 255, 255, 255, 363, -3, 178, 6, 285, 343, 401, 258, 258, 258, 401, 42,
-6, 5, -107, -107, 4, -107, -107, -107, 373, 373, 13, -8, -63, -63, 21, -63, -63, -63, 451, 451,
-107, -107, -107, -107, -107, -107, 128, -107, 302, 343, -63, -63, -63, -63, -63, -63, 34, -63, 305, 366,
373, -107, -107, -107, -107, -107, -107, 17, 19, 115, 451, -63, -63, -63, -63, -63, -63, 19, 24, 359,
-107, -107, 15, -107, -107, 27, -107, 42, 302, 128, -63, -63, 26, -63, -63, 38, -63, 43, 305, 34,
72, 208, -107, -107, -107, -107, -107, -107, -107, 52, 41, 211, -63, -63, -63, -63, -63, -63, -63, 53,
-107, 44, 302, -107, -107, -107, 72, 359, 373, -107, -63, 92, 305, -63, -63, -63, 41, 392, 451, -63,
-107, 55, -107, 71, -107, 76, -107, 81, -107, 84, -63, 60, 71, -63, 73, -63, 76, -63, 82, -63,
-107, 97, -107, 373, -107, 373, -107, -107, -107, 142, 83, -63, 89, -63, 451, -63, 451, -63, -63, -63,
373, 373, 114, -107, 1, 116, -107, 102, -107, 129, 131, 451, 451, 94, -63, 0, 97, -63, 69, -63,
66, 385, -107, -107, 387, -107, -107, -107, 302, 255, 112, -6, 407, -63, -63, 416, -63, -63, -63, 305,
-107, -107, -107, 114, -107, 329, -107, 168, 373, -107, 258, -63, -63, -63, 94, -63, 332, -63, 121, 451,
-107, 149, 18, 302, 302, 302, 397, 151, 447, 151, -63, -63, 392, 122, 155, 305, 305, 305, 418, 154,
447, 72, -107, -107, 47, 373, 134, -107, 373, 373, 476, 154, 476, 41, -63, -63, 8, 451, 107, -63,
373, 176, 179, 373, 373, 373, 373, 373, -107, 182, 451, 451, 451, 151, 152, 451, 451, 451, 451, 451,
3, 148, 152, -107, 401, 153, -107, -107, 158, 166, -63, 150, 2, 115, 116, -63, 427, 119, -63, -63,
14, -107, 167, 154, 189, -107, -107, 187, -107, -107, 120, 137, -63, 14, -63, 141, 148, 156, -63, -63,
188, -107, -107, -107, 186, 190, 202, 456, 464, 471, 157, -63, -63, 153, -63, -63, -63, 158, 161, 176,
373, 373, 146, 146, -107, -107, -107, 373, 373, 192, 102, 495, 502, 451, 451, 49, 49, -63, -63, -63,
-107, -107, 203, -107, -107, 191, 223, 242, -107, 205, 451, 451, 168, -63, -63, 187, -63, -63, 167, 207,
222, 224, 191, 228, -107, -107, 249, 216, 216, 214, 226, -63, 189, 205, 206, 167, 210, -63, -63, 231,
215, 233, -107, -107, 261, 244, -107, -107, -107, -107, 219, 219, 208, 209, 220, -63, -63, 244, 230, -63,
230, 373, -107, -107, 264, 250, -107, -107, 232, 373, -63, -63, -63, 214, 451, -63, -63, 251, 235, -63,
-107, -107, 238, -107 -63, 217, 451, -63, -63, 218, -63
}; };
/* YYPGOTO[NTERM-NUM]. */ /* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] = static const yytype_int16 yypgoto[] =
{ {
-107, -107, -107, -106, -107, -107, -107, 269, -107, -107, -63, -63, -63, -40, -63, -63, -63, 256, -63, -63,
-107, 273, -107, -107, -107, -107, -107, -107, -107, -107, -63, 261, -63, -63, -63, -63, -63, -63, -63, -63,
-107, -2, 236, 0, -1, -8, -9, 85, -107, 10, -63, -1, 213, 5, -11, -3, -9, 65, -63, 10,
-4, -5, 11, -39, -107, -10, -61 4, -4, -2, -43, -63, -10, -62
}; };
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
...@@ -710,108 +696,114 @@ static const yytype_int16 yypgoto[] = ...@@ -710,108 +696,114 @@ static const yytype_int16 yypgoto[] =
#define YYTABLE_NINF -1 #define YYTABLE_NINF -1
static const yytype_uint8 yytable[] = static const yytype_uint8 yytable[] =
{ {
69, 66, 65, 81, 42, 68, 67, 57, 55, 2, 69, 66, 80, 82, 81, 42, 68, 65, 57, 71,
42, 145, 80, 198, 25, 85, 87, 89, 97, 98, 147, 42, 201, 55, 67, 2, 124, 125, 98, 99,
123, 124, 71, 206, 83, 26, 28, 29, 91, 106, 86, 88, 90, 209, 84, 25, 162, 163, 92, 107,
108, 178, 138, 179, 140, 94, 103, 129, 92, 116, 109, 164, 140, 130, 142, 96, 184, 104, 185, 117,
93, 207, 28, 29, 36, 30, 96, 146, 95, 199, 100, 210, 101, 102, 36, 186, 148, 116, 202, 101,
120, 69, 66, 65, 121, 128, 68, 67, 37, 117, 102, 69, 66, 26, 95, 121, 123, 68, 65, 157,
115, 30, 109, 78, 110, 170, 40, 81, 106, 122, 158, 159, 122, 97, 110, 67, 131, 82, 107, 111,
103, 118, 76, 60, 37, 181, 130, 182, 77, 78, 118, 104, 150, 151, 152, 153, 154, 155, 156, 157,
100, 101, 40, 106, 183, 106, 119, 187, 188, 189, 158, 159, 119, 93, 107, 94, 107, 120, 190, 191,
142, 143, 192, 193, 194, 195, 196, 127, 160, 161, 192, 144, 145, 195, 196, 197, 198, 199, 128, 181,
131, 98, 180, 162, 106, 148, 149, 150, 151, 152, 183, 182, 99, 129, 132, 107, 151, 152, 153, 154,
153, 154, 155, 156, 157, 132, 166, 120, 169, 167, 155, 156, 157, 158, 159, 160, 133, 134, 168, 171,
133, 121, 172, 28, 111, 134, 177, 176, 135, 217, 135, 172, 82, 121, 175, 169, 136, 137, 180, 179,
218, 173, 174, 175, 99, 185, 100, 101, 106, 106, 122, 220, 221, 138, 176, 177, 178, 188, 143, 146,
106, 136, 30, 106, 106, 106, 106, 106, 158, 141, 107, 107, 107, 149, 161, 107, 107, 107, 107, 107,
112, 113, 4, 36, 98, 37, 155, 156, 157, 144, 170, 170, 189, 162, 163, 4, 99, 193, 164, 194,
114, 159, 147, 40, 5, 6, 7, 8, 9, 10, 200, 203, 204, 28, 29, 206, 207, 5, 6, 7,
11, 12, 13, 14, 15, 16, 17, 18, 168, 186, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
106, 106, 190, 28, 29, 58, 191, 219, 220, 19, 18, 208, 30, 107, 107, 212, 28, 29, 58, 213,
20, 21, 197, 22, 200, 210, 223, 168, 201, 203, 222, 223, 19, 20, 21, 37, 22, 214, 216, 226,
160, 161, 30, 229, 204, 162, 31, 32, 33, 34, 78, 215, 173, 40, 217, 30, 232, 218, 219, 31,
205, 209, 35, 59, 60, 37, 28, 29, 125, 61, 32, 33, 34, 224, 49, 35, 59, 60, 37, 28,
39, 238, 49, 40, 153, 154, 155, 156, 157, 242, 29, 126, 61, 39, 241, 49, 40, 155, 156, 157,
211, 212, 214, 213, 216, 30, 215, 221, 49, 31, 158, 159, 245, 225, 227, 228, 173, 230, 30, 231,
32, 33, 34, 28, 29, 35, 59, 60, 37, 222, 233, 234, 31, 32, 33, 34, 28, 29, 35, 59,
224, 225, 170, 39, 227, 49, 40, 228, 230, 231, 60, 37, 237, 238, 235, 236, 39, 239, 49, 40,
232, 233, 30, 28, 29, 234, 31, 32, 33, 34, 240, 242, 243, 244, 246, 30, 28, 29, 73, 31,
235, 236, 35, 36, 239, 37, 237, 240, 241, 38, 32, 33, 34, 74, 127, 35, 36, 229, 37, 0,
39, 73, 30, 40, 243, 74, 31, 32, 33, 34, 0, 0, 38, 39, 0, 30, 40, 0, 0, 31,
28, 29, 35, 36, 226, 37, 0, 126, 0, 0, 32, 33, 34, 28, 29, 35, 36, 0, 37, 0,
39, 0, 49, 40, 0, 0, 0, 0, 0, 30, 0, 0, 0, 39, 0, 49, 40, 0, 0, 0,
28, 29, 0, 31, 32, 33, 34, 0, 0, 35, 0, 0, 30, 28, 29, 0, 31, 32, 33, 34,
36, 0, 37, 0, 0, 0, 72, 39, 0, 30, 0, 0, 35, 36, 0, 37, 0, 0, 0, 72,
40, 0, 0, 31, 32, 33, 34, 28, 29, 35, 39, 0, 30, 40, 0, 0, 31, 32, 33, 34,
36, 0, 37, 0, 0, 0, 0, 39, 0, 0, 28, 29, 35, 36, 0, 37, 0, 0, 0, 0,
40, 28, 29, 0, 0, 0, 30, 0, 0, 0, 39, 28, 29, 40, 0, 0, 0, 0, 0, 30,
31, 32, 33, 34, 0, 0, 35, 28, 29, 37, 0, 0, 0, 31, 32, 33, 34, 28, 112, 35,
30, 28, 29, 0, 39, 104, 0, 40, 0, 0, 30, 0, 37, 0, 28, 29, 0, 39, 0, 0,
105, 28, 29, 37, 0, 0, 30, 0, 78, 0, 40, 76, 60, 37, 0, 0, 30, 77, 78, 0,
30, 40, 0, 28, 29, 28, 164, 76, 60, 37, 49, 40, 0, 30, 113, 114, 0, 36, 105, 37,
30, 36, 0, 37, 78, 28, 29, 40, 39, 28, 28, 29, 0, 106, 115, 0, 37, 40, 0, 28,
29, 40, 30, 37, 30, 0, 0, 0, 78, 0, 29, 78, 0, 0, 40, 28, 29, 0, 0, 30,
163, 40, 165, 0, 30, 37, 0, 37, 30, 0, 0, 0, 0, 0, 28, 166, 28, 29, 30, 0,
78, 0, 78, 40, 0, 40, 202, 37, 0, 0, 76, 60, 37, 0, 30, 28, 29, 78, 0, 36,
0, 37, 78, 0, 49, 40, 78, 0, 0, 40, 40, 37, 165, 30, 0, 30, 39, 37, 0, 40,
148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 0, 167, 78, 0, 30, 40, 37, 0, 37, 28,
149, 150, 151, 152, 153, 154, 155, 156, 157, 150, 29, 78, 205, 78, 40, 49, 40, 37, 0, 0,
151, 152, 153, 154, 155, 156, 157, 151, 152, 153, 0, 0, 78, 0, 0, 40, 0, 0, 30, 150,
154, 155, 156, 157 151, 152, 153, 154, 155, 156, 157, 158, 159, 0,
0, 37, 0, 0, 0, 0, 78, 0, 0, 40,
152, 153, 154, 155, 156, 157, 158, 159, 153, 154,
155, 156, 157, 158, 159
}; };
static const yytype_int16 yycheck[] = static const yytype_int16 yycheck[] =
{ {
10, 10, 10, 13, 6, 10, 10, 9, 8, 0, 10, 10, 13, 13, 13, 6, 10, 10, 9, 11,
12, 10, 13, 10, 42, 15, 16, 17, 28, 29, 10, 12, 10, 8, 10, 0, 59, 60, 28, 29,
59, 60, 11, 9, 14, 44, 8, 9, 18, 39, 15, 16, 17, 9, 14, 42, 32, 33, 18, 39,
40, 137, 93, 139, 95, 41, 38, 76, 41, 49, 40, 37, 94, 76, 96, 43, 28, 38, 30, 49,
43, 27, 8, 9, 38, 27, 42, 46, 43, 46, 6, 27, 8, 9, 38, 37, 46, 49, 46, 8,
58, 61, 61, 61, 58, 11, 61, 61, 40, 44, 9, 61, 61, 44, 41, 58, 58, 61, 61, 10,
49, 27, 45, 45, 45, 47, 48, 77, 78, 58, 11, 12, 58, 42, 45, 61, 77, 77, 78, 45,
72, 44, 38, 39, 40, 28, 77, 30, 44, 45, 44, 72, 3, 4, 5, 6, 7, 8, 9, 10,
8, 9, 48, 93, 37, 95, 44, 148, 149, 150, 11, 12, 44, 41, 94, 43, 96, 44, 150, 151,
100, 101, 153, 154, 155, 156, 157, 45, 32, 33, 152, 101, 102, 155, 156, 157, 158, 159, 45, 139,
45, 111, 141, 37, 114, 3, 4, 5, 6, 7, 143, 141, 112, 11, 44, 115, 4, 5, 6, 7,
8, 9, 10, 11, 12, 44, 118, 125, 128, 119, 8, 9, 10, 11, 12, 46, 45, 44, 119, 129,
44, 125, 132, 8, 9, 44, 136, 136, 44, 190, 44, 132, 132, 126, 134, 120, 44, 44, 138, 138,
191, 133, 134, 135, 6, 145, 8, 9, 148, 149, 126, 193, 194, 44, 135, 136, 137, 147, 7, 45,
150, 44, 27, 153, 154, 155, 156, 157, 46, 7, 150, 151, 152, 46, 32, 155, 156, 157, 158, 159,
35, 36, 1, 38, 164, 40, 10, 11, 12, 45, 29, 29, 45, 32, 33, 1, 166, 6, 37, 7,
45, 32, 46, 48, 13, 14, 15, 16, 17, 18, 10, 46, 46, 8, 9, 46, 46, 13, 14, 15,
19, 20, 21, 22, 23, 24, 25, 26, 29, 45, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
190, 191, 6, 8, 9, 10, 7, 197, 198, 38, 26, 44, 27, 193, 194, 44, 8, 9, 10, 41,
39, 40, 10, 42, 46, 41, 205, 29, 46, 46, 200, 201, 38, 39, 40, 40, 42, 41, 45, 208,
32, 33, 27, 212, 46, 37, 31, 32, 33, 34, 45, 44, 47, 48, 46, 27, 215, 46, 32, 31,
44, 44, 37, 38, 39, 40, 8, 9, 10, 44, 32, 33, 34, 45, 47, 37, 38, 39, 40, 8,
45, 231, 47, 48, 8, 9, 10, 11, 12, 239, 9, 10, 44, 45, 234, 47, 48, 8, 9, 10,
41, 44, 46, 45, 32, 27, 46, 45, 47, 31, 11, 12, 242, 46, 27, 9, 47, 32, 27, 33,
32, 33, 34, 8, 9, 37, 38, 39, 40, 46, 30, 10, 31, 32, 33, 34, 8, 9, 37, 38,
27, 9, 47, 45, 32, 47, 48, 33, 30, 10, 39, 40, 32, 9, 46, 46, 45, 27, 47, 48,
46, 46, 27, 8, 9, 32, 31, 32, 33, 34, 46, 10, 27, 46, 46, 27, 8, 9, 12, 31,
9, 27, 37, 38, 10, 40, 46, 27, 46, 44, 32, 33, 34, 12, 61, 37, 38, 212, 40, -1,
45, 12, 27, 48, 46, 12, 31, 32, 33, 34, -1, -1, 44, 45, -1, 27, 48, -1, -1, 31,
8, 9, 37, 38, 209, 40, -1, 61, -1, -1, 32, 33, 34, 8, 9, 37, 38, -1, 40, -1,
45, -1, 47, 48, -1, -1, -1, -1, -1, 27, -1, -1, -1, 45, -1, 47, 48, -1, -1, -1,
8, 9, -1, 31, 32, 33, 34, -1, -1, 37, -1, -1, 27, 8, 9, -1, 31, 32, 33, 34,
38, -1, 40, -1, -1, -1, 44, 45, -1, 27, -1, -1, 37, 38, -1, 40, -1, -1, -1, 44,
48, -1, -1, 31, 32, 33, 34, 8, 9, 37, 45, -1, 27, 48, -1, -1, 31, 32, 33, 34,
38, -1, 40, -1, -1, -1, -1, 45, -1, -1, 8, 9, 37, 38, -1, 40, -1, -1, -1, -1,
48, 8, 9, -1, -1, -1, 27, -1, -1, -1, 45, 8, 9, 48, -1, -1, -1, -1, -1, 27,
31, 32, 33, 34, -1, -1, 37, 8, 9, 40, -1, -1, -1, 31, 32, 33, 34, 8, 9, 37,
27, 8, 9, -1, 45, 32, -1, 48, -1, -1, 27, -1, 40, -1, 8, 9, -1, 45, -1, -1,
37, 8, 9, 40, -1, -1, 27, -1, 45, -1, 48, 38, 39, 40, -1, -1, 27, 44, 45, -1,
27, 48, -1, 8, 9, 8, 9, 38, 39, 40, 47, 48, -1, 27, 35, 36, -1, 38, 32, 40,
27, 38, -1, 40, 45, 8, 9, 48, 45, 8, 8, 9, -1, 37, 45, -1, 40, 48, -1, 8,
9, 48, 27, 40, 27, -1, -1, -1, 45, -1, 9, 45, -1, -1, 48, 8, 9, -1, -1, 27,
35, 48, 35, -1, 27, 40, -1, 40, 27, -1, -1, -1, -1, -1, 8, 9, 8, 9, 27, -1,
45, -1, 45, 48, -1, 48, 35, 40, -1, -1, 38, 39, 40, -1, 27, 8, 9, 45, -1, 38,
-1, 40, 45, -1, 47, 48, 45, -1, -1, 48, 48, 40, 35, 27, -1, 27, 45, 40, -1, 48,
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, -1, 35, 45, -1, 27, 48, 40, -1, 40, 8,
4, 5, 6, 7, 8, 9, 10, 11, 12, 5, 9, 45, 35, 45, 48, 47, 48, 40, -1, -1,
6, 7, 8, 9, 10, 11, 12, 6, 7, 8, -1, -1, 45, -1, -1, 48, -1, -1, 27, 3,
9, 10, 11, 12 4, 5, 6, 7, 8, 9, 10, 11, 12, -1,
-1, 40, -1, -1, -1, -1, 45, -1, -1, 48,
5, 6, 7, 8, 9, 10, 11, 12, 6, 7,
8, 9, 10, 11, 12
}; };
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
...@@ -826,23 +818,23 @@ static const yytype_uint8 yystos[] = ...@@ -826,23 +818,23 @@ static const yytype_uint8 yystos[] =
59, 70, 72, 75, 57, 72, 58, 70, 10, 38, 59, 70, 72, 75, 57, 72, 58, 70, 10, 38,
39, 44, 64, 71, 73, 74, 75, 79, 80, 84, 39, 44, 64, 71, 73, 74, 75, 79, 80, 84,
62, 81, 44, 56, 60, 65, 38, 44, 45, 61, 62, 81, 44, 56, 60, 65, 38, 44, 45, 61,
73, 84, 63, 78, 66, 72, 67, 72, 68, 72, 73, 75, 84, 63, 78, 66, 72, 67, 72, 68,
69, 78, 41, 43, 41, 43, 42, 84, 84, 6, 72, 69, 78, 41, 43, 41, 43, 42, 84, 84,
8, 9, 82, 70, 32, 37, 84, 85, 84, 45, 6, 8, 9, 82, 70, 32, 37, 84, 85, 84,
45, 9, 35, 36, 45, 81, 84, 44, 44, 44, 45, 45, 9, 35, 36, 45, 81, 84, 44, 44,
74, 79, 81, 82, 82, 10, 71, 45, 11, 82, 44, 74, 79, 81, 82, 82, 10, 71, 45, 11,
73, 45, 44, 44, 44, 44, 44, 54, 85, 53, 82, 73, 44, 45, 44, 44, 44, 44, 44, 54,
85, 7, 84, 84, 45, 10, 46, 46, 3, 4, 85, 53, 85, 7, 84, 84, 45, 10, 46, 46,
5, 6, 7, 8, 9, 10, 11, 12, 46, 32, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
32, 33, 37, 35, 9, 35, 70, 72, 29, 84, 46, 32, 32, 33, 37, 35, 9, 35, 70, 72,
47, 76, 84, 70, 70, 70, 75, 84, 52, 52, 29, 84, 73, 47, 76, 84, 70, 70, 70, 75,
82, 28, 30, 37, 83, 84, 45, 85, 85, 85, 84, 52, 52, 82, 28, 30, 37, 83, 84, 45,
6, 7, 85, 85, 85, 85, 85, 10, 10, 46, 85, 85, 85, 6, 7, 85, 85, 85, 85, 85,
46, 46, 35, 46, 46, 44, 9, 27, 77, 44, 10, 10, 46, 46, 46, 35, 46, 46, 44, 9,
41, 41, 44, 45, 46, 46, 32, 85, 85, 84, 27, 77, 44, 41, 41, 44, 45, 46, 46, 32,
84, 45, 46, 75, 27, 9, 76, 32, 33, 75, 85, 85, 84, 84, 45, 46, 75, 27, 9, 76,
30, 10, 46, 46, 32, 9, 27, 46, 84, 10, 32, 33, 75, 30, 10, 46, 46, 32, 9, 27,
27, 46, 84, 46 46, 84, 10, 27, 46, 84, 46
}; };
#define yyerrok (yyerrstatus = 0) #define yyerrok (yyerrstatus = 0)
...@@ -916,7 +908,7 @@ while (YYID (0)) ...@@ -916,7 +908,7 @@ while (YYID (0))
we won't break user code: when these are the locations we know. */ we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT #ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \ # define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \ fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \ (Loc).first_line, (Loc).first_column, \
...@@ -1027,20 +1019,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) ...@@ -1027,20 +1019,17 @@ yy_symbol_print (yyoutput, yytype, yyvaluep)
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
static void static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else #else
static void static void
yy_stack_print (yybottom, yytop) yy_stack_print (bottom, top)
yytype_int16 *yybottom; yytype_int16 *bottom;
yytype_int16 *yytop; yytype_int16 *top;
#endif #endif
{ {
YYFPRINTF (stderr, "Stack now"); YYFPRINTF (stderr, "Stack now");
for (; yybottom <= yytop; yybottom++) for (; bottom <= top; ++bottom)
{ YYFPRINTF (stderr, " %d", *bottom);
int yybot = *yybottom;
YYFPRINTF (stderr, " %d", yybot);
}
YYFPRINTF (stderr, "\n"); YYFPRINTF (stderr, "\n");
} }
...@@ -1074,11 +1063,11 @@ yy_reduce_print (yyvsp, yyrule) ...@@ -1074,11 +1063,11 @@ yy_reduce_print (yyvsp, yyrule)
/* The symbols being reduced. */ /* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++) for (yyi = 0; yyi < yynrhs; yyi++)
{ {
YYFPRINTF (stderr, " $%d = ", yyi + 1); fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)]) &(yyvsp[(yyi + 1) - (yynrhs)])
); );
YYFPRINTF (stderr, "\n"); fprintf (stderr, "\n");
} }
} }
...@@ -1358,8 +1347,10 @@ yydestruct (yymsg, yytype, yyvaluep) ...@@ -1358,8 +1347,10 @@ yydestruct (yymsg, yytype, yyvaluep)
break; break;
} }
} }
/* Prevent warnings from -Wmissing-prototypes. */ /* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus #if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM); int yyparse (void *YYPARSE_PARAM);
...@@ -1375,10 +1366,11 @@ int yyparse (); ...@@ -1375,10 +1366,11 @@ int yyparse ();
#endif /* ! YYPARSE_PARAM */ #endif /* ! YYPARSE_PARAM */
/* The lookahead symbol. */
/* The look-ahead symbol. */
int yychar; int yychar;
/* The semantic value of the lookahead symbol. */ /* The semantic value of the look-ahead symbol. */
YYSTYPE yylval; YYSTYPE yylval;
/* Number of syntax errors so far. */ /* Number of syntax errors so far. */
...@@ -1386,9 +1378,9 @@ int yynerrs; ...@@ -1386,9 +1378,9 @@ int yynerrs;
/*-------------------------. /*----------.
| yyparse or yypush_parse. | | yyparse. |
`-------------------------*/ `----------*/
#ifdef YYPARSE_PARAM #ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \ #if (defined __STDC__ || defined __C99__FUNC__ \
...@@ -1413,56 +1405,53 @@ yyparse () ...@@ -1413,56 +1405,53 @@ yyparse ()
#endif #endif
{ {
int yystate; int yystate;
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */ /* Number of tokens to shift before error messages enabled. */
int yyerrstatus; int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
/* The stacks and their tools: /* Three stacks and their tools:
`yyss': related to states. `yyss': related to states,
`yyvs': related to semantic values. `yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */ to reallocate them elsewhere. */
/* The state stack. */ /* The state stack. */
yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss; yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp; yytype_int16 *yyssp;
/* The semantic value stack. */ /* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs; YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp; YYSTYPE *yyvsp;
YYSIZE_T yystacksize;
int yyn;
int yyresult; #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* Lookahead token as an internal (translated) token number. */
int yytoken; YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the /* The variables used to return semantic value and location from the
action routines. */ action routines. */
YYSTYPE yyval; YYSTYPE yyval;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
/* The number of symbols on the RHS of the reduced rule. /* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */ Keep to zero when no symbol should be popped. */
int yylen = 0; int yylen = 0;
yytoken = 0;
yyss = yyssa;
yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n")); YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0; yystate = 0;
...@@ -1474,6 +1463,7 @@ yyparse () ...@@ -1474,6 +1463,7 @@ yyparse ()
Waste one element of value and location stack Waste one element of value and location stack
so that they stay on the same level as the state stack. so that they stay on the same level as the state stack.
The wasted elements are never initialized. */ The wasted elements are never initialized. */
yyssp = yyss; yyssp = yyss;
yyvsp = yyvs; yyvsp = yyvs;
...@@ -1503,6 +1493,7 @@ yyparse () ...@@ -1503,6 +1493,7 @@ yyparse ()
YYSTYPE *yyvs1 = yyvs; YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss; yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the /* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might conditional around just the two extra args, but that might
...@@ -1510,6 +1501,7 @@ yyparse () ...@@ -1510,6 +1501,7 @@ yyparse ()
yyoverflow (YY_("memory exhausted"), yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp), &yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp), &yyvs1, yysize * sizeof (*yyvsp),
&yystacksize); &yystacksize);
yyss = yyss1; yyss = yyss1;
...@@ -1532,8 +1524,9 @@ yyparse () ...@@ -1532,8 +1524,9 @@ yyparse ()
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr) if (! yyptr)
goto yyexhaustedlab; goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyvs);
# undef YYSTACK_RELOCATE # undef YYSTACK_RELOCATE
if (yyss1 != yyssa) if (yyss1 != yyssa)
YYSTACK_FREE (yyss1); YYSTACK_FREE (yyss1);
...@@ -1544,6 +1537,7 @@ yyparse () ...@@ -1544,6 +1537,7 @@ yyparse ()
yyssp = yyss + yysize - 1; yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1; yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n", YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize)); (unsigned long int) yystacksize));
...@@ -1553,9 +1547,6 @@ yyparse () ...@@ -1553,9 +1547,6 @@ yyparse ()
YYDPRINTF ((stderr, "Entering state %d\n", yystate)); YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup; goto yybackup;
/*-----------. /*-----------.
...@@ -1564,16 +1555,16 @@ yyparse () ...@@ -1564,16 +1555,16 @@ yyparse ()
yybackup: yybackup:
/* Do appropriate processing given the current state. Read a /* Do appropriate processing given the current state. Read a
lookahead token if we need one and don't already have one. */ look-ahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to lookahead token. */ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate]; yyn = yypact[yystate];
if (yyn == YYPACT_NINF) if (yyn == YYPACT_NINF)
goto yydefault; goto yydefault;
/* Not known => get a lookahead token if don't already have one. */ /* Not known => get a look-ahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY) if (yychar == YYEMPTY)
{ {
YYDPRINTF ((stderr, "Reading a token: ")); YYDPRINTF ((stderr, "Reading a token: "));
...@@ -1605,15 +1596,19 @@ yybackup: ...@@ -1605,15 +1596,19 @@ yybackup:
goto yyreduce; goto yyreduce;
} }
if (yyn == YYFINAL)
YYACCEPT;
/* Count tokens shifted since error; after three, turn off error /* Count tokens shifted since error; after three, turn off error
status. */ status. */
if (yyerrstatus) if (yyerrstatus)
yyerrstatus--; yyerrstatus--;
/* Shift the lookahead token. */ /* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token. */ /* Discard the shifted token unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY; yychar = YYEMPTY;
yystate = yyn; yystate = yyn;
...@@ -1654,8 +1649,6 @@ yyreduce: ...@@ -1654,8 +1649,6 @@ yyreduce:
switch (yyn) switch (yyn)
{ {
case 3: case 3:
/* Line 1455 of yacc.c */
#line 70 "a.y" #line 70 "a.y"
{ {
stmtline = lineno; stmtline = lineno;
...@@ -1663,8 +1656,6 @@ yyreduce: ...@@ -1663,8 +1656,6 @@ yyreduce:
break; break;
case 5: case 5:
/* Line 1455 of yacc.c */
#line 77 "a.y" #line 77 "a.y"
{ {
if((yyvsp[(1) - (2)].sym)->value != pc) if((yyvsp[(1) - (2)].sym)->value != pc)
...@@ -1674,8 +1665,6 @@ yyreduce: ...@@ -1674,8 +1665,6 @@ yyreduce:
break; break;
case 7: case 7:
/* Line 1455 of yacc.c */
#line 84 "a.y" #line 84 "a.y"
{ {
(yyvsp[(1) - (2)].sym)->type = LLAB; (yyvsp[(1) - (2)].sym)->type = LLAB;
...@@ -1684,8 +1673,6 @@ yyreduce: ...@@ -1684,8 +1673,6 @@ yyreduce:
break; break;
case 12: case 12:
/* Line 1455 of yacc.c */
#line 95 "a.y" #line 95 "a.y"
{ {
(yyvsp[(1) - (3)].sym)->type = LVAR; (yyvsp[(1) - (3)].sym)->type = LVAR;
...@@ -1694,8 +1681,6 @@ yyreduce: ...@@ -1694,8 +1681,6 @@ yyreduce:
break; break;
case 13: case 13:
/* Line 1455 of yacc.c */
#line 100 "a.y" #line 100 "a.y"
{ {
if((yyvsp[(1) - (3)].sym)->value != (yyvsp[(3) - (3)].lval)) if((yyvsp[(1) - (3)].sym)->value != (yyvsp[(3) - (3)].lval))
...@@ -1705,106 +1690,76 @@ yyreduce: ...@@ -1705,106 +1690,76 @@ yyreduce:
break; break;
case 14: case 14:
/* Line 1455 of yacc.c */
#line 105 "a.y" #line 105 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 15: case 15:
/* Line 1455 of yacc.c */
#line 106 "a.y" #line 106 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 16: case 16:
/* Line 1455 of yacc.c */
#line 107 "a.y" #line 107 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 17: case 17:
/* Line 1455 of yacc.c */
#line 108 "a.y" #line 108 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 18: case 18:
/* Line 1455 of yacc.c */
#line 109 "a.y" #line 109 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 19: case 19:
/* Line 1455 of yacc.c */
#line 110 "a.y" #line 110 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 20: case 20:
/* Line 1455 of yacc.c */
#line 111 "a.y" #line 111 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 21: case 21:
/* Line 1455 of yacc.c */
#line 112 "a.y" #line 112 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 22: case 22:
/* Line 1455 of yacc.c */
#line 113 "a.y" #line 113 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 23: case 23:
/* Line 1455 of yacc.c */
#line 114 "a.y" #line 114 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 24: case 24:
/* Line 1455 of yacc.c */
#line 115 "a.y" #line 115 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 25: case 25:
/* Line 1455 of yacc.c */
#line 116 "a.y" #line 116 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 26: case 26:
/* Line 1455 of yacc.c */
#line 117 "a.y" #line 117 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 27: case 27:
/* Line 1455 of yacc.c */
#line 118 "a.y" #line 118 "a.y"
{ outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); } { outcode((yyvsp[(1) - (2)].lval), &(yyvsp[(2) - (2)].gen2)); }
break; break;
case 28: case 28:
/* Line 1455 of yacc.c */
#line 121 "a.y" #line 121 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
...@@ -1813,8 +1768,6 @@ yyreduce: ...@@ -1813,8 +1768,6 @@ yyreduce:
break; break;
case 29: case 29:
/* Line 1455 of yacc.c */
#line 126 "a.y" #line 126 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
...@@ -1823,8 +1776,6 @@ yyreduce: ...@@ -1823,8 +1776,6 @@ yyreduce:
break; break;
case 30: case 30:
/* Line 1455 of yacc.c */
#line 133 "a.y" #line 133 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
...@@ -1833,8 +1784,6 @@ yyreduce: ...@@ -1833,8 +1784,6 @@ yyreduce:
break; break;
case 31: case 31:
/* Line 1455 of yacc.c */
#line 140 "a.y" #line 140 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
...@@ -1843,8 +1792,6 @@ yyreduce: ...@@ -1843,8 +1792,6 @@ yyreduce:
break; break;
case 32: case 32:
/* Line 1455 of yacc.c */
#line 147 "a.y" #line 147 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (2)].gen); (yyval.gen2).from = (yyvsp[(1) - (2)].gen);
...@@ -1853,8 +1800,6 @@ yyreduce: ...@@ -1853,8 +1800,6 @@ yyreduce:
break; break;
case 33: case 33:
/* Line 1455 of yacc.c */
#line 152 "a.y" #line 152 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (1)].gen); (yyval.gen2).from = (yyvsp[(1) - (1)].gen);
...@@ -1863,8 +1808,6 @@ yyreduce: ...@@ -1863,8 +1808,6 @@ yyreduce:
break; break;
case 34: case 34:
/* Line 1455 of yacc.c */
#line 159 "a.y" #line 159 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
...@@ -1873,8 +1816,6 @@ yyreduce: ...@@ -1873,8 +1816,6 @@ yyreduce:
break; break;
case 35: case 35:
/* Line 1455 of yacc.c */
#line 164 "a.y" #line 164 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
...@@ -1883,8 +1824,6 @@ yyreduce: ...@@ -1883,8 +1824,6 @@ yyreduce:
break; break;
case 36: case 36:
/* Line 1455 of yacc.c */
#line 171 "a.y" #line 171 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
...@@ -1893,8 +1832,6 @@ yyreduce: ...@@ -1893,8 +1832,6 @@ yyreduce:
break; break;
case 37: case 37:
/* Line 1455 of yacc.c */
#line 176 "a.y" #line 176 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
...@@ -1903,9 +1840,15 @@ yyreduce: ...@@ -1903,9 +1840,15 @@ yyreduce:
break; break;
case 38: case 38:
#line 181 "a.y"
{
(yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen);
}
break;
/* Line 1455 of yacc.c */ case 39:
#line 183 "a.y" #line 188 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval);
...@@ -1913,20 +1856,16 @@ yyreduce: ...@@ -1913,20 +1856,16 @@ yyreduce:
} }
break; break;
case 39: case 40:
#line 196 "a.y"
/* Line 1455 of yacc.c */
#line 191 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 40: case 41:
#line 201 "a.y"
/* Line 1455 of yacc.c */
#line 196 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval);
...@@ -1934,30 +1873,24 @@ yyreduce: ...@@ -1934,30 +1873,24 @@ yyreduce:
} }
break; break;
case 41: case 42:
#line 209 "a.y"
/* Line 1455 of yacc.c */
#line 204 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
(yyval.gen2).to = (yyvsp[(2) - (2)].gen); (yyval.gen2).to = (yyvsp[(2) - (2)].gen);
} }
break; break;
case 42: case 43:
#line 214 "a.y"
/* Line 1455 of yacc.c */
#line 209 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
(yyval.gen2).to = (yyvsp[(1) - (1)].gen); (yyval.gen2).to = (yyvsp[(1) - (1)].gen);
} }
break; break;
case 43: case 44:
#line 219 "a.y"
/* Line 1455 of yacc.c */
#line 214 "a.y"
{ {
(yyval.gen2).from = nullgen; (yyval.gen2).from = nullgen;
(yyval.gen2).to = (yyvsp[(2) - (2)].gen); (yyval.gen2).to = (yyvsp[(2) - (2)].gen);
...@@ -1966,20 +1899,16 @@ yyreduce: ...@@ -1966,20 +1899,16 @@ yyreduce:
} }
break; break;
case 46: case 47:
#line 232 "a.y"
/* Line 1455 of yacc.c */
#line 227 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 47: case 48:
#line 237 "a.y"
/* Line 1455 of yacc.c */
#line 232 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).to = (yyvsp[(3) - (5)].gen); (yyval.gen2).to = (yyvsp[(3) - (5)].gen);
...@@ -1989,20 +1918,16 @@ yyreduce: ...@@ -1989,20 +1918,16 @@ yyreduce:
} }
break; break;
case 48: case 49:
#line 247 "a.y"
/* Line 1455 of yacc.c */
#line 242 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 49: case 50:
#line 252 "a.y"
/* Line 1455 of yacc.c */
#line 247 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).to = (yyvsp[(3) - (5)].gen); (yyval.gen2).to = (yyvsp[(3) - (5)].gen);
...@@ -2012,50 +1937,40 @@ yyreduce: ...@@ -2012,50 +1937,40 @@ yyreduce:
} }
break; break;
case 50: case 51:
#line 262 "a.y"
/* Line 1455 of yacc.c */
#line 257 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (2)].gen); (yyval.gen2).from = (yyvsp[(1) - (2)].gen);
(yyval.gen2).to = nullgen; (yyval.gen2).to = nullgen;
} }
break; break;
case 51: case 52:
#line 267 "a.y"
/* Line 1455 of yacc.c */
#line 262 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (1)].gen); (yyval.gen2).from = (yyvsp[(1) - (1)].gen);
(yyval.gen2).to = nullgen; (yyval.gen2).to = nullgen;
} }
break; break;
case 52: case 53:
#line 272 "a.y"
/* Line 1455 of yacc.c */
#line 267 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 53: case 54:
#line 279 "a.y"
/* Line 1455 of yacc.c */
#line 274 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (3)].gen); (yyval.gen2).from = (yyvsp[(1) - (3)].gen);
(yyval.gen2).to = (yyvsp[(3) - (3)].gen); (yyval.gen2).to = (yyvsp[(3) - (3)].gen);
} }
break; break;
case 54: case 55:
#line 284 "a.y"
/* Line 1455 of yacc.c */
#line 279 "a.y"
{ {
(yyval.gen2).from = (yyvsp[(1) - (5)].gen); (yyval.gen2).from = (yyvsp[(1) - (5)].gen);
(yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval); (yyval.gen2).from.scale = (yyvsp[(3) - (5)].lval);
...@@ -2063,28 +1978,22 @@ yyreduce: ...@@ -2063,28 +1978,22 @@ yyreduce:
} }
break; break;
case 59: case 60:
#line 298 "a.y"
/* Line 1455 of yacc.c */
#line 293 "a.y"
{ {
(yyval.gen) = (yyvsp[(2) - (2)].gen); (yyval.gen) = (yyvsp[(2) - (2)].gen);
} }
break; break;
case 60: case 61:
#line 302 "a.y"
/* Line 1455 of yacc.c */
#line 297 "a.y"
{ {
(yyval.gen) = (yyvsp[(2) - (2)].gen); (yyval.gen) = (yyvsp[(2) - (2)].gen);
} }
break; break;
case 66: case 67:
#line 315 "a.y"
/* Line 1455 of yacc.c */
#line 310 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_BRANCH; (yyval.gen).type = D_BRANCH;
...@@ -2092,10 +2001,8 @@ yyreduce: ...@@ -2092,10 +2001,8 @@ yyreduce:
} }
break; break;
case 67: case 68:
#line 321 "a.y"
/* Line 1455 of yacc.c */
#line 316 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
if(pass == 2) if(pass == 2)
...@@ -2106,10 +2013,8 @@ yyreduce: ...@@ -2106,10 +2013,8 @@ yyreduce:
} }
break; break;
case 68: case 69:
#line 330 "a.y"
/* Line 1455 of yacc.c */
#line 325 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_BRANCH; (yyval.gen).type = D_BRANCH;
...@@ -2118,19 +2023,7 @@ yyreduce: ...@@ -2118,19 +2023,7 @@ yyreduce:
} }
break; break;
case 69:
/* Line 1455 of yacc.c */
#line 334 "a.y"
{
(yyval.gen) = nullgen;
(yyval.gen).type = (yyvsp[(1) - (1)].lval);
}
break;
case 70: case 70:
/* Line 1455 of yacc.c */
#line 339 "a.y" #line 339 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
...@@ -2139,8 +2032,6 @@ yyreduce: ...@@ -2139,8 +2032,6 @@ yyreduce:
break; break;
case 71: case 71:
/* Line 1455 of yacc.c */
#line 344 "a.y" #line 344 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
...@@ -2149,29 +2040,31 @@ yyreduce: ...@@ -2149,29 +2040,31 @@ yyreduce:
break; break;
case 72: case 72:
/* Line 1455 of yacc.c */
#line 349 "a.y" #line 349 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_SP; (yyval.gen).type = (yyvsp[(1) - (1)].lval);
} }
break; break;
case 73: case 73:
/* Line 1455 of yacc.c */
#line 354 "a.y" #line 354 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = (yyvsp[(1) - (1)].lval); (yyval.gen).type = D_SP;
} }
break; break;
case 74: case 74:
#line 359 "a.y"
{
(yyval.gen) = nullgen;
(yyval.gen).type = (yyvsp[(1) - (1)].lval);
}
break;
/* Line 1455 of yacc.c */ case 75:
#line 361 "a.y" #line 366 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_CONST; (yyval.gen).type = D_CONST;
...@@ -2179,10 +2072,8 @@ yyreduce: ...@@ -2179,10 +2072,8 @@ yyreduce:
} }
break; break;
case 75: case 76:
#line 372 "a.y"
/* Line 1455 of yacc.c */
#line 367 "a.y"
{ {
(yyval.gen) = (yyvsp[(2) - (2)].gen); (yyval.gen) = (yyvsp[(2) - (2)].gen);
(yyval.gen).index = (yyvsp[(2) - (2)].gen).type; (yyval.gen).index = (yyvsp[(2) - (2)].gen).type;
...@@ -2195,10 +2086,8 @@ yyreduce: ...@@ -2195,10 +2086,8 @@ yyreduce:
} }
break; break;
case 76: case 77:
#line 383 "a.y"
/* Line 1455 of yacc.c */
#line 378 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_SCONST; (yyval.gen).type = D_SCONST;
...@@ -2206,10 +2095,8 @@ yyreduce: ...@@ -2206,10 +2095,8 @@ yyreduce:
} }
break; break;
case 77: case 78:
#line 389 "a.y"
/* Line 1455 of yacc.c */
#line 384 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2217,10 +2104,8 @@ yyreduce: ...@@ -2217,10 +2104,8 @@ yyreduce:
} }
break; break;
case 78: case 79:
#line 395 "a.y"
/* Line 1455 of yacc.c */
#line 390 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2228,10 +2113,8 @@ yyreduce: ...@@ -2228,10 +2113,8 @@ yyreduce:
} }
break; break;
case 79: case 80:
#line 401 "a.y"
/* Line 1455 of yacc.c */
#line 396 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2239,10 +2122,8 @@ yyreduce: ...@@ -2239,10 +2122,8 @@ yyreduce:
} }
break; break;
case 80: case 81:
#line 407 "a.y"
/* Line 1455 of yacc.c */
#line 402 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_FCONST; (yyval.gen).type = D_FCONST;
...@@ -2250,10 +2131,8 @@ yyreduce: ...@@ -2250,10 +2131,8 @@ yyreduce:
} }
break; break;
case 81: case 82:
#line 415 "a.y"
/* Line 1455 of yacc.c */
#line 410 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_CONST2; (yyval.gen).type = D_CONST2;
...@@ -2262,50 +2141,40 @@ yyreduce: ...@@ -2262,50 +2141,40 @@ yyreduce:
} }
break; break;
case 82: case 83:
#line 424 "a.y"
/* Line 1455 of yacc.c */
#line 419 "a.y"
{ {
(yyval.con2).v1 = (yyvsp[(1) - (1)].lval); (yyval.con2).v1 = (yyvsp[(1) - (1)].lval);
(yyval.con2).v2 = 0; (yyval.con2).v2 = 0;
} }
break; break;
case 83: case 84:
#line 429 "a.y"
/* Line 1455 of yacc.c */
#line 424 "a.y"
{ {
(yyval.con2).v1 = -(yyvsp[(2) - (2)].lval); (yyval.con2).v1 = -(yyvsp[(2) - (2)].lval);
(yyval.con2).v2 = 0; (yyval.con2).v2 = 0;
} }
break; break;
case 84: case 85:
#line 434 "a.y"
/* Line 1455 of yacc.c */
#line 429 "a.y"
{ {
(yyval.con2).v1 = (yyvsp[(1) - (3)].lval); (yyval.con2).v1 = (yyvsp[(1) - (3)].lval);
(yyval.con2).v2 = (yyvsp[(3) - (3)].lval); (yyval.con2).v2 = (yyvsp[(3) - (3)].lval);
} }
break; break;
case 85: case 86:
#line 439 "a.y"
/* Line 1455 of yacc.c */
#line 434 "a.y"
{ {
(yyval.con2).v1 = -(yyvsp[(2) - (4)].lval); (yyval.con2).v1 = -(yyvsp[(2) - (4)].lval);
(yyval.con2).v2 = (yyvsp[(4) - (4)].lval); (yyval.con2).v2 = (yyvsp[(4) - (4)].lval);
} }
break; break;
case 88: case 89:
#line 450 "a.y"
/* Line 1455 of yacc.c */
#line 445 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_NONE; (yyval.gen).type = D_INDIR+D_NONE;
...@@ -2313,10 +2182,8 @@ yyreduce: ...@@ -2313,10 +2182,8 @@ yyreduce:
} }
break; break;
case 89: case 90:
#line 456 "a.y"
/* Line 1455 of yacc.c */
#line 451 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval);
...@@ -2324,10 +2191,8 @@ yyreduce: ...@@ -2324,10 +2191,8 @@ yyreduce:
} }
break; break;
case 90: case 91:
#line 462 "a.y"
/* Line 1455 of yacc.c */
#line 457 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_SP; (yyval.gen).type = D_INDIR+D_SP;
...@@ -2335,10 +2200,8 @@ yyreduce: ...@@ -2335,10 +2200,8 @@ yyreduce:
} }
break; break;
case 91: case 92:
#line 468 "a.y"
/* Line 1455 of yacc.c */
#line 463 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_NONE; (yyval.gen).type = D_INDIR+D_NONE;
...@@ -2349,10 +2212,8 @@ yyreduce: ...@@ -2349,10 +2212,8 @@ yyreduce:
} }
break; break;
case 92: case 93:
#line 477 "a.y"
/* Line 1455 of yacc.c */
#line 472 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(3) - (9)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(3) - (9)].lval);
...@@ -2363,30 +2224,24 @@ yyreduce: ...@@ -2363,30 +2224,24 @@ yyreduce:
} }
break; break;
case 93: case 94:
#line 486 "a.y"
/* Line 1455 of yacc.c */
#line 481 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(2) - (3)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(2) - (3)].lval);
} }
break; break;
case 94: case 95:
#line 491 "a.y"
/* Line 1455 of yacc.c */
#line 486 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_SP; (yyval.gen).type = D_INDIR+D_SP;
} }
break; break;
case 95: case 96:
#line 496 "a.y"
/* Line 1455 of yacc.c */
#line 491 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(3) - (4)].lval);
...@@ -2394,10 +2249,8 @@ yyreduce: ...@@ -2394,10 +2249,8 @@ yyreduce:
} }
break; break;
case 96: case 97:
#line 502 "a.y"
/* Line 1455 of yacc.c */
#line 497 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+D_NONE; (yyval.gen).type = D_INDIR+D_NONE;
...@@ -2407,10 +2260,8 @@ yyreduce: ...@@ -2407,10 +2260,8 @@ yyreduce:
} }
break; break;
case 97: case 98:
#line 510 "a.y"
/* Line 1455 of yacc.c */
#line 505 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_INDIR+(yyvsp[(2) - (8)].lval); (yyval.gen).type = D_INDIR+(yyvsp[(2) - (8)].lval);
...@@ -2420,19 +2271,15 @@ yyreduce: ...@@ -2420,19 +2271,15 @@ yyreduce:
} }
break; break;
case 98: case 99:
#line 520 "a.y"
/* Line 1455 of yacc.c */
#line 515 "a.y"
{ {
(yyval.gen) = (yyvsp[(1) - (1)].gen); (yyval.gen) = (yyvsp[(1) - (1)].gen);
} }
break; break;
case 99: case 100:
#line 524 "a.y"
/* Line 1455 of yacc.c */
#line 519 "a.y"
{ {
(yyval.gen) = (yyvsp[(1) - (6)].gen); (yyval.gen) = (yyvsp[(1) - (6)].gen);
(yyval.gen).index = (yyvsp[(3) - (6)].lval); (yyval.gen).index = (yyvsp[(3) - (6)].lval);
...@@ -2441,10 +2288,8 @@ yyreduce: ...@@ -2441,10 +2288,8 @@ yyreduce:
} }
break; break;
case 100: case 101:
#line 533 "a.y"
/* Line 1455 of yacc.c */
#line 528 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = (yyvsp[(4) - (5)].lval); (yyval.gen).type = (yyvsp[(4) - (5)].lval);
...@@ -2453,10 +2298,8 @@ yyreduce: ...@@ -2453,10 +2298,8 @@ yyreduce:
} }
break; break;
case 101: case 102:
#line 540 "a.y"
/* Line 1455 of yacc.c */
#line 535 "a.y"
{ {
(yyval.gen) = nullgen; (yyval.gen) = nullgen;
(yyval.gen).type = D_STATIC; (yyval.gen).type = D_STATIC;
...@@ -2465,181 +2308,142 @@ yyreduce: ...@@ -2465,181 +2308,142 @@ yyreduce:
} }
break; break;
case 102: case 103:
#line 548 "a.y"
/* Line 1455 of yacc.c */
#line 543 "a.y"
{ {
(yyval.lval) = 0; (yyval.lval) = 0;
} }
break; break;
case 103: case 104:
#line 552 "a.y"
/* Line 1455 of yacc.c */
#line 547 "a.y"
{ {
(yyval.lval) = (yyvsp[(2) - (2)].lval); (yyval.lval) = (yyvsp[(2) - (2)].lval);
} }
break; break;
case 104: case 105:
#line 556 "a.y"
/* Line 1455 of yacc.c */
#line 551 "a.y"
{ {
(yyval.lval) = -(yyvsp[(2) - (2)].lval); (yyval.lval) = -(yyvsp[(2) - (2)].lval);
} }
break; break;
case 106: case 107:
#line 563 "a.y"
/* Line 1455 of yacc.c */
#line 558 "a.y"
{ {
(yyval.lval) = D_AUTO; (yyval.lval) = D_AUTO;
} }
break; break;
case 109: case 110:
#line 571 "a.y"
/* Line 1455 of yacc.c */
#line 566 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (1)].sym)->value; (yyval.lval) = (yyvsp[(1) - (1)].sym)->value;
} }
break; break;
case 110: case 111:
#line 575 "a.y"
/* Line 1455 of yacc.c */
#line 570 "a.y"
{ {
(yyval.lval) = -(yyvsp[(2) - (2)].lval); (yyval.lval) = -(yyvsp[(2) - (2)].lval);
} }
break; break;
case 111: case 112:
#line 579 "a.y"
/* Line 1455 of yacc.c */
#line 574 "a.y"
{ {
(yyval.lval) = (yyvsp[(2) - (2)].lval); (yyval.lval) = (yyvsp[(2) - (2)].lval);
} }
break; break;
case 112: case 113:
#line 583 "a.y"
/* Line 1455 of yacc.c */
#line 578 "a.y"
{ {
(yyval.lval) = ~(yyvsp[(2) - (2)].lval); (yyval.lval) = ~(yyvsp[(2) - (2)].lval);
} }
break; break;
case 113: case 114:
#line 587 "a.y"
/* Line 1455 of yacc.c */
#line 582 "a.y"
{ {
(yyval.lval) = (yyvsp[(2) - (3)].lval); (yyval.lval) = (yyvsp[(2) - (3)].lval);
} }
break; break;
case 115: case 116:
#line 594 "a.y"
/* Line 1455 of yacc.c */
#line 589 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) + (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) + (yyvsp[(3) - (3)].lval);
} }
break; break;
case 116: case 117:
#line 598 "a.y"
/* Line 1455 of yacc.c */
#line 593 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) - (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) - (yyvsp[(3) - (3)].lval);
} }
break; break;
case 117: case 118:
#line 602 "a.y"
/* Line 1455 of yacc.c */
#line 597 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) * (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) * (yyvsp[(3) - (3)].lval);
} }
break; break;
case 118: case 119:
#line 606 "a.y"
/* Line 1455 of yacc.c */
#line 601 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) / (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) / (yyvsp[(3) - (3)].lval);
} }
break; break;
case 119: case 120:
#line 610 "a.y"
/* Line 1455 of yacc.c */
#line 605 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) % (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) % (yyvsp[(3) - (3)].lval);
} }
break; break;
case 120: case 121:
#line 614 "a.y"
/* Line 1455 of yacc.c */
#line 609 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (4)].lval) << (yyvsp[(4) - (4)].lval); (yyval.lval) = (yyvsp[(1) - (4)].lval) << (yyvsp[(4) - (4)].lval);
} }
break; break;
case 121: case 122:
#line 618 "a.y"
/* Line 1455 of yacc.c */
#line 613 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (4)].lval) >> (yyvsp[(4) - (4)].lval); (yyval.lval) = (yyvsp[(1) - (4)].lval) >> (yyvsp[(4) - (4)].lval);
} }
break; break;
case 122: case 123:
#line 622 "a.y"
/* Line 1455 of yacc.c */
#line 617 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) & (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) & (yyvsp[(3) - (3)].lval);
} }
break; break;
case 123: case 124:
#line 626 "a.y"
/* Line 1455 of yacc.c */
#line 621 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) ^ (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) ^ (yyvsp[(3) - (3)].lval);
} }
break; break;
case 124: case 125:
#line 630 "a.y"
/* Line 1455 of yacc.c */
#line 625 "a.y"
{ {
(yyval.lval) = (yyvsp[(1) - (3)].lval) | (yyvsp[(3) - (3)].lval); (yyval.lval) = (yyvsp[(1) - (3)].lval) | (yyvsp[(3) - (3)].lval);
} }
break; break;
/* Line 1267 of yacc.c. */
/* Line 1455 of yacc.c */ #line 2447 "y.tab.c"
#line 2643 "y.tab.c"
default: break; default: break;
} }
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
...@@ -2650,6 +2454,7 @@ yyreduce: ...@@ -2650,6 +2454,7 @@ yyreduce:
*++yyvsp = yyval; *++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state /* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule that goes to, based on the state we popped back to and the rule
number reduced by. */ number reduced by. */
...@@ -2714,7 +2519,7 @@ yyerrlab: ...@@ -2714,7 +2519,7 @@ yyerrlab:
if (yyerrstatus == 3) if (yyerrstatus == 3)
{ {
/* If just tried and failed to reuse lookahead token after an /* If just tried and failed to reuse look-ahead token after an
error, discard it. */ error, discard it. */
if (yychar <= YYEOF) if (yychar <= YYEOF)
...@@ -2731,7 +2536,7 @@ yyerrlab: ...@@ -2731,7 +2536,7 @@ yyerrlab:
} }
} }
/* Else will try to reuse lookahead token after shifting the error /* Else will try to reuse look-ahead token after shifting the error
token. */ token. */
goto yyerrlab1; goto yyerrlab1;
...@@ -2788,6 +2593,9 @@ yyerrlab1: ...@@ -2788,6 +2593,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp); YY_STACK_PRINT (yyss, yyssp);
} }
if (yyn == YYFINAL)
YYACCEPT;
*++yyvsp = yylval; *++yyvsp = yylval;
...@@ -2812,7 +2620,7 @@ yyabortlab: ...@@ -2812,7 +2620,7 @@ yyabortlab:
yyresult = 1; yyresult = 1;
goto yyreturn; goto yyreturn;
#if !defined(yyoverflow) || YYERROR_VERBOSE #ifndef yyoverflow
/*-------------------------------------------------. /*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. | | yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/ `-------------------------------------------------*/
...@@ -2823,7 +2631,7 @@ yyexhaustedlab: ...@@ -2823,7 +2631,7 @@ yyexhaustedlab:
#endif #endif
yyreturn: yyreturn:
if (yychar != YYEMPTY) if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead", yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval); yytoken, &yylval);
/* Do not reclaim the symbols of the rule which action triggered /* Do not reclaim the symbols of the rule which action triggered
......
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C /* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc. Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation; either version 2, or (at your option)
(at your option) any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
...@@ -17,7 +16,9 @@ ...@@ -17,7 +16,9 @@
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains /* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work part or all of the Bison parser skeleton and distribute that work
...@@ -32,7 +33,6 @@ ...@@ -32,7 +33,6 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
...@@ -104,11 +104,8 @@ ...@@ -104,11 +104,8 @@
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE typedef union YYSTYPE
{
/* Line 1676 of yacc.c */
#line 37 "a.y" #line 37 "a.y"
{
Sym *sym; Sym *sym;
int32 lval; int32 lval;
struct { struct {
...@@ -119,17 +116,14 @@ typedef union YYSTYPE ...@@ -119,17 +116,14 @@ typedef union YYSTYPE
char sval[8]; char sval[8];
Gen gen; Gen gen;
Gen2 gen2; Gen2 gen2;
}
/* Line 1529 of yacc.c. */
#line 122 "y.tab.h"
/* Line 1676 of yacc.c */ YYSTYPE;
#line 127 "y.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif #endif
extern YYSTYPE yylval; extern YYSTYPE yylval;
...@@ -596,6 +596,7 @@ agen(Node *n, Node *res) ...@@ -596,6 +596,7 @@ agen(Node *n, Node *res)
nodconst(&n2, types[TUINT32], v); nodconst(&n2, types[TUINT32], v);
gins(optoas(OCMP, types[TUINT32]), &n1, &n2); gins(optoas(OCMP, types[TUINT32]), &n1, &n2);
p1 = gbranch(optoas(OGT, types[TUINT32]), T); p1 = gbranch(optoas(OGT, types[TUINT32]), T);
expecttaken(p1, 1);
ginscall(panicindex, 0); ginscall(panicindex, 0);
patch(p1, pc); patch(p1, pc);
} }
...@@ -633,6 +634,7 @@ agen(Node *n, Node *res) ...@@ -633,6 +634,7 @@ agen(Node *n, Node *res)
nodconst(&n1, types[TUINT32], nl->type->bound); nodconst(&n1, types[TUINT32], nl->type->bound);
gins(optoas(OCMP, types[TUINT32]), &n2, &n1); gins(optoas(OCMP, types[TUINT32]), &n2, &n1);
p1 = gbranch(optoas(OLT, types[TUINT32]), T); p1 = gbranch(optoas(OLT, types[TUINT32]), T);
expecttaken(p1, 1);
if(p2) if(p2)
patch(p2, pc); patch(p2, pc);
ginscall(panicindex, 0); ginscall(panicindex, 0);
......
...@@ -122,6 +122,7 @@ void cgen64(Node*, Node*); ...@@ -122,6 +122,7 @@ void cgen64(Node*, Node*);
void clearp(Prog*); void clearp(Prog*);
void proglist(void); void proglist(void);
Prog* gbranch(int, Type*); Prog* gbranch(int, Type*);
void expecttaken(Prog*, int);
Prog* prog(int); Prog* prog(int);
void gaddoffset(Node*); void gaddoffset(Node*);
void gconv(int, int); void gconv(int, int);
......
...@@ -896,12 +896,14 @@ cmpandthrow(Node *nl, Node *nr) ...@@ -896,12 +896,14 @@ cmpandthrow(Node *nl, Node *nr)
regfree(&n1); regfree(&n1);
if(throwpc == nil) { if(throwpc == nil) {
p1 = gbranch(optoas(op, t), T); p1 = gbranch(optoas(op, t), T);
expecttaken(p1, 1);
throwpc = pc; throwpc = pc;
ginscall(panicslice, 0); ginscall(panicslice, 0);
patch(p1, pc); patch(p1, pc);
} else { } else {
op = brcom(op); op = brcom(op);
p1 = gbranch(optoas(op, t), T); p1 = gbranch(optoas(op, t), T);
expecttaken(p1, 0);
patch(p1, throwpc); patch(p1, throwpc);
} }
} }
......
...@@ -118,6 +118,13 @@ gbranch(int as, Type *t) ...@@ -118,6 +118,13 @@ gbranch(int as, Type *t)
return p; return p;
} }
void
expecttaken(Prog *p, int taken)
{
p->from.type = D_CONST;
p->from.offset = taken;
}
/* /*
* patch previous branch to jump to to. * patch previous branch to jump to to.
*/ */
......
...@@ -254,7 +254,9 @@ uchar yscond[] = ...@@ -254,7 +254,9 @@ uchar yscond[] =
}; };
uchar yjcond[] = uchar yjcond[] =
{ {
Ynone, Ybr, Zbr, 1, Ynone, Ybr, Zbr, 0,
Yi0, Ybr, Zbr, 0,
Yi1, Ybr, Zbr, 1,
0 0
}; };
uchar yloop[] = uchar yloop[] =
......
...@@ -184,6 +184,18 @@ loop: ...@@ -184,6 +184,18 @@ loop:
* recurse to follow one path. * recurse to follow one path.
* continue loop on the other. * continue loop on the other.
*/ */
if(p->from.type == D_CONST) {
if(p->from.offset == 1) {
/*
* expect conditional jump to be taken.
* rewrite so that's the fall-through case.
*/
p->as = relinv(a);
q = p->link;
p->link = p->pcond;
p->pcond = q;
}
} else {
q = brchain(p->link); q = brchain(p->link);
if(q != P && q->mark) if(q != P && q->mark)
if(a != ALOOP) { if(a != ALOOP) {
...@@ -191,6 +203,7 @@ loop: ...@@ -191,6 +203,7 @@ loop:
p->link = p->pcond; p->link = p->pcond;
p->pcond = q; p->pcond = q;
} }
}
xfol(p->link, last); xfol(p->link, last);
q = brchain(p->pcond); q = brchain(p->pcond);
if(q->mark) { if(q->mark) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment