00001 #define sign_extend(N,SIZE) (((int)((N) << (sizeof(unsigned)*8-(SIZE)))) >> (sizeof(unsigned)*8-(SIZE)))
00002 #include <assert.h>
00003
00004 #line 2 "machine/hppa/hppa.pat.m"
00005
00006
00007
00008
00009
00010
00011
00012 #include "global.h"
00013 #include "decoder.h"
00014 #include "hppa.pat.h"
00015 #include "ss.h"
00016 #include "csr.h"
00017
00018 #define VAR true
00019 #define VAL false
00020 int InstructionPatterns::R0 = 0;
00021 int InstructionPatterns::RP = 2;
00022 int InstructionPatterns::SP = 30;
00023 int InstructionPatterns::R31 = 31;
00024 bool InstructionPatterns::BL$c_br_nnull(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR) {
00025 ADDRESS nextPC;
00026
00027
00028 #line 22 "machine/hppa/hppa.pat.m"
00029 {
00030 dword MATCH_p =
00031
00032 #line 22 "machine/hppa/hppa.pat.m"
00033 lc
00034 ;
00035 unsigned MATCH_w_32_0;
00036 {
00037 MATCH_w_32_0 = getDword(MATCH_p);
00038 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00039 (MATCH_w_32_0 >> 26 & 0x3f) < 58 ||
00040 59 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00041 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
00042 (MATCH_w_32_0 >> 26 & 0x3f) == 58 &&
00043 (1 <= (MATCH_w_32_0 >> 13 & 0x7) &&
00044 (MATCH_w_32_0 >> 13 & 0x7) < 8))
00045 goto MATCH_label_y0;
00046 else {
00047 unsigned _a = addressToPC(MATCH_p);
00048 unsigned _b =
00049 8 + ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
00050 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
00051 ((MATCH_w_32_0 >> 16 & 0x1f) << 13) +
00052 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 18);
00053 unsigned _c = (MATCH_w_32_0 >> 21 & 0x1f) ;
00054 nextPC = 4 + MATCH_p;
00055
00056 #line 24 "machine/hppa/hppa.pat.m"
00057
00058
00059 if (!c_br_nnull(_a)) return false;
00060
00061 if (!a_isVAR && (int)_b != a) return false; else a = _b;
00062
00063 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00064
00065 lc = nextPC;
00066
00067 return true;
00068
00069
00070
00071
00072 }
00073
00074 }goto MATCH_finished_y;
00075
00076 MATCH_label_y0: (void)0;
00077 {
00078 nextPC = MATCH_p;
00079
00080 #line 29 "machine/hppa/hppa.pat.m"
00081
00082 return false;
00083
00084
00085
00086
00087 }
00088 goto MATCH_finished_y;
00089
00090 MATCH_finished_y: (void)0;
00091
00092 }
00093
00094 #line 33 "machine/hppa/hppa.pat.m"
00095 }
00096 bool InstructionPatterns::BL$c_br_null(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR) {
00097 ADDRESS nextPC;
00098
00099
00100 #line 35 "machine/hppa/hppa.pat.m"
00101 {
00102 dword MATCH_p =
00103
00104 #line 35 "machine/hppa/hppa.pat.m"
00105 lc
00106 ;
00107 unsigned MATCH_w_32_0;
00108 {
00109 MATCH_w_32_0 = getDword(MATCH_p);
00110 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00111 (MATCH_w_32_0 >> 26 & 0x3f) < 58 ||
00112 59 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00113 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
00114 (MATCH_w_32_0 >> 26 & 0x3f) == 58 &&
00115 (1 <= (MATCH_w_32_0 >> 13 & 0x7) &&
00116 (MATCH_w_32_0 >> 13 & 0x7) < 8))
00117 goto MATCH_label_x0;
00118 else {
00119 unsigned _a = addressToPC(MATCH_p);
00120 unsigned _b =
00121 8 + ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
00122 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
00123 ((MATCH_w_32_0 >> 16 & 0x1f) << 13) +
00124 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 18);
00125 unsigned _c = (MATCH_w_32_0 >> 21 & 0x1f) ;
00126 nextPC = 4 + MATCH_p;
00127
00128 #line 37 "machine/hppa/hppa.pat.m"
00129
00130
00131 if (!c_br_null(_a)) return false;
00132
00133 if (!a_isVAR && (int)_b != a) return false; else a = _b;
00134
00135 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00136
00137 lc = nextPC;
00138
00139 return true;
00140
00141
00142
00143
00144 }
00145
00146 }goto MATCH_finished_x;
00147
00148 MATCH_label_x0: (void)0;
00149 {
00150 nextPC = MATCH_p;
00151
00152 #line 42 "machine/hppa/hppa.pat.m"
00153
00154 return false;
00155
00156
00157
00158
00159 }
00160 goto MATCH_finished_x;
00161
00162 MATCH_finished_x: (void)0;
00163
00164 }
00165
00166 #line 46 "machine/hppa/hppa.pat.m"
00167 }
00168 bool InstructionPatterns::BV$c_br_nnull(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR) {
00169 ADDRESS nextPC;
00170
00171
00172 #line 48 "machine/hppa/hppa.pat.m"
00173 {
00174 dword MATCH_p =
00175
00176 #line 48 "machine/hppa/hppa.pat.m"
00177 lc
00178 ;
00179 unsigned MATCH_w_32_0;
00180 {
00181 MATCH_w_32_0 = getDword(MATCH_p);
00182 if (0 <= (MATCH_w_32_0 >> 13 & 0x7) &&
00183 (MATCH_w_32_0 >> 13 & 0x7) < 6 ||
00184 (MATCH_w_32_0 >> 13 & 0x7) == 7 ||
00185 (MATCH_w_32_0 >> 13 & 0x7) == 6 &&
00186 (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00187 (MATCH_w_32_0 >> 26 & 0x3f) < 58 ||
00188 59 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00189 (MATCH_w_32_0 >> 26 & 0x3f) < 64) ||
00190 (MATCH_w_32_0 >> 13 & 0x7) == 6 &&
00191 (MATCH_w_32_0 >> 26 & 0x3f) == 58 &&
00192 (MATCH_w_32_0 >> 12 & 0x1) == 1)
00193 goto MATCH_label_w0;
00194 else {
00195 unsigned _a = addressToPC(MATCH_p);
00196 unsigned _b = (MATCH_w_32_0 >> 16 & 0x1f) ;
00197 unsigned _c = (MATCH_w_32_0 >> 21 & 0x1f) ;
00198 nextPC = 4 + MATCH_p;
00199
00200 #line 50 "machine/hppa/hppa.pat.m"
00201
00202
00203 if (!c_br_nnull(_a)) return false;
00204
00205 if (!a_isVAR && (int)_b != a) return false; else a = _b;
00206
00207 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00208
00209 lc = nextPC;
00210
00211 return true;
00212
00213
00214
00215
00216 }
00217
00218 }goto MATCH_finished_w;
00219
00220 MATCH_label_w0: (void)0;
00221 {
00222 nextPC = MATCH_p;
00223
00224 #line 55 "machine/hppa/hppa.pat.m"
00225
00226 return false;
00227
00228
00229
00230
00231 }
00232 goto MATCH_finished_w;
00233
00234 MATCH_finished_w: (void)0;
00235
00236 }
00237
00238 #line 59 "machine/hppa/hppa.pat.m"
00239 }
00240 bool InstructionPatterns::BV$c_br_null(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR) {
00241 ADDRESS nextPC;
00242
00243
00244 #line 61 "machine/hppa/hppa.pat.m"
00245 {
00246 dword MATCH_p =
00247
00248 #line 61 "machine/hppa/hppa.pat.m"
00249 lc
00250 ;
00251 unsigned MATCH_w_32_0;
00252 {
00253 MATCH_w_32_0 = getDword(MATCH_p);
00254 if (0 <= (MATCH_w_32_0 >> 13 & 0x7) &&
00255 (MATCH_w_32_0 >> 13 & 0x7) < 6 ||
00256 (MATCH_w_32_0 >> 13 & 0x7) == 7 ||
00257 (MATCH_w_32_0 >> 13 & 0x7) == 6 &&
00258 (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00259 (MATCH_w_32_0 >> 26 & 0x3f) < 58 ||
00260 59 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00261 (MATCH_w_32_0 >> 26 & 0x3f) < 64) ||
00262 (MATCH_w_32_0 >> 13 & 0x7) == 6 &&
00263 (MATCH_w_32_0 >> 26 & 0x3f) == 58 &&
00264 (MATCH_w_32_0 >> 12 & 0x1) == 1)
00265 goto MATCH_label_v0;
00266 else {
00267 unsigned _a = addressToPC(MATCH_p);
00268 unsigned _b = (MATCH_w_32_0 >> 16 & 0x1f) ;
00269 unsigned _c = (MATCH_w_32_0 >> 21 & 0x1f) ;
00270 nextPC = 4 + MATCH_p;
00271
00272 #line 63 "machine/hppa/hppa.pat.m"
00273
00274
00275 if (!c_br_null(_a)) return false;
00276
00277 if (!a_isVAR && (int)_b != a) return false; else a = _b;
00278
00279 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00280
00281 lc = nextPC;
00282
00283 return true;
00284
00285
00286
00287
00288 }
00289
00290 }goto MATCH_finished_v;
00291
00292 MATCH_label_v0: (void)0;
00293 {
00294 nextPC = MATCH_p;
00295
00296 #line 68 "machine/hppa/hppa.pat.m"
00297
00298 return false;
00299
00300
00301
00302
00303 }
00304 goto MATCH_finished_v;
00305
00306 MATCH_finished_v: (void)0;
00307
00308 }
00309
00310 #line 72 "machine/hppa/hppa.pat.m"
00311 }
00312 bool InstructionPatterns::FSTDS$s_addr_im_r$c_s_addr_ma(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00313 ADDRESS nextPC;
00314
00315
00316 #line 74 "machine/hppa/hppa.pat.m"
00317 {
00318 dword MATCH_p =
00319
00320 #line 74 "machine/hppa/hppa.pat.m"
00321 lc
00322 ;
00323 unsigned MATCH_w_32_0;
00324 {
00325 MATCH_w_32_0 = getDword(MATCH_p);
00326 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00327 (MATCH_w_32_0 >> 26 & 0x3f) < 11 ||
00328 12 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00329 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
00330 (MATCH_w_32_0 >> 26 & 0x3f) == 11 &&
00331 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
00332 (MATCH_w_32_0 >> 26 & 0x3f) == 11 &&
00333 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
00334 (MATCH_w_32_0 >> 9 & 0x1) == 0 ||
00335 (MATCH_w_32_0 >> 26 & 0x3f) == 11 &&
00336 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
00337 (MATCH_w_32_0 >> 9 & 0x1) == 1 &&
00338 (1 <= (MATCH_w_32_0 >> 7 & 0x3) &&
00339 (MATCH_w_32_0 >> 7 & 0x3) < 4))
00340 goto MATCH_label_u0;
00341 else
00342 goto MATCH_label_u1;
00343
00344 }goto MATCH_finished_u;
00345
00346 MATCH_label_u0: (void)0;
00347 {
00348 nextPC = MATCH_p;
00349
00350 #line 83 "machine/hppa/hppa.pat.m"
00351
00352 return false;
00353
00354
00355
00356
00357 }
00358 goto MATCH_finished_u;
00359
00360 MATCH_label_u1: (void)0;
00361 {
00362 unsigned _a = addressToPC(MATCH_p);
00363 unsigned _b = (MATCH_w_32_0 & 0x1f) ;
00364 unsigned _c = addressToPC(MATCH_p);
00365 unsigned _d = (MATCH_w_32_0 >> 14 & 0x3) ;
00366 unsigned _e = (MATCH_w_32_0 >> 21 & 0x1f) ;
00367 nextPC = 4 + MATCH_p;
00368
00369 #line 76 "machine/hppa/hppa.pat.m"
00370
00371
00372 if (!c_s_addr_ma(_a)) return false;
00373
00374 if (!a_isVAR && (int)_b != a) return false; else a = _b;
00375
00376 if (!s_addr_im_r$c_s_addr_ma(_c, b, b_isVAR)) return false;
00377
00378 if (!c_isVAR && (int)_d != c) return false; else c = _d;
00379
00380 if (!d_isVAR && (int)_e != d) return false; else d = _e;
00381
00382 lc = nextPC;
00383
00384 return true;
00385
00386
00387
00388
00389 }
00390 goto MATCH_finished_u;
00391
00392 MATCH_finished_u: (void)0;
00393
00394 }
00395
00396 #line 87 "machine/hppa/hppa.pat.m"
00397 }
00398 bool InstructionPatterns::LDO(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR) {
00399 ADDRESS nextPC;
00400
00401
00402 #line 89 "machine/hppa/hppa.pat.m"
00403 {
00404 dword MATCH_p =
00405
00406 #line 89 "machine/hppa/hppa.pat.m"
00407 lc
00408 ;
00409 unsigned MATCH_w_32_0;
00410 {
00411 MATCH_w_32_0 = getDword(MATCH_p);
00412 if ((MATCH_w_32_0 >> 26 & 0x3f) == 13) {
00413 unsigned _a =
00414 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 13) +
00415 (MATCH_w_32_0 >> 1 & 0x1fff) ;
00416 unsigned _b = (MATCH_w_32_0 >> 21 & 0x1f) ;
00417 unsigned _c = (MATCH_w_32_0 >> 16 & 0x1f) ;
00418 nextPC = 4 + MATCH_p;
00419
00420 #line 91 "machine/hppa/hppa.pat.m"
00421
00422
00423 if (!a_isVAR && (int)_a != a) return false; else a = _a;
00424
00425 if (!b_isVAR && (int)_b != b) return false; else b = _b;
00426
00427 if (!c_isVAR && (int)_c != c) return false; else c = _c;
00428
00429 lc = nextPC;
00430
00431 return true;
00432
00433
00434
00435
00436 }
00437 else {
00438 nextPC = MATCH_p;
00439
00440 #line 96 "machine/hppa/hppa.pat.m"
00441
00442 return false;
00443
00444
00445
00446
00447 }
00448
00449 }goto MATCH_finished_t;
00450
00451 MATCH_finished_t: (void)0;
00452
00453 }
00454
00455 #line 100 "machine/hppa/hppa.pat.m"
00456 }
00457 bool InstructionPatterns::LDW$l_addr_16_old$c_l_addr_none(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00458 ADDRESS nextPC;
00459
00460
00461 #line 102 "machine/hppa/hppa.pat.m"
00462 {
00463 dword MATCH_p =
00464
00465 #line 102 "machine/hppa/hppa.pat.m"
00466 lc
00467 ;
00468 unsigned MATCH_w_32_0;
00469 {
00470 MATCH_w_32_0 = getDword(MATCH_p);
00471 if ((MATCH_w_32_0 >> 26 & 0x3f) == 18) {
00472 unsigned _a = addressToPC(MATCH_p);
00473 unsigned _b = addressToPC(MATCH_p);
00474 unsigned _c = (MATCH_w_32_0 >> 14 & 0x3) ;
00475 unsigned _d = (MATCH_w_32_0 >> 21 & 0x1f) ;
00476 unsigned _e = (MATCH_w_32_0 >> 16 & 0x1f) ;
00477 nextPC = 4 + MATCH_p;
00478
00479 #line 104 "machine/hppa/hppa.pat.m"
00480
00481
00482 if (!c_l_addr_none(_a)) return false;
00483
00484 if (!l_addr_16_old$c_l_addr_none(_b, a, a_isVAR)) return false;
00485
00486 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00487
00488 if (!c_isVAR && (int)_d != c) return false; else c = _d;
00489
00490 if (!d_isVAR && (int)_e != d) return false; else d = _e;
00491
00492 lc = nextPC;
00493
00494 return true;
00495
00496
00497
00498
00499 }
00500 else {
00501 nextPC = MATCH_p;
00502
00503 #line 111 "machine/hppa/hppa.pat.m"
00504
00505 return false;
00506
00507
00508
00509
00510 }
00511
00512 }goto MATCH_finished_s;
00513
00514 MATCH_finished_s: (void)0;
00515
00516 }
00517
00518 #line 115 "machine/hppa/hppa.pat.m"
00519 }
00520 bool InstructionPatterns::LDWM$l_addr_16_old$c_l_addr_none(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00521 ADDRESS nextPC;
00522
00523
00524 #line 117 "machine/hppa/hppa.pat.m"
00525 {
00526 dword MATCH_p =
00527
00528 #line 117 "machine/hppa/hppa.pat.m"
00529 lc
00530 ;
00531 unsigned MATCH_w_32_0;
00532 {
00533 MATCH_w_32_0 = getDword(MATCH_p);
00534 if ((MATCH_w_32_0 >> 26 & 0x3f) == 19) {
00535 unsigned _a = addressToPC(MATCH_p);
00536 unsigned _b = addressToPC(MATCH_p);
00537 unsigned _c = (MATCH_w_32_0 >> 14 & 0x3) ;
00538 unsigned _d = (MATCH_w_32_0 >> 21 & 0x1f) ;
00539 unsigned _e = (MATCH_w_32_0 >> 16 & 0x1f) ;
00540 nextPC = 4 + MATCH_p;
00541
00542 #line 119 "machine/hppa/hppa.pat.m"
00543
00544
00545 if (!c_l_addr_none(_a)) return false;
00546
00547 if (!l_addr_16_old$c_l_addr_none(_b, a, a_isVAR)) return false;
00548
00549 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00550
00551 if (!c_isVAR && (int)_d != c) return false; else c = _d;
00552
00553 if (!d_isVAR && (int)_e != d) return false; else d = _e;
00554
00555 lc = nextPC;
00556
00557 return true;
00558
00559
00560
00561
00562 }
00563 else {
00564 nextPC = MATCH_p;
00565
00566 #line 126 "machine/hppa/hppa.pat.m"
00567
00568 return false;
00569
00570
00571
00572
00573 }
00574
00575 }goto MATCH_finished_r;
00576
00577 MATCH_finished_r: (void)0;
00578
00579 }
00580
00581 #line 130 "machine/hppa/hppa.pat.m"
00582 }
00583 bool InstructionPatterns::LDWS$s_addr_im_r$c_s_addr_mb(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00584 ADDRESS nextPC;
00585
00586
00587 #line 132 "machine/hppa/hppa.pat.m"
00588 {
00589 dword MATCH_p =
00590
00591 #line 132 "machine/hppa/hppa.pat.m"
00592 lc
00593 ;
00594 unsigned MATCH_w_32_0;
00595 {
00596 MATCH_w_32_0 = getDword(MATCH_p);
00597 if (0 <= (MATCH_w_32_0 >> 6 & 0xf) &&
00598 (MATCH_w_32_0 >> 6 & 0xf) < 2 ||
00599 3 <= (MATCH_w_32_0 >> 6 & 0xf) &&
00600 (MATCH_w_32_0 >> 6 & 0xf) < 16 ||
00601 (MATCH_w_32_0 >> 6 & 0xf) == 2 &&
00602 (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00603 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
00604 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00605 (MATCH_w_32_0 >> 26 & 0x3f) < 64) ||
00606 (MATCH_w_32_0 >> 6 & 0xf) == 2 &&
00607 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
00608 (MATCH_w_32_0 >> 12 & 0x1) == 0)
00609 goto MATCH_label_q0;
00610 else
00611 goto MATCH_label_q1;
00612
00613 }goto MATCH_finished_q;
00614
00615 MATCH_label_q0: (void)0;
00616 {
00617 nextPC = MATCH_p;
00618
00619 #line 141 "machine/hppa/hppa.pat.m"
00620
00621 return false;
00622
00623
00624
00625
00626 }
00627 goto MATCH_finished_q;
00628
00629 MATCH_label_q1: (void)0;
00630 {
00631 unsigned _a = addressToPC(MATCH_p);
00632 unsigned _b = addressToPC(MATCH_p);
00633 unsigned _c = (MATCH_w_32_0 >> 14 & 0x3) ;
00634 unsigned _d = (MATCH_w_32_0 >> 21 & 0x1f) ;
00635 unsigned _e = (MATCH_w_32_0 & 0x1f) ;
00636 nextPC = 4 + MATCH_p;
00637
00638 #line 134 "machine/hppa/hppa.pat.m"
00639
00640
00641 if (!c_s_addr_mb(_a)) return false;
00642
00643 if (!s_addr_im_r$c_s_addr_mb(_b, a, a_isVAR)) return false;
00644
00645 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00646
00647 if (!c_isVAR && (int)_d != c) return false; else c = _d;
00648
00649 if (!d_isVAR && (int)_e != d) return false; else d = _e;
00650
00651 lc = nextPC;
00652
00653 return true;
00654
00655
00656
00657
00658 }
00659 goto MATCH_finished_q;
00660
00661 MATCH_finished_q: (void)0;
00662
00663 }
00664
00665 #line 145 "machine/hppa/hppa.pat.m"
00666 }
00667 bool InstructionPatterns::LDWS$s_addr_im_r$c_s_addr_notm(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00668 ADDRESS nextPC;
00669
00670
00671 #line 147 "machine/hppa/hppa.pat.m"
00672 {
00673 dword MATCH_p =
00674
00675 #line 147 "machine/hppa/hppa.pat.m"
00676 lc
00677 ;
00678 unsigned MATCH_w_32_0;
00679 {
00680 MATCH_w_32_0 = getDword(MATCH_p);
00681 if (0 <= (MATCH_w_32_0 >> 6 & 0xf) &&
00682 (MATCH_w_32_0 >> 6 & 0xf) < 2 ||
00683 3 <= (MATCH_w_32_0 >> 6 & 0xf) &&
00684 (MATCH_w_32_0 >> 6 & 0xf) < 16 ||
00685 (MATCH_w_32_0 >> 6 & 0xf) == 2 &&
00686 (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00687 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
00688 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00689 (MATCH_w_32_0 >> 26 & 0x3f) < 64) ||
00690 (MATCH_w_32_0 >> 6 & 0xf) == 2 &&
00691 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
00692 (MATCH_w_32_0 >> 12 & 0x1) == 0)
00693 goto MATCH_label_p0;
00694 else
00695 goto MATCH_label_p1;
00696
00697 }goto MATCH_finished_p;
00698
00699 MATCH_label_p0: (void)0;
00700 {
00701 nextPC = MATCH_p;
00702
00703 #line 156 "machine/hppa/hppa.pat.m"
00704
00705 return false;
00706
00707
00708
00709
00710 }
00711 goto MATCH_finished_p;
00712
00713 MATCH_label_p1: (void)0;
00714 {
00715 unsigned _a = addressToPC(MATCH_p);
00716 unsigned _b = addressToPC(MATCH_p);
00717 unsigned _c = (MATCH_w_32_0 >> 14 & 0x3) ;
00718 unsigned _d = (MATCH_w_32_0 >> 21 & 0x1f) ;
00719 unsigned _e = (MATCH_w_32_0 & 0x1f) ;
00720 nextPC = 4 + MATCH_p;
00721
00722 #line 149 "machine/hppa/hppa.pat.m"
00723
00724
00725 if (!c_s_addr_notm(_a)) return false;
00726
00727 if (!s_addr_im_r$c_s_addr_notm(_b, a, a_isVAR)) return false;
00728
00729 if (!b_isVAR && (int)_c != b) return false; else b = _c;
00730
00731 if (!c_isVAR && (int)_d != c) return false; else c = _d;
00732
00733 if (!d_isVAR && (int)_e != d) return false; else d = _e;
00734
00735 lc = nextPC;
00736
00737 return true;
00738
00739
00740
00741
00742 }
00743 goto MATCH_finished_p;
00744
00745 MATCH_finished_p: (void)0;
00746
00747 }
00748
00749 #line 160 "machine/hppa/hppa.pat.m"
00750 }
00751 bool InstructionPatterns::OR$c_arith_w$c_c_nonneg(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00752 ADDRESS nextPC;
00753
00754
00755 #line 162 "machine/hppa/hppa.pat.m"
00756 {
00757 dword MATCH_p =
00758
00759 #line 162 "machine/hppa/hppa.pat.m"
00760 lc
00761 ;
00762 unsigned MATCH_w_32_0;
00763 {
00764 MATCH_w_32_0 = getDword(MATCH_p);
00765 if (0 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00766 (MATCH_w_32_0 >> 6 & 0x3f) < 9 ||
00767 10 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00768 (MATCH_w_32_0 >> 6 & 0x3f) < 64 ||
00769 (MATCH_w_32_0 >> 6 & 0x3f) == 9 &&
00770 (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00771 (MATCH_w_32_0 >> 26 & 0x3f) < 2 ||
00772 3 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00773 (MATCH_w_32_0 >> 26 & 0x3f) < 64))
00774 goto MATCH_label_o0;
00775 else {
00776 unsigned _a = addressToPC(MATCH_p);
00777 unsigned _b = (MATCH_w_32_0 >> 16 & 0x1f) ;
00778 unsigned _c = (MATCH_w_32_0 >> 21 & 0x1f) ;
00779 unsigned _d = (MATCH_w_32_0 & 0x1f) ;
00780 nextPC = 4 + MATCH_p;
00781
00782 #line 164 "machine/hppa/hppa.pat.m"
00783
00784
00785 if (!c_arith_w$c_c_nonneg(_a, a, a_isVAR)) return false;
00786
00787 if (!b_isVAR && (int)_b != b) return false; else b = _b;
00788
00789 if (!c_isVAR && (int)_c != c) return false; else c = _c;
00790
00791 if (!d_isVAR && (int)_d != d) return false; else d = _d;
00792
00793 lc = nextPC;
00794
00795 return true;
00796
00797
00798
00799
00800 }
00801
00802 }goto MATCH_finished_o;
00803
00804 MATCH_label_o0: (void)0;
00805 {
00806 nextPC = MATCH_p;
00807
00808 #line 170 "machine/hppa/hppa.pat.m"
00809
00810 return false;
00811
00812
00813
00814
00815 }
00816 goto MATCH_finished_o;
00817
00818 MATCH_finished_o: (void)0;
00819
00820 }
00821
00822 #line 174 "machine/hppa/hppa.pat.m"
00823 }
00824 bool InstructionPatterns::STW$l_addr_16_old$c_l_addr_none(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00825 ADDRESS nextPC;
00826
00827
00828 #line 176 "machine/hppa/hppa.pat.m"
00829 {
00830 dword MATCH_p =
00831
00832 #line 176 "machine/hppa/hppa.pat.m"
00833 lc
00834 ;
00835 unsigned MATCH_w_32_0;
00836 {
00837 MATCH_w_32_0 = getDword(MATCH_p);
00838 if ((MATCH_w_32_0 >> 26 & 0x3f) == 26) {
00839 unsigned _a = addressToPC(MATCH_p);
00840 unsigned _b = (MATCH_w_32_0 >> 16 & 0x1f) ;
00841 unsigned _c = addressToPC(MATCH_p);
00842 unsigned _d = (MATCH_w_32_0 >> 14 & 0x3) ;
00843 unsigned _e = (MATCH_w_32_0 >> 21 & 0x1f) ;
00844 nextPC = 4 + MATCH_p;
00845
00846 #line 178 "machine/hppa/hppa.pat.m"
00847
00848
00849 if (!c_l_addr_none(_a)) return false;
00850
00851 if (!a_isVAR && (int)_b != a) return false; else a = _b;
00852
00853 if (!l_addr_16_old$c_l_addr_none(_c, b, b_isVAR)) return false;
00854
00855 if (!c_isVAR && (int)_d != c) return false; else c = _d;
00856
00857 if (!d_isVAR && (int)_e != d) return false; else d = _e;
00858
00859 lc = nextPC;
00860
00861 return true;
00862
00863
00864
00865
00866 }
00867 else {
00868 nextPC = MATCH_p;
00869
00870 #line 185 "machine/hppa/hppa.pat.m"
00871
00872 return false;
00873
00874
00875
00876
00877 }
00878
00879 }goto MATCH_finished_n;
00880
00881 MATCH_finished_n: (void)0;
00882
00883 }
00884
00885 #line 189 "machine/hppa/hppa.pat.m"
00886 }
00887 bool InstructionPatterns::STWM$l_addr_16_old$c_l_addr_none(ADDRESS& lc, int& a, bool a_isVAR, int& b, bool b_isVAR, int& c, bool c_isVAR, int& d, bool d_isVAR) {
00888 ADDRESS nextPC;
00889
00890
00891 #line 191 "machine/hppa/hppa.pat.m"
00892 {
00893 dword MATCH_p =
00894
00895 #line 191 "machine/hppa/hppa.pat.m"
00896 lc
00897 ;
00898 unsigned MATCH_w_32_0;
00899 {
00900 MATCH_w_32_0 = getDword(MATCH_p);
00901 if ((MATCH_w_32_0 >> 26 & 0x3f) == 27) {
00902 unsigned _a = addressToPC(MATCH_p);
00903 unsigned _b = (MATCH_w_32_0 >> 16 & 0x1f) ;
00904 unsigned _c = addressToPC(MATCH_p);
00905 unsigned _d = (MATCH_w_32_0 >> 14 & 0x3) ;
00906 unsigned _e = (MATCH_w_32_0 >> 21 & 0x1f) ;
00907 nextPC = 4 + MATCH_p;
00908
00909 #line 193 "machine/hppa/hppa.pat.m"
00910
00911
00912 if (!c_l_addr_none(_a)) return false;
00913
00914 if (!a_isVAR && (int)_b != a) return false; else a = _b;
00915
00916 if (!l_addr_16_old$c_l_addr_none(_c, b, b_isVAR)) return false;
00917
00918 if (!c_isVAR && (int)_d != c) return false; else c = _d;
00919
00920 if (!d_isVAR && (int)_e != d) return false; else d = _e;
00921
00922 lc = nextPC;
00923
00924 return true;
00925
00926
00927
00928
00929 }
00930 else {
00931 nextPC = MATCH_p;
00932
00933 #line 200 "machine/hppa/hppa.pat.m"
00934
00935 return false;
00936
00937
00938
00939
00940 }
00941
00942 }goto MATCH_finished_m;
00943
00944 MATCH_finished_m: (void)0;
00945
00946 }
00947
00948 #line 203 "machine/hppa/hppa.pat.m"
00949 }
00950 bool InstructionPatterns::c_arith_w$c_c_nonneg(ADDRESS& lc, int& a, bool a_isVAR) {
00951
00952
00953 #line 205 "machine/hppa/hppa.pat.m"
00954 {
00955 dword MATCH_p =
00956
00957 #line 205 "machine/hppa/hppa.pat.m"
00958 lc
00959 ;
00960 unsigned MATCH_w_32_0;
00961 {
00962 MATCH_w_32_0 = getDword(MATCH_p);
00963 if ((MATCH_w_32_0 >> 26 & 0x3f) == 2 &&
00964 ((MATCH_w_32_0 >> 6 & 0x3f) == 0 ||
00965 4 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00966 (MATCH_w_32_0 >> 6 & 0x3f) < 6 ||
00967 7 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00968 (MATCH_w_32_0 >> 6 & 0x3f) < 18 ||
00969 19 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00970 (MATCH_w_32_0 >> 6 & 0x3f) < 32 ||
00971 (MATCH_w_32_0 >> 6 & 0x3f) == 34 ||
00972 38 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00973 (MATCH_w_32_0 >> 6 & 0x3f) < 44 ||
00974 46 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00975 (MATCH_w_32_0 >> 6 & 0x3f) < 49 ||
00976 51 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00977 (MATCH_w_32_0 >> 6 & 0x3f) < 53 ||
00978 56 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
00979 (MATCH_w_32_0 >> 6 & 0x3f) < 61) &&
00980 (MATCH_w_32_0 >> 5 & 0x1) == 0 &&
00981 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
00982 (MATCH_w_32_0 >> 12 & 0x1) < 2) ||
00983 (MATCH_w_32_0 >> 26 & 0x3f) == 36 &&
00984 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
00985 (MATCH_w_32_0 >> 12 & 0x1) < 2) ||
00986 ((MATCH_w_32_0 >> 26 & 0x3f) == 37 ||
00987 44 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00988 (MATCH_w_32_0 >> 26 & 0x3f) < 46) &&
00989 (0 <= (MATCH_w_32_0 >> 11 & 0x1) &&
00990 (MATCH_w_32_0 >> 11 & 0x1) < 2) &&
00991 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
00992 (MATCH_w_32_0 >> 12 & 0x1) < 2) ||
00993 40 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00994 (MATCH_w_32_0 >> 26 & 0x3f) < 44)
00995 goto MATCH_label_l1;
00996 else
00997 goto MATCH_label_l0;
00998
00999 }goto MATCH_finished_l;
01000
01001 MATCH_label_l0: (void)0;
01002
01003 #line 210 "machine/hppa/hppa.pat.m"
01004
01005 return false;
01006
01007
01008
01009 goto MATCH_finished_l;
01010
01011 MATCH_label_l1: (void)0;
01012 {
01013 unsigned _a = (MATCH_w_32_0 >> 13 & 0x7) ;
01014 unsigned _b = addressToPC(MATCH_p);
01015
01016 #line 207 "machine/hppa/hppa.pat.m"
01017
01018
01019 if (!a_isVAR && (int)_a != a) return false; else a = _a;
01020
01021 if (!c_c_nonneg(_b)) return false;
01022
01023 return true;
01024
01025
01026
01027
01028 }
01029 goto MATCH_finished_l;
01030
01031 MATCH_finished_l: (void)0;
01032
01033 }
01034
01035 #line 213 "machine/hppa/hppa.pat.m"
01036 }
01037 bool InstructionPatterns::c_br_nnull(ADDRESS& lc) {
01038
01039
01040 #line 215 "machine/hppa/hppa.pat.m"
01041 {
01042 dword MATCH_p =
01043
01044 #line 215 "machine/hppa/hppa.pat.m"
01045 lc
01046 ;
01047 unsigned MATCH_w_32_0;
01048 {
01049 MATCH_w_32_0 = getDword(MATCH_p);
01050 if ((32 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01051 (MATCH_w_32_0 >> 26 & 0x3f) < 36 ||
01052 39 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01053 (MATCH_w_32_0 >> 26 & 0x3f) < 44 ||
01054 47 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01055 (MATCH_w_32_0 >> 26 & 0x3f) < 52 ||
01056 56 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01057 (MATCH_w_32_0 >> 26 & 0x3f) < 60) &&
01058 (MATCH_w_32_0 >> 1 & 0x1) == 0)
01059
01060 #line 216 "machine/hppa/hppa.pat.m"
01061
01062
01063 return true;
01064
01065
01066
01067 else
01068 goto MATCH_label_k0;
01069
01070 }goto MATCH_finished_k;
01071
01072 MATCH_label_k0: (void)0;
01073
01074 #line 218 "machine/hppa/hppa.pat.m"
01075
01076 return false;
01077
01078
01079
01080 goto MATCH_finished_k;
01081
01082 MATCH_finished_k: (void)0;
01083
01084 }
01085
01086 #line 221 "machine/hppa/hppa.pat.m"
01087 }
01088 bool InstructionPatterns::c_br_null(ADDRESS& lc) {
01089
01090
01091 #line 223 "machine/hppa/hppa.pat.m"
01092 {
01093 dword MATCH_p =
01094
01095 #line 223 "machine/hppa/hppa.pat.m"
01096 lc
01097 ;
01098 unsigned MATCH_w_32_0;
01099 {
01100 MATCH_w_32_0 = getDword(MATCH_p);
01101 if ((32 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01102 (MATCH_w_32_0 >> 26 & 0x3f) < 36 ||
01103 39 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01104 (MATCH_w_32_0 >> 26 & 0x3f) < 44 ||
01105 47 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01106 (MATCH_w_32_0 >> 26 & 0x3f) < 52 ||
01107 56 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01108 (MATCH_w_32_0 >> 26 & 0x3f) < 60) &&
01109 (MATCH_w_32_0 >> 1 & 0x1) == 1)
01110
01111 #line 224 "machine/hppa/hppa.pat.m"
01112
01113
01114 return true;
01115
01116
01117
01118 else
01119 goto MATCH_label_j0;
01120
01121 }goto MATCH_finished_j;
01122
01123 MATCH_label_j0: (void)0;
01124
01125 #line 226 "machine/hppa/hppa.pat.m"
01126
01127 return false;
01128
01129
01130
01131 goto MATCH_finished_j;
01132
01133 MATCH_finished_j: (void)0;
01134
01135 }
01136
01137 #line 229 "machine/hppa/hppa.pat.m"
01138 }
01139 bool InstructionPatterns::c_c_nonneg(ADDRESS& lc) {
01140
01141
01142 #line 231 "machine/hppa/hppa.pat.m"
01143 {
01144 dword MATCH_p =
01145
01146 #line 231 "machine/hppa/hppa.pat.m"
01147 lc
01148 ;
01149 unsigned MATCH_w_32_0;
01150 {
01151 MATCH_w_32_0 = getDword(MATCH_p);
01152 if ((MATCH_w_32_0 >> 26 & 0x3f) == 2 &&
01153 ((MATCH_w_32_0 >> 6 & 0x3f) == 0 ||
01154 4 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
01155 (MATCH_w_32_0 >> 6 & 0x3f) < 6 ||
01156 7 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
01157 (MATCH_w_32_0 >> 6 & 0x3f) < 18 ||
01158 19 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
01159 (MATCH_w_32_0 >> 6 & 0x3f) < 32 ||
01160 (MATCH_w_32_0 >> 6 & 0x3f) == 34 ||
01161 38 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
01162 (MATCH_w_32_0 >> 6 & 0x3f) < 44 ||
01163 46 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
01164 (MATCH_w_32_0 >> 6 & 0x3f) < 49 ||
01165 51 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
01166 (MATCH_w_32_0 >> 6 & 0x3f) < 53 ||
01167 56 <= (MATCH_w_32_0 >> 6 & 0x3f) &&
01168 (MATCH_w_32_0 >> 6 & 0x3f) < 61) &&
01169 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01170 (32 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01171 (MATCH_w_32_0 >> 26 & 0x3f) < 34 ||
01172 39 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01173 (MATCH_w_32_0 >> 26 & 0x3f) < 42) ||
01174 (MATCH_w_32_0 >> 26 & 0x3f) == 36 &&
01175 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01176 ((MATCH_w_32_0 >> 26 & 0x3f) == 37 ||
01177 44 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01178 (MATCH_w_32_0 >> 26 & 0x3f) < 46) &&
01179 (MATCH_w_32_0 >> 12 & 0x1) == 0 &&
01180 (0 <= (MATCH_w_32_0 >> 11 & 0x1) &&
01181 (MATCH_w_32_0 >> 11 & 0x1) < 2) ||
01182 (50 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01183 (MATCH_w_32_0 >> 26 & 0x3f) < 52 ||
01184 (MATCH_w_32_0 >> 26 & 0x3f) == 59) &&
01185 (MATCH_w_32_0 >> 15 & 0x1) == 0 ||
01186 (MATCH_w_32_0 >> 26 & 0x3f) == 52 &&
01187 (MATCH_w_32_0 >> 15 & 0x1) == 0 &&
01188 (MATCH_w_32_0 >> 12 & 0x1) == 0 &&
01189 (MATCH_w_32_0 >> 10 & 0x1) == 0 &&
01190 (0 <= (MATCH_w_32_0 >> 11 & 0x1) &&
01191 (MATCH_w_32_0 >> 11 & 0x1) < 2) ||
01192 (MATCH_w_32_0 >> 26 & 0x3f) == 52 &&
01193 (MATCH_w_32_0 >> 15 & 0x1) == 0 &&
01194 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01195 (0 <= (MATCH_w_32_0 >> 11 & 0x1) &&
01196 (MATCH_w_32_0 >> 11 & 0x1) < 2) &&
01197 (0 <= (MATCH_w_32_0 >> 10 & 0x1) &&
01198 (MATCH_w_32_0 >> 10 & 0x1) < 2) ||
01199 (MATCH_w_32_0 >> 26 & 0x3f) == 53 &&
01200 (MATCH_w_32_0 >> 15 & 0x1) == 0 &&
01201 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
01202 (MATCH_w_32_0 >> 12 & 0x1) < 2) &&
01203 (0 <= (MATCH_w_32_0 >> 11 & 0x1) &&
01204 (MATCH_w_32_0 >> 11 & 0x1) < 2) &&
01205 (0 <= (MATCH_w_32_0 >> 10 & 0x1) &&
01206 (MATCH_w_32_0 >> 10 & 0x1) < 2))
01207 goto MATCH_label_i1;
01208 else
01209 goto MATCH_label_i0;
01210
01211 }goto MATCH_finished_i;
01212
01213 MATCH_label_i0: (void)0;
01214
01215 #line 234 "machine/hppa/hppa.pat.m"
01216
01217 return false;
01218
01219
01220
01221 goto MATCH_finished_i;
01222
01223 MATCH_label_i1: (void)0;
01224
01225 #line 232 "machine/hppa/hppa.pat.m"
01226
01227
01228 return true;
01229
01230
01231
01232 goto MATCH_finished_i;
01233
01234 MATCH_finished_i: (void)0;
01235
01236 }
01237
01238 #line 237 "machine/hppa/hppa.pat.m"
01239 }
01240 bool InstructionPatterns::c_l_addr_none(ADDRESS& lc) {
01241
01242
01243 #line 239 "machine/hppa/hppa.pat.m"
01244 {
01245 dword MATCH_p =
01246
01247 #line 239 "machine/hppa/hppa.pat.m"
01248 lc
01249 ;
01250 unsigned MATCH_w_32_0;
01251 {
01252 MATCH_w_32_0 = getDword(MATCH_p);
01253 if (16 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01254 (MATCH_w_32_0 >> 26 & 0x3f) < 20 ||
01255 24 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01256 (MATCH_w_32_0 >> 26 & 0x3f) < 28)
01257
01258 #line 240 "machine/hppa/hppa.pat.m"
01259
01260
01261 return true;
01262
01263
01264
01265 else
01266
01267 #line 242 "machine/hppa/hppa.pat.m"
01268
01269 return false;
01270
01271
01272
01273
01274 }goto MATCH_finished_h;
01275
01276 MATCH_finished_h: (void)0;
01277
01278 }
01279
01280 #line 245 "machine/hppa/hppa.pat.m"
01281 }
01282 bool InstructionPatterns::c_s_addr_ma(ADDRESS& lc) {
01283
01284
01285 #line 247 "machine/hppa/hppa.pat.m"
01286 {
01287 dword MATCH_p =
01288
01289 #line 247 "machine/hppa/hppa.pat.m"
01290 lc
01291 ;
01292 unsigned MATCH_w_32_0;
01293 {
01294 MATCH_w_32_0 = getDword(MATCH_p);
01295 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01296 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
01297 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01298 (MATCH_w_32_0 >> 26 & 0x3f) < 9 ||
01299 (MATCH_w_32_0 >> 26 & 0x3f) == 10 ||
01300 12 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01301 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
01302 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01303 (MATCH_w_32_0 >> 13 & 0x1) == 0 &&
01304 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01305 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01306 (MATCH_w_32_0 >> 13 & 0x1) == 0 &&
01307 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01308 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
01309 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01310 (MATCH_w_32_0 >> 13 & 0x1) == 0 &&
01311 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01312 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
01313 (12 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01314 (MATCH_w_32_0 >> 6 & 0xf) < 14) ||
01315 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01316 (MATCH_w_32_0 >> 13 & 0x1) == 1 ||
01317 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01318 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01319 (MATCH_w_32_0 >> 13 & 0x1) == 0 &&
01320 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01321 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01322 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01323 (MATCH_w_32_0 >> 13 & 0x1) == 0 &&
01324 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01325 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
01326 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01327 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01328 (MATCH_w_32_0 >> 13 & 0x1) == 0 &&
01329 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01330 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
01331 (1 <= (MATCH_w_32_0 >> 7 & 0x3) &&
01332 (MATCH_w_32_0 >> 7 & 0x3) < 4) ||
01333 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01334 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01335 (MATCH_w_32_0 >> 13 & 0x1) == 1)
01336 goto MATCH_label_g0;
01337 else
01338 goto MATCH_label_g1;
01339
01340 }goto MATCH_finished_g;
01341
01342 MATCH_label_g0: (void)0;
01343
01344 #line 250 "machine/hppa/hppa.pat.m"
01345
01346 return false;
01347
01348
01349
01350 goto MATCH_finished_g;
01351
01352 MATCH_label_g1: (void)0;
01353
01354 #line 248 "machine/hppa/hppa.pat.m"
01355
01356
01357 return true;
01358
01359
01360
01361 goto MATCH_finished_g;
01362
01363 MATCH_finished_g: (void)0;
01364
01365 }
01366
01367 #line 253 "machine/hppa/hppa.pat.m"
01368 }
01369 bool InstructionPatterns::c_s_addr_mb(ADDRESS& lc) {
01370
01371
01372 #line 255 "machine/hppa/hppa.pat.m"
01373 {
01374 dword MATCH_p =
01375
01376 #line 255 "machine/hppa/hppa.pat.m"
01377 lc
01378 ;
01379 unsigned MATCH_w_32_0;
01380 {
01381 MATCH_w_32_0 = getDword(MATCH_p);
01382 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01383 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
01384 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01385 (MATCH_w_32_0 >> 26 & 0x3f) < 9 ||
01386 (MATCH_w_32_0 >> 26 & 0x3f) == 10 ||
01387 12 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01388 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
01389 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01390 (MATCH_w_32_0 >> 13 & 0x1) == 0 ||
01391 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01392 (MATCH_w_32_0 >> 13 & 0x1) == 1 &&
01393 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01394 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01395 (MATCH_w_32_0 >> 13 & 0x1) == 1 &&
01396 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01397 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
01398 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01399 (MATCH_w_32_0 >> 13 & 0x1) == 1 &&
01400 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01401 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
01402 (12 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01403 (MATCH_w_32_0 >> 6 & 0xf) < 14) ||
01404 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01405 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01406 (MATCH_w_32_0 >> 13 & 0x1) == 0 ||
01407 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01408 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01409 (MATCH_w_32_0 >> 13 & 0x1) == 1 &&
01410 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01411 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01412 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01413 (MATCH_w_32_0 >> 13 & 0x1) == 1 &&
01414 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01415 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
01416 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01417 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01418 (MATCH_w_32_0 >> 13 & 0x1) == 1 &&
01419 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01420 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
01421 (1 <= (MATCH_w_32_0 >> 7 & 0x3) &&
01422 (MATCH_w_32_0 >> 7 & 0x3) < 4))
01423 goto MATCH_label_f0;
01424 else
01425 goto MATCH_label_f1;
01426
01427 }goto MATCH_finished_f;
01428
01429 MATCH_label_f0: (void)0;
01430
01431 #line 258 "machine/hppa/hppa.pat.m"
01432
01433 return false;
01434
01435
01436
01437 goto MATCH_finished_f;
01438
01439 MATCH_label_f1: (void)0;
01440
01441 #line 256 "machine/hppa/hppa.pat.m"
01442
01443
01444 return true;
01445
01446
01447
01448 goto MATCH_finished_f;
01449
01450 MATCH_finished_f: (void)0;
01451
01452 }
01453
01454 #line 261 "machine/hppa/hppa.pat.m"
01455 }
01456 bool InstructionPatterns::c_s_addr_notm(ADDRESS& lc) {
01457
01458
01459 #line 263 "machine/hppa/hppa.pat.m"
01460 {
01461 dword MATCH_p =
01462
01463 #line 263 "machine/hppa/hppa.pat.m"
01464 lc
01465 ;
01466 unsigned MATCH_w_32_0;
01467 {
01468 MATCH_w_32_0 = getDword(MATCH_p);
01469 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01470 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
01471 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01472 (MATCH_w_32_0 >> 26 & 0x3f) < 9 ||
01473 (MATCH_w_32_0 >> 26 & 0x3f) == 10 ||
01474 12 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01475 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
01476 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01477 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01478 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01479 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01480 (MATCH_w_32_0 >> 5 & 0x1) == 0 &&
01481 (12 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01482 (MATCH_w_32_0 >> 6 & 0xf) < 14) ||
01483 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01484 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01485 (MATCH_w_32_0 >> 5 & 0x1) == 1 ||
01486 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01487 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01488 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01489 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01490 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01491 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01492 (MATCH_w_32_0 >> 5 & 0x1) == 0 &&
01493 (1 <= (MATCH_w_32_0 >> 7 & 0x3) &&
01494 (MATCH_w_32_0 >> 7 & 0x3) < 4) ||
01495 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01496 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01497 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01498 (MATCH_w_32_0 >> 5 & 0x1) == 1)
01499 goto MATCH_label_e0;
01500 else
01501 goto MATCH_label_e1;
01502
01503 }goto MATCH_finished_e;
01504
01505 MATCH_label_e0: (void)0;
01506
01507 #line 266 "machine/hppa/hppa.pat.m"
01508
01509 return false;
01510
01511
01512
01513 goto MATCH_finished_e;
01514
01515 MATCH_label_e1: (void)0;
01516
01517 #line 264 "machine/hppa/hppa.pat.m"
01518
01519
01520 return true;
01521
01522
01523
01524 goto MATCH_finished_e;
01525
01526 MATCH_finished_e: (void)0;
01527
01528 }
01529
01530 #line 269 "machine/hppa/hppa.pat.m"
01531 }
01532 bool InstructionPatterns::l_addr_16_old$c_l_addr_none(ADDRESS& lc, int& a, bool a_isVAR) {
01533
01534
01535 #line 271 "machine/hppa/hppa.pat.m"
01536 {
01537 dword MATCH_p =
01538
01539 #line 271 "machine/hppa/hppa.pat.m"
01540 lc
01541 ;
01542 unsigned MATCH_w_32_0;
01543 {
01544 MATCH_w_32_0 = getDword(MATCH_p);
01545 if (16 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01546 (MATCH_w_32_0 >> 26 & 0x3f) < 20 ||
01547 24 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01548 (MATCH_w_32_0 >> 26 & 0x3f) < 28) {
01549 unsigned _a =
01550 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 13) +
01551 (MATCH_w_32_0 >> 1 & 0x1fff) ;
01552
01553 #line 273 "machine/hppa/hppa.pat.m"
01554
01555
01556 if (!a_isVAR && (int)_a != a) return false; else a = _a;
01557
01558 return true;
01559
01560
01561
01562
01563 }
01564 else
01565
01566 #line 275 "machine/hppa/hppa.pat.m"
01567
01568 return false;
01569
01570
01571
01572
01573 }goto MATCH_finished_d;
01574
01575 MATCH_finished_d: (void)0;
01576
01577 }
01578
01579 #line 278 "machine/hppa/hppa.pat.m"
01580 }
01581 bool InstructionPatterns::s_addr_im_r$c_s_addr_ma(ADDRESS& lc, int& a, bool a_isVAR) {
01582
01583
01584 #line 280 "machine/hppa/hppa.pat.m"
01585 {
01586 dword MATCH_p =
01587
01588 #line 280 "machine/hppa/hppa.pat.m"
01589 lc
01590 ;
01591 unsigned MATCH_w_32_0;
01592 {
01593 MATCH_w_32_0 = getDword(MATCH_p);
01594 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01595 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
01596 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01597 (MATCH_w_32_0 >> 26 & 0x3f) < 9 ||
01598 (MATCH_w_32_0 >> 26 & 0x3f) == 10 ||
01599 12 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01600 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
01601 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01602 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01603 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01604 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01605 (8 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01606 (MATCH_w_32_0 >> 6 & 0xf) < 16) ||
01607 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01608 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01609 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01610 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01611 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01612 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01613 (1 <= (MATCH_w_32_0 >> 7 & 0x3) &&
01614 (MATCH_w_32_0 >> 7 & 0x3) < 4))
01615 goto MATCH_label_c0;
01616 else
01617 goto MATCH_label_c1;
01618
01619 }goto MATCH_finished_c;
01620
01621 MATCH_label_c0: (void)0;
01622
01623 #line 284 "machine/hppa/hppa.pat.m"
01624
01625 return false;
01626
01627
01628
01629 goto MATCH_finished_c;
01630
01631 MATCH_label_c1: (void)0;
01632 {
01633 unsigned _a =
01634 (sign_extend((MATCH_w_32_0 >> 16 & 0x1) , 1) << 4) +
01635 (MATCH_w_32_0 >> 17 & 0xf) ;
01636
01637 #line 282 "machine/hppa/hppa.pat.m"
01638
01639
01640 if (!a_isVAR && (int)_a != a) return false; else a = _a;
01641
01642 return true;
01643
01644
01645
01646
01647 }
01648 goto MATCH_finished_c;
01649
01650 MATCH_finished_c: (void)0;
01651
01652 }
01653
01654 #line 287 "machine/hppa/hppa.pat.m"
01655 }
01656 bool InstructionPatterns::s_addr_im_r$c_s_addr_mb(ADDRESS& lc, int& a, bool a_isVAR) {
01657
01658
01659 #line 289 "machine/hppa/hppa.pat.m"
01660 {
01661 dword MATCH_p =
01662
01663 #line 289 "machine/hppa/hppa.pat.m"
01664 lc
01665 ;
01666 unsigned MATCH_w_32_0;
01667 {
01668 MATCH_w_32_0 = getDword(MATCH_p);
01669 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01670 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
01671 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01672 (MATCH_w_32_0 >> 26 & 0x3f) < 9 ||
01673 (MATCH_w_32_0 >> 26 & 0x3f) == 10 ||
01674 12 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01675 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
01676 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01677 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01678 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01679 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01680 (8 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01681 (MATCH_w_32_0 >> 6 & 0xf) < 16) ||
01682 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01683 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01684 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01685 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01686 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01687 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01688 (1 <= (MATCH_w_32_0 >> 7 & 0x3) &&
01689 (MATCH_w_32_0 >> 7 & 0x3) < 4))
01690 goto MATCH_label_b0;
01691 else
01692 goto MATCH_label_b1;
01693
01694 }goto MATCH_finished_b;
01695
01696 MATCH_label_b0: (void)0;
01697
01698 #line 293 "machine/hppa/hppa.pat.m"
01699
01700 return false;
01701
01702
01703
01704 goto MATCH_finished_b;
01705
01706 MATCH_label_b1: (void)0;
01707 {
01708 unsigned _a =
01709 (sign_extend((MATCH_w_32_0 >> 16 & 0x1) , 1) << 4) +
01710 (MATCH_w_32_0 >> 17 & 0xf) ;
01711
01712 #line 291 "machine/hppa/hppa.pat.m"
01713
01714
01715 if (!a_isVAR && (int)_a != a) return false; else a = _a;
01716
01717 return true;
01718
01719
01720
01721
01722 }
01723 goto MATCH_finished_b;
01724
01725 MATCH_finished_b: (void)0;
01726
01727 }
01728
01729 #line 296 "machine/hppa/hppa.pat.m"
01730 }
01731 bool InstructionPatterns::s_addr_im_r$c_s_addr_notm(ADDRESS& lc, int& a, bool a_isVAR) {
01732
01733
01734 #line 298 "machine/hppa/hppa.pat.m"
01735 {
01736 dword MATCH_p =
01737
01738 #line 298 "machine/hppa/hppa.pat.m"
01739 lc
01740 ;
01741 unsigned MATCH_w_32_0;
01742 {
01743 MATCH_w_32_0 = getDword(MATCH_p);
01744 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01745 (MATCH_w_32_0 >> 26 & 0x3f) < 3 ||
01746 4 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01747 (MATCH_w_32_0 >> 26 & 0x3f) < 9 ||
01748 (MATCH_w_32_0 >> 26 & 0x3f) == 10 ||
01749 12 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01750 (MATCH_w_32_0 >> 26 & 0x3f) < 64 ||
01751 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01752 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01753 (MATCH_w_32_0 >> 26 & 0x3f) == 3 &&
01754 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01755 (8 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01756 (MATCH_w_32_0 >> 6 & 0xf) < 16) ||
01757 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01758 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01759 (MATCH_w_32_0 >> 12 & 0x1) == 0 ||
01760 ((MATCH_w_32_0 >> 26 & 0x3f) == 9 ||
01761 (MATCH_w_32_0 >> 26 & 0x3f) == 11) &&
01762 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01763 (1 <= (MATCH_w_32_0 >> 7 & 0x3) &&
01764 (MATCH_w_32_0 >> 7 & 0x3) < 4))
01765 goto MATCH_label_a0;
01766 else
01767 goto MATCH_label_a1;
01768
01769 }goto MATCH_finished_a;
01770
01771 MATCH_label_a0: (void)0;
01772
01773 #line 302 "machine/hppa/hppa.pat.m"
01774
01775 return false;
01776
01777
01778
01779 goto MATCH_finished_a;
01780
01781 MATCH_label_a1: (void)0;
01782 {
01783 unsigned _a =
01784 (sign_extend((MATCH_w_32_0 >> 16 & 0x1) , 1) << 4) +
01785 (MATCH_w_32_0 >> 17 & 0xf) ;
01786
01787 #line 300 "machine/hppa/hppa.pat.m"
01788
01789
01790 if (!a_isVAR && (int)_a != a) return false; else a = _a;
01791
01792 return true;
01793
01794
01795
01796
01797 }
01798 goto MATCH_finished_a;
01799
01800 MATCH_finished_a: (void)0;
01801
01802 }
01803
01804 #line 306 "machine/hppa/hppa.pat.m"
01805 }
01806 Logue* InstructionPatterns::std_call(CSR& csr, ADDRESS& lc, int& addr)
01807 {
01808 ADDRESS __save = lc;
01809 if (
01810 BL$c_br_nnull(lc, addr, VAR, RP, VAL)) {
01811 vector<int> params(1); params[0] = addr;
01812 if (__save == lc) return NULL;
01813 return csr.instantiateLogue("std_call",params);
01814 } else {
01815 lc = __save;
01816 return NULL;
01817 }
01818 }
01819 Logue* InstructionPatterns::gcc_frame(CSR& csr, ADDRESS& lc, int& locals)
01820 {
01821 ADDRESS __save = lc;
01822 int __loc0;
01823 int __loc1;
01824 int __loc2;
01825 int __loc3;
01826 if (
01827 STW$l_addr_16_old$c_l_addr_none(lc, RP, VAL, __loc0 = -20, VAL, __loc1 = 0, VAL, SP, VAL) &&
01828 OR$c_arith_w$c_c_nonneg(lc, __loc0 = 0, VAL, __loc1 = 3, VAL, __loc2 = 0, VAL, __loc3 = 1, VAL) &&
01829 OR$c_arith_w$c_c_nonneg(lc, __loc0 = 0, VAL, SP, VAL, __loc1 = 0, VAL, __loc2 = 3, VAL) &&
01830 STWM$l_addr_16_old$c_l_addr_none(lc, __loc0 = 1, VAL, locals, VAR, __loc1 = 0, VAL, SP, VAL) &&
01831 ((STW$l_addr_16_old$c_l_addr_none(lc, __loc0 = 4, VAL, __loc1 = 8, VAL, __loc2 = 0, VAL, __loc3 = 3, VAL)) || true)) {
01832 vector<int> params(1); params[0] = locals;
01833 if (__save == lc) return NULL;
01834 return csr.instantiateLogue("gcc_frame",params);
01835 } else {
01836 lc = __save;
01837 return NULL;
01838 }
01839 }
01840 Logue* InstructionPatterns::gcc_frameless(CSR& csr, ADDRESS& lc, int& locals)
01841 {
01842 ADDRESS __save = lc;
01843 int __loc0;
01844 int __loc1;
01845 int __loc2;
01846 if (
01847 STW$l_addr_16_old$c_l_addr_none(lc, RP, VAL, __loc0 = -20, VAL, __loc1 = 0, VAL, SP, VAL) &&
01848 (LDO(lc, locals, VAR, SP, VAL, SP, VAL) ||
01849 STWM$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, locals, VAR, __loc1 = 0, VAL, SP, VAL)) &&
01850 ((STW$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, __loc1, VAR, __loc2 = 0, VAL, SP, VAL)) || true)) {
01851 vector<int> params(1); params[0] = locals;
01852 if (__save == lc) return NULL;
01853 return csr.instantiateLogue("gcc_frameless",params);
01854 } else {
01855 lc = __save;
01856 return NULL;
01857 }
01858 }
01859 Logue* InstructionPatterns::param_reloc1(CSR& csr, ADDRESS& lc, int& libstub, int& locals)
01860 {
01861 ADDRESS __save = lc;
01862 int __loc0;
01863 int __loc1;
01864 int __loc2;
01865 if (
01866 FSTDS$s_addr_im_r$c_s_addr_ma(lc, __loc0 = 7, VAL, __loc1 = 8, VAL, __loc2 = 0, VAL, SP, VAL) &&
01867 LDWS$s_addr_im_r$c_s_addr_notm(lc, __loc0 = -4, VAL, __loc1 = 0, VAL, SP, VAL, __loc2 = 24, VAL) &&
01868 LDWS$s_addr_im_r$c_s_addr_mb(lc, __loc0 = -8, VAL, __loc1 = 0, VAL, SP, VAL, __loc2 = 23, VAL) &&
01869 BL$c_br_null(lc, libstub, VAR, __loc0 = 0, VAL)) {
01870 vector<int> params(2); params[0] = libstub; params[1] = locals;
01871 if (__save == lc) return NULL;
01872 return csr.instantiateLogue("param_reloc1",params);
01873 } else {
01874 lc = __save;
01875 return NULL;
01876 }
01877 }
01878 Logue* InstructionPatterns::gcc_unframe(CSR& csr, ADDRESS& lc)
01879 {
01880 ADDRESS __save = lc;
01881 int __loc0;
01882 int __loc1;
01883 int __loc2;
01884 int __loc3;
01885 if (
01886 ((LDW$l_addr_16_old$c_l_addr_none(lc, __loc0 = -20, VAL, __loc1 = 0, VAL, __loc2 = 3, VAL, RP, VAL)) || true) &&
01887 ((LDW$l_addr_16_old$c_l_addr_none(lc, __loc0 = 8, VAL, __loc1 = 0, VAL, __loc2 = 3, VAL, __loc3 = 4, VAL)) || true) &&
01888 LDO(lc, __loc0, VAR, __loc1 = 3, VAL, SP, VAL) &&
01889 LDWM$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, __loc1 = 0, VAL, SP, VAL, __loc2 = 3, VAL) &&
01890 BV$c_br_null(lc, R0, VAL, RP, VAL)) {
01891 vector<int> params(0);
01892 if (__save == lc) return NULL;
01893 return csr.instantiateLogue("gcc_unframe",params);
01894 } else {
01895 lc = __save;
01896 return NULL;
01897 }
01898 }
01899 Logue* InstructionPatterns::gcc_unframeless1(CSR& csr, ADDRESS& lc)
01900 {
01901 ADDRESS __save = lc;
01902 int __loc0;
01903 int __loc1;
01904 int __loc2;
01905 if (
01906 ((LDW$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, __loc1 = 0, VAL, SP, VAL, RP, VAL)) || true) &&
01907 ((LDW$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, __loc1 = 0, VAL, SP, VAL, __loc2, VAR)) || true) &&
01908 BV$c_br_nnull(lc, R0, VAL, RP, VAL) &&
01909 LDWM$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, __loc1 = 0, VAL, SP, VAL, __loc2, VAR)) {
01910 vector<int> params(0);
01911 if (__save == lc) return NULL;
01912 return csr.instantiateLogue("gcc_unframeless1",params);
01913 } else {
01914 lc = __save;
01915 return NULL;
01916 }
01917 }
01918 Logue* InstructionPatterns::gcc_unframeless2(CSR& csr, ADDRESS& lc)
01919 {
01920 ADDRESS __save = lc;
01921 int __loc0;
01922 int __loc1;
01923 int __loc2;
01924 if (
01925 ((LDW$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, __loc1 = 0, VAL, SP, VAL, __loc2 = 4, VAL)) || true) &&
01926 LDW$l_addr_16_old$c_l_addr_none(lc, __loc0, VAR, __loc1 = 0, VAL, SP, VAL, __loc2 = 3, VAL) &&
01927 BV$c_br_nnull(lc, R0, VAL, RP, VAL) &&
01928 LDO(lc, __loc0, VAR, SP, VAL, SP, VAL)) {
01929 vector<int> params(0);
01930 if (__save == lc) return NULL;
01931 return csr.instantiateLogue("gcc_unframeless2",params);
01932 } else {
01933 lc = __save;
01934 return NULL;
01935 }
01936 }
01937 Logue* InstructionPatterns::bare_ret(CSR& csr, ADDRESS& lc)
01938 {
01939 ADDRESS __save = lc;
01940 if (
01941 BV$c_br_nnull(lc, R0, VAL, RP, VAL)) {
01942 vector<int> params(0);
01943 if (__save == lc) return NULL;
01944 return csr.instantiateLogue("bare_ret",params);
01945 } else {
01946 lc = __save;
01947 return NULL;
01948 }
01949 }
01950 Logue* InstructionPatterns::bare_ret_anulled(CSR& csr, ADDRESS& lc)
01951 {
01952 ADDRESS __save = lc;
01953 if (
01954 BV$c_br_null(lc, R0, VAL, RP, VAL)) {
01955 vector<int> params(0);
01956 if (__save == lc) return NULL;
01957 return csr.instantiateLogue("bare_ret_anulled",params);
01958 } else {
01959 lc = __save;
01960 return NULL;
01961 }
01962 }
01963 LogueDict::LogueDict()
01964 {
01965 {
01966 list<string> params;
01967 params.push_back("addr");
01968 theSemTable.addItem("addr");
01969 this->newLogue("std_call","CALLER_PROLOGUE",params);
01970 }
01971 {
01972 list<string> params;
01973 params.push_back("locals");
01974 theSemTable.addItem("locals");
01975 this->newLogue("gcc_frame","CALLEE_PROLOGUE",params);
01976 }
01977 {
01978 list<string> params;
01979 params.push_back("locals");
01980 theSemTable.addItem("locals");
01981 this->newLogue("gcc_frameless","CALLEE_PROLOGUE",params);
01982 }
01983 {
01984 list<string> params;
01985 params.push_back("libstub");
01986 theSemTable.addItem("libstub");
01987 params.push_back("locals");
01988 theSemTable.addItem("locals");
01989 this->newLogue("param_reloc1","CALLEE_PROLOGUE",params);
01990 }
01991 {
01992 list<string> params;
01993 this->newLogue("gcc_unframe","CALLEE_EPILOGUE",params);
01994 }
01995 {
01996 list<string> params;
01997 this->newLogue("gcc_unframeless1","CALLEE_EPILOGUE",params);
01998 }
01999 {
02000 list<string> params;
02001 this->newLogue("gcc_unframeless2","CALLEE_EPILOGUE",params);
02002 }
02003 {
02004 list<string> params;
02005 this->newLogue("bare_ret","CALLEE_EPILOGUE",params);
02006 }
02007 {
02008 list<string> params;
02009 this->newLogue("bare_ret_anulled","CALLEE_EPILOGUE",params);
02010 }
02011 }
02012
02013