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/disassembler.m"
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 #include "global.h"
00036 #include "decoder.h"
00037 #include "BinaryFile.h"
00038
00039 #include "hppa-names.h"
00040
00041
00042 extern char _assembly[];
00043 char aprefix[256];
00044 char adata[256];
00045 char* apre;
00046 char* astr;
00047 char *cmpltsep = ".";
00048
00049
00050 const char* GetSym(unsigned pc);
00051 const char* GetReloc(unsigned pc);
00052
00053
00054 #define ANAME apre += sprintf( apre, "%s", name );
00055
00056
00057
00058
00059
00060 #define CONS(x) strcat(constrName, x);
00061 #define IGNORE(x) not_used(*(int*)&x);
00062
00063
00064 void not_used(int unwanted)
00065 {
00066 unwanted = 0;
00067 }
00068
00069 DWord getDword (unsigned lc)
00070
00071
00072 {
00073 return
00074 (DWord)
00075 ((((((
00076 *(Byte *)lc << 8
00077 ) + *(Byte *)(lc+1)) << 8
00078 ) + *(Byte *)(lc+2)) << 8
00079 ) + *(Byte *)(lc+3));
00080 }
00081
00082 static char killBuffer[32];
00083
00084
00085 char* killDot(char* str)
00086 {
00087 strcpy(killBuffer, str);
00088 char* p = strchr(killBuffer, '.');
00089 if (p) *p = '\0';
00090 return killBuffer;
00091 }
00092
00093 static char shexBuffer[32];
00094
00095 char* signedHex(int disp)
00096 {
00097 if (disp < 0)
00098 sprintf(shexBuffer, "-0x%x", -disp);
00099 else
00100 sprintf(shexBuffer, "0x%x", disp);
00101 return shexBuffer;
00102 }
00103
00104
00105
00106 int dis_c_c_n(ADDRESS hostpc)
00107 {
00108 int result = 0;
00109
00110
00111 #line 105 "machine/hppa/disassembler.m"
00112 {
00113 dword MATCH_p =
00114
00115 #line 105 "machine/hppa/disassembler.m"
00116 hostpc
00117 ;
00118 unsigned MATCH_w_32_0;
00119 {
00120 MATCH_w_32_0 = getDword(MATCH_p);
00121
00122 switch((MATCH_w_32_0 >> 26 & 0x3f) ) {
00123 case 0: case 1: case 3: case 4: case 5: case 6: case 7: case 8:
00124 case 9: case 10: case 11: case 12: case 13: case 14: case 15:
00125 case 16: case 17: case 18: case 19: case 20: case 21: case 22:
00126 case 23: case 24: case 25: case 26: case 27: case 28: case 29:
00127 case 30: case 31: case 38: case 46: case 48: case 49: case 54:
00128 case 55: case 56: case 57: case 58: case 60: case 61: case 62:
00129 case 63:
00130 goto MATCH_label_h0; break;
00131 case 2:
00132
00133 switch((MATCH_w_32_0 >> 6 & 0x3f) ) {
00134 case 0: case 4: case 5: case 7: case 8: case 9: case 10:
00135 case 11: case 12: case 13: case 14: case 15: case 16: case 17:
00136 case 19: case 20: case 21: case 22: case 23: case 24: case 25:
00137 case 26: case 27: case 28: case 29: case 30: case 31: case 34:
00138 case 38: case 39: case 40: case 41: case 42: case 43: case 46:
00139 case 47: case 48: case 51: case 52: case 56: case 57: case 58:
00140 case 59: case 60:
00141 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
00142 goto MATCH_label_h2;
00143 else
00144 goto MATCH_label_h1;
00145
00146 break;
00147 case 1: case 2: case 3: case 6: case 18: case 32: case 33:
00148 case 35: case 36: case 37: case 44: case 45: case 49: case 50:
00149 case 53: case 54: case 55: case 61: case 62: case 63:
00150 goto MATCH_label_h0; break;
00151 default: assert(0);
00152 }
00153 break;
00154 case 32: case 33: case 39: case 40: case 41:
00155 goto MATCH_label_h1; break;
00156 case 34: case 35: case 42: case 43: case 47:
00157 goto MATCH_label_h2; break;
00158 case 36:
00159 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
00160 goto MATCH_label_h2;
00161 else
00162 goto MATCH_label_h1;
00163
00164 break;
00165 case 37: case 44: case 45:
00166 if ((MATCH_w_32_0 >> 12 & 0x1) == 1 &&
00167 (0 <= (MATCH_w_32_0 >> 11 & 0x1) &&
00168 (MATCH_w_32_0 >> 11 & 0x1) < 2))
00169 goto MATCH_label_h2;
00170 else
00171 goto MATCH_label_h1;
00172
00173 break;
00174 case 50: case 51:
00175 if ((MATCH_w_32_0 >> 15 & 0x1) == 1)
00176 goto MATCH_label_h2;
00177 else
00178 goto MATCH_label_h1;
00179
00180 break;
00181 case 52:
00182 if ((MATCH_w_32_0 >> 15 & 0x1) == 1)
00183 if ((MATCH_w_32_0 >> 13 & 0x7) == 0 ||
00184 2 <= (MATCH_w_32_0 >> 13 & 0x7) &&
00185 (MATCH_w_32_0 >> 13 & 0x7) < 8 ||
00186 (MATCH_w_32_0 >> 13 & 0x7) == 1 &&
00187 (MATCH_w_32_0 >> 12 & 0x1) == 0 &&
00188 (MATCH_w_32_0 >> 10 & 0x1) == 1)
00189 goto MATCH_label_h0;
00190 else
00191 goto MATCH_label_h2;
00192 else
00193 if ((MATCH_w_32_0 >> 12 & 0x1) == 0 &&
00194 (MATCH_w_32_0 >> 10 & 0x1) == 1)
00195 goto MATCH_label_h0;
00196 else
00197 goto MATCH_label_h1;
00198 break;
00199 case 53:
00200 if ((MATCH_w_32_0 >> 15 & 0x1) == 1)
00201 if ((MATCH_w_32_0 >> 13 & 0x7) == 0 ||
00202 2 <= (MATCH_w_32_0 >> 13 & 0x7) &&
00203 (MATCH_w_32_0 >> 13 & 0x7) < 8)
00204 goto MATCH_label_h0;
00205 else
00206 goto MATCH_label_h2;
00207 else
00208 goto MATCH_label_h1;
00209 break;
00210 case 59:
00211 if ((MATCH_w_32_0 >> 15 & 0x1) == 1)
00212 if ((MATCH_w_32_0 >> 13 & 0x7) == 1)
00213 goto MATCH_label_h2;
00214 else
00215 goto MATCH_label_h0;
00216 else
00217 goto MATCH_label_h1;
00218 break;
00219 default: assert(0);
00220 }
00221
00222 }goto MATCH_finished_h;
00223
00224 MATCH_label_h0: (void)0;
00225 assert(0);
00226 goto MATCH_finished_h;
00227
00228 MATCH_label_h1: (void)0;
00229
00230 #line 106 "machine/hppa/disassembler.m"
00231 { result = 0; }
00232
00233
00234
00235 goto MATCH_finished_h;
00236
00237 MATCH_label_h2: (void)0;
00238
00239 #line 107 "machine/hppa/disassembler.m"
00240 { result = 8; }
00241
00242
00243
00244 goto MATCH_finished_h;
00245
00246 MATCH_finished_h: (void)0;
00247
00248 }
00249
00250 #line 110 "machine/hppa/disassembler.m"
00251 return result;
00252 }
00253
00254 void NJMCDecoder::dis_c_c(ADDRESS hostpc)
00255 {
00256 static char *logw[] = {"",",=",",<",",OD"
00257 ,",TR",",!=",",>=",",EV"};
00258
00259
00260 static char *cmpsubw[] = {"",",=",",<",",<=",",<<",",<<=",
00261 ",SV",",OD",
00262 ",TR",",<>",",>=",",>",",>>=",
00263 ",>>",",NSV",",EV"};
00264 static char *cmpsubdw[] = {"",",*=",",*<",",*<=",",*<<",",*<<=",
00265 ",*SV",",*OD",
00266 ",*TR",",*<>",",*>=",",*>",",*>>=",
00267 ",*>>",",*NSV",",*EV"};
00268
00269
00270
00271
00272
00273 #line 129 "machine/hppa/disassembler.m"
00274 {
00275 dword MATCH_p =
00276
00277 #line 129 "machine/hppa/disassembler.m"
00278 hostpc
00279 ;
00280 unsigned MATCH_w_32_0;
00281 {
00282 MATCH_w_32_0 = getDword(MATCH_p);
00283
00284 switch((MATCH_w_32_0 >> 26 & 0x3f) ) {
00285 case 0: case 1: case 3: case 4: case 5: case 6: case 7: case 8:
00286 case 9: case 11: case 12: case 13: case 14: case 15: case 16:
00287 case 17: case 18: case 19: case 20: case 21: case 22: case 23:
00288 case 24: case 25: case 26: case 27: case 28: case 29: case 30:
00289 case 31: case 38: case 46: case 54: case 55: case 56: case 57:
00290 case 58: case 59: case 60: case 61: case 62: case 63:
00291 goto MATCH_label_g0; break;
00292 case 2:
00293
00294 switch((MATCH_w_32_0 >> 6 & 0x3f) ) {
00295 case 0: case 4: case 5: case 7: case 8: case 9: case 10:
00296 case 11: case 12: case 13: case 14: case 15: case 16: case 17:
00297 case 19: case 20: case 21: case 22: case 23: case 24: case 25:
00298 case 26: case 27: case 28: case 29: case 30: case 31: case 34:
00299 case 38: case 39: case 40: case 41: case 42: case 43: case 46:
00300 case 47: case 48: case 51: case 52: case 56: case 57: case 58:
00301 case 59: case 60:
00302 if ((MATCH_w_32_0 >> 5 & 0x1) == 1 &&
00303 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
00304 (MATCH_w_32_0 >> 12 & 0x1) < 2)) {
00305 unsigned c3_16 =
00306 (MATCH_w_32_0 >> 13 & 0x7) ;
00307 unsigned neg = addressToPC(MATCH_p);
00308
00309 #line 135 "machine/hppa/disassembler.m"
00310 {
00311
00312 apre += sprintf(apre, "%s", cmpsubdw[c3_16 + dis_c_c_n(neg)]);
00313
00314 CONS("c_arith_dw ")
00315
00316 }
00317
00318
00319
00320
00321 }
00322 else
00323 goto MATCH_label_g1;
00324
00325 break;
00326 case 1: case 2: case 3: case 6: case 18: case 32: case 33:
00327 case 35: case 36: case 37: case 44: case 45: case 49: case 50:
00328 case 53: case 54: case 55: case 61: case 62: case 63:
00329 goto MATCH_label_g0; break;
00330 default: assert(0);
00331 }
00332 break;
00333 case 10:
00334
00335 #line 158 "machine/hppa/disassembler.m"
00336 {
00337
00338 }
00339
00340
00341
00342
00343 break;
00344 case 32: case 33: case 34: case 35:
00345 {
00346 unsigned c3_16 = (MATCH_w_32_0 >> 13 & 0x7) ;
00347 unsigned neg = addressToPC(MATCH_p);
00348
00349 #line 139 "machine/hppa/disassembler.m"
00350 {
00351
00352 apre += sprintf(apre, "%s", cmpsubw[c3_16 + dis_c_c_n(neg)]);
00353
00354 CONS("c_cmpb_w ")
00355
00356 }
00357
00358
00359
00360
00361 }
00362
00363 break;
00364 case 36:
00365 goto MATCH_label_g1; break;
00366 case 37: case 44: case 45:
00367 goto MATCH_label_g1; break;
00368 case 39: case 47:
00369 {
00370 unsigned c3_16 = (MATCH_w_32_0 >> 13 & 0x7) ;
00371 unsigned neg = addressToPC(MATCH_p);
00372
00373 #line 143 "machine/hppa/disassembler.m"
00374 {
00375
00376 apre += sprintf(apre, "%s", cmpsubdw[c3_16 + dis_c_c_n(neg)]);
00377
00378 CONS("c_cmpb_dw ")
00379
00380 }
00381
00382
00383
00384
00385 }
00386
00387 break;
00388 case 40: case 41: case 42: case 43:
00389 goto MATCH_label_g1; break;
00390 case 48: case 49:
00391 if ((MATCH_w_32_0 >> 13 & 0x1) == 1) {
00392 unsigned c_16 = (MATCH_w_32_0 >> 15 & 0x1) ;
00393
00394 #line 155 "machine/hppa/disassembler.m"
00395 {
00396
00397 apre += sprintf(apre, "[%d]",1-c_16);
00398
00399 CONS("c_bbs_dw ")
00400
00401 }
00402
00403
00404
00405
00406 }
00407 else {
00408 unsigned c_16 = (MATCH_w_32_0 >> 15 & 0x1) ;
00409
00410 #line 151 "machine/hppa/disassembler.m"
00411 {
00412
00413 apre += sprintf(apre, "[%d]",1-c_16);
00414
00415 CONS("c_bbs_w ")
00416
00417 }
00418
00419
00420
00421
00422 }
00423
00424 break;
00425 case 50: case 51:
00426 goto MATCH_label_g2; break;
00427 case 52:
00428 if ((MATCH_w_32_0 >> 12 & 0x1) == 0 &&
00429 (MATCH_w_32_0 >> 10 & 0x1) == 1)
00430 goto MATCH_label_g0;
00431 else
00432 goto MATCH_label_g2;
00433
00434 break;
00435 case 53:
00436 goto MATCH_label_g2; break;
00437 default: assert(0);
00438 }
00439
00440 }goto MATCH_finished_g;
00441
00442 MATCH_label_g0: (void)0;
00443
00444 #line 161 "machine/hppa/disassembler.m"
00445 {
00446
00447 astr += sprintf(astr, "#c_C%08X", getDword(hostpc));
00448
00449 }
00450
00451
00452
00453 goto MATCH_finished_g;
00454
00455 MATCH_label_g1: (void)0;
00456 {
00457 unsigned c3_16 = (MATCH_w_32_0 >> 13 & 0x7) ;
00458 unsigned neg = addressToPC(MATCH_p);
00459
00460 #line 131 "machine/hppa/disassembler.m"
00461 {
00462
00463 apre += sprintf(apre, "%s", cmpsubw[c3_16 + dis_c_c_n(neg)]);
00464
00465 CONS("c_arith_w ")
00466
00467 }
00468
00469
00470
00471
00472 }
00473 goto MATCH_finished_g;
00474
00475 MATCH_label_g2: (void)0;
00476 {
00477 unsigned c3_16 =
00478 ((MATCH_w_32_0 >> 15 & 0x1) << 2) +
00479 (MATCH_w_32_0 >> 13 & 0x3) ;
00480
00481 #line 147 "machine/hppa/disassembler.m"
00482 {
00483
00484 apre += sprintf(apre, "%s", logw[c3_16]);
00485
00486 CONS("c_sep ")
00487
00488 }
00489
00490
00491
00492
00493 }
00494 goto MATCH_finished_g;
00495
00496 MATCH_finished_g: (void)0;
00497
00498 }
00499
00500 #line 165 "machine/hppa/disassembler.m"
00501 }
00502
00503 void NJMCDecoder::dis_c_xd(ADDRESS hostpc)
00504 {
00505
00506
00507
00508 #line 169 "machine/hppa/disassembler.m"
00509 {
00510 dword MATCH_p =
00511
00512 #line 169 "machine/hppa/disassembler.m"
00513 hostpc
00514 ;
00515 unsigned MATCH_w_32_0;
00516 {
00517 MATCH_w_32_0 = getDword(MATCH_p);
00518
00519 switch((MATCH_w_32_0 >> 26 & 0x3f) ) {
00520 case 0: case 1: case 2: case 4: case 5: case 6: case 7: case 8:
00521 case 10: case 12: case 13: case 14: case 15: case 20: case 21:
00522 case 22: case 23: case 28: case 29: case 30: case 31: case 32:
00523 case 33: case 34: case 35: case 36: case 37: case 38: case 39:
00524 case 40: case 41: case 42: case 43: case 44: case 45: case 46:
00525 case 47: case 48: case 49: case 50: case 51: case 52: case 53:
00526 case 54: case 55: case 58: case 59: case 60: case 61: case 62:
00527 case 63:
00528 goto MATCH_label_f0; break;
00529 case 3:
00530 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
00531 if (8 <= (MATCH_w_32_0 >> 6 & 0xf) &&
00532 (MATCH_w_32_0 >> 6 & 0xf) < 16) {
00533 unsigned i =
00534 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 4) +
00535 (MATCH_w_32_0 >> 1 & 0xf) ;
00536
00537 #line 199 "machine/hppa/disassembler.m"
00538 {
00539
00540 astr += sprintf(astr, "%d", i);
00541
00542 CONS("s_addr_r_im ")
00543
00544 }
00545
00546
00547
00548
00549 }
00550 else
00551 goto MATCH_label_f4;
00552 else
00553
00554 switch((MATCH_w_32_0 >> 6 & 0xf) ) {
00555 case 0:
00556 if ((MATCH_w_32_0 >> 13 & 0x1) == 1) {
00557 unsigned x = (MATCH_w_32_0 >> 16 & 0x1f) ;
00558
00559 #line 175 "machine/hppa/disassembler.m"
00560 {
00561
00562 apre += sprintf(apre, "%s", ",s");
00563
00564 astr += sprintf(astr, "%s", x_11_names[x]);
00565
00566 CONS("x_addr_s_byte ")
00567
00568 }
00569
00570
00571
00572
00573 }
00574 else
00575 goto MATCH_label_f1;
00576
00577 break;
00578 case 1:
00579 if ((MATCH_w_32_0 >> 13 & 0x1) == 1) {
00580 unsigned x = (MATCH_w_32_0 >> 16 & 0x1f) ;
00581
00582 #line 180 "machine/hppa/disassembler.m"
00583 {
00584
00585 apre += sprintf(apre, "%s", ",s");
00586
00587 astr += sprintf(astr, "%s", x_11_names[x]);
00588
00589 CONS("x_addr_s_hwrd ")
00590
00591 }
00592
00593
00594
00595
00596 }
00597 else
00598 goto MATCH_label_f1;
00599
00600 break;
00601 case 2: case 6:
00602 if ((MATCH_w_32_0 >> 13 & 0x1) == 1)
00603 goto MATCH_label_f2;
00604 else
00605 goto MATCH_label_f1;
00606
00607 break;
00608 case 3: case 4: case 5: case 7:
00609 if ((MATCH_w_32_0 >> 13 & 0x1) == 1)
00610 goto MATCH_label_f3;
00611 else
00612 goto MATCH_label_f1;
00613
00614 break;
00615 case 8: case 9: case 10: case 11: case 12: case 13: case 14:
00616 case 15:
00617 goto MATCH_label_f0; break;
00618 default: assert(0);
00619 }
00620 break;
00621 case 9:
00622 if ((MATCH_w_32_0 >> 7 & 0x3) == 0)
00623 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
00624 goto MATCH_label_f4;
00625 else
00626 if ((MATCH_w_32_0 >> 13 & 0x1) == 1 &&
00627 (0 <= (MATCH_w_32_0 >> 9 & 0x1) &&
00628 (MATCH_w_32_0 >> 9 & 0x1) < 2))
00629 goto MATCH_label_f2;
00630 else
00631 goto MATCH_label_f1;
00632 else
00633 goto MATCH_label_f0;
00634 break;
00635 case 11:
00636 if ((MATCH_w_32_0 >> 7 & 0x3) == 0)
00637 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
00638 goto MATCH_label_f4;
00639 else
00640 if ((MATCH_w_32_0 >> 13 & 0x1) == 1 &&
00641 (0 <= (MATCH_w_32_0 >> 9 & 0x1) &&
00642 (MATCH_w_32_0 >> 9 & 0x1) < 2))
00643 goto MATCH_label_f3;
00644 else
00645 goto MATCH_label_f1;
00646 else
00647 goto MATCH_label_f0;
00648 break;
00649 case 16: case 17: case 18: case 19: case 24: case 25: case 26:
00650 case 27:
00651 {
00652 unsigned i =
00653 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 13) +
00654 (MATCH_w_32_0 >> 1 & 0x1fff) ;
00655
00656 #line 203 "machine/hppa/disassembler.m"
00657 {
00658
00659 astr += sprintf(astr, "%d", i);
00660
00661 CONS("l_addr_16_old ")
00662
00663 }
00664
00665
00666
00667
00668 }
00669
00670 break;
00671 case 56: case 57:
00672 {
00673 unsigned i =
00674 ((MATCH_w_32_0 >> 2 & 0x1) << 10) +
00675 ((MATCH_w_32_0 >> 16 & 0x1f) << 11) +
00676 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 16) +
00677 (MATCH_w_32_0 >> 3 & 0x3ff) ;
00678
00679 #line 207 "machine/hppa/disassembler.m"
00680 {
00681
00682 astr += sprintf(astr, "%d", i);
00683
00684 CONS("l_addr_17_old ")
00685
00686 }
00687
00688
00689
00690
00691 }
00692
00693 break;
00694 default: assert(0);
00695 }
00696
00697 }goto MATCH_finished_f;
00698
00699 MATCH_label_f0: (void)0;
00700
00701 #line 211 "machine/hppa/disassembler.m"
00702 {
00703
00704 apre += sprintf(apre, "#c_X_ADDR_SHIFT%08X", getDword(hostpc));
00705
00706 astr += sprintf(astr, "#c_X_ADDR_SHIFT%08X", getDword(hostpc));
00707
00708 }
00709
00710
00711
00712 goto MATCH_finished_f;
00713
00714 MATCH_label_f1: (void)0;
00715 {
00716 unsigned x = (MATCH_w_32_0 >> 16 & 0x1f) ;
00717
00718 #line 171 "machine/hppa/disassembler.m"
00719 {
00720
00721 astr += sprintf(astr, "%s", x_11_names[x]);
00722
00723 CONS("x_addr_nots ")
00724
00725 }
00726
00727
00728
00729
00730 }
00731 goto MATCH_finished_f;
00732
00733 MATCH_label_f2: (void)0;
00734 {
00735 unsigned x = (MATCH_w_32_0 >> 16 & 0x1f) ;
00736
00737 #line 185 "machine/hppa/disassembler.m"
00738 {
00739
00740 apre += sprintf(apre, "%s", ",s");
00741
00742 astr += sprintf(astr, "%s", x_11_names[x]);
00743
00744 CONS("x_addr_s_word ")
00745
00746 }
00747
00748
00749
00750
00751 }
00752 goto MATCH_finished_f;
00753
00754 MATCH_label_f3: (void)0;
00755 {
00756 unsigned x = (MATCH_w_32_0 >> 16 & 0x1f) ;
00757
00758 #line 190 "machine/hppa/disassembler.m"
00759 {
00760
00761 apre += sprintf(apre, "%s", ",s");
00762
00763 astr += sprintf(astr, "%s", x_11_names[x]);
00764
00765 CONS("x_addr_s_dwrd ")
00766
00767 }
00768
00769
00770
00771
00772 }
00773 goto MATCH_finished_f;
00774
00775 MATCH_label_f4: (void)0;
00776 {
00777 unsigned i =
00778 (sign_extend((MATCH_w_32_0 >> 16 & 0x1) , 1) << 4) +
00779 (MATCH_w_32_0 >> 17 & 0xf) ;
00780
00781 #line 195 "machine/hppa/disassembler.m"
00782 {
00783
00784 astr += sprintf(astr, "%d", i);
00785
00786 CONS("s_addr_im_r ")
00787
00788 }
00789
00790
00791
00792
00793 }
00794 goto MATCH_finished_f;
00795
00796 MATCH_finished_f: (void)0;
00797
00798 }
00799
00800 #line 216 "machine/hppa/disassembler.m"
00801 }
00802
00803 void NJMCDecoder::dis_c_wcr(ADDRESS hostpc)
00804 {
00805 unsigned long regl;
00806
00807
00808 #line 220 "machine/hppa/disassembler.m"
00809 {
00810 dword MATCH_p =
00811
00812 #line 220 "machine/hppa/disassembler.m"
00813 hostpc
00814 ;
00815 unsigned MATCH_w_32_0;
00816 {
00817 MATCH_w_32_0 = getDword(MATCH_p);
00818 if ((MATCH_w_32_0 >> 5 & 0xff) == 69)
00819 if ((MATCH_w_32_0 >> 26 & 0x3f) == 0)
00820 if ((MATCH_w_32_0 >> 14 & 0x1) == 1)
00821
00822 #line 226 "machine/hppa/disassembler.m"
00823 {
00824
00825 regl = 11;
00826
00827 apre += sprintf(apre, ",w");
00828
00829 CONS("c_mfctl_w ")
00830
00831 }
00832
00833
00834
00835 else {
00836 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
00837
00838 #line 222 "machine/hppa/disassembler.m"
00839 {
00840
00841 regl = r_06;
00842
00843 CONS("c_mfctl ")
00844
00845 }
00846
00847
00848
00849
00850 }
00851 else
00852 goto MATCH_label_e0;
00853 else
00854 goto MATCH_label_e0;
00855
00856 }goto MATCH_finished_e;
00857
00858 MATCH_label_e0: (void)0;
00859
00860 #line 231 "machine/hppa/disassembler.m"
00861 {
00862
00863 regl = 0;
00864
00865 apre += sprintf(apre, "#c_WCR%08X#", getDword(hostpc));
00866
00867 }
00868
00869
00870
00871 goto MATCH_finished_e;
00872
00873 MATCH_finished_e: (void)0;
00874
00875 }
00876
00877 #line 236 "machine/hppa/disassembler.m"
00878 astr += sprintf(astr, "%s", cr_06_names[regl]);
00879 }
00880
00881 void NJMCDecoder::dis_c_null(ADDRESS hostpc)
00882 {
00883
00884
00885 #line 240 "machine/hppa/disassembler.m"
00886 {
00887 dword MATCH_p =
00888
00889 #line 240 "machine/hppa/disassembler.m"
00890 hostpc
00891 ;
00892 unsigned MATCH_w_32_0;
00893 {
00894 MATCH_w_32_0 = getDword(MATCH_p);
00895
00896 switch((MATCH_w_32_0 >> 26 & 0x3f) ) {
00897 case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
00898 case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15:
00899 case 16: case 17: case 18: case 19: case 20: case 21: case 22:
00900 case 23: case 24: case 25: case 26: case 27: case 28: case 29:
00901 case 30: case 31: case 36: case 37: case 38: case 44: case 45:
00902 case 46: case 52: case 53: case 54: case 55: case 60: case 61:
00903 case 62: case 63:
00904
00905 #line 248 "machine/hppa/disassembler.m"
00906
00907 apre += sprintf(apre, "#c_NULL%08X#", getDword(hostpc));
00908
00909
00910
00911
00912 break;
00913 case 32: case 33: case 34: case 35: case 39: case 40: case 41:
00914 case 42: case 43: case 47: case 48: case 49: case 50: case 51:
00915 case 56: case 57: case 58: case 59:
00916 if ((MATCH_w_32_0 >> 1 & 0x1) == 1)
00917
00918 #line 245 "machine/hppa/disassembler.m"
00919 {
00920
00921 apre += sprintf(apre, ",n");
00922
00923 CONS("c_br_null ")
00924
00925 }
00926
00927
00928
00929 else
00930
00931 #line 242 "machine/hppa/disassembler.m"
00932 {
00933
00934 CONS("c_br_nnull ")
00935
00936 }
00937
00938
00939
00940
00941 break;
00942 default: assert(0);
00943 }
00944
00945 }goto MATCH_finished_d;
00946
00947 MATCH_finished_d: (void)0;
00948
00949 }
00950
00951 #line 252 "machine/hppa/disassembler.m"
00952 }
00953
00954 void NJMCDecoder::dis_c_bit(ADDRESS hostpc)
00955 {
00956
00957
00958 #line 255 "machine/hppa/disassembler.m"
00959 {
00960 dword MATCH_p =
00961
00962 #line 255 "machine/hppa/disassembler.m"
00963 hostpc
00964 ;
00965 unsigned MATCH_w_32_0;
00966 {
00967 MATCH_w_32_0 = getDword(MATCH_p);
00968 if (0 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
00969 (MATCH_w_32_0 >> 26 & 0x3f) < 48)
00970 goto MATCH_label_c0;
00971 else
00972 switch((MATCH_w_32_0 >> 26 & 0x3f) ) {
00973 case 50: case 51: case 52: case 53: case 54: case 55: case 56:
00974 case 57: case 58: case 59: case 60: case 61: case 62: case 63:
00975 goto MATCH_label_c0; break;
00976 case 48:
00977
00978 #line 261 "machine/hppa/disassembler.m"
00979 {
00980
00981 astr += sprintf(astr, "%s", "%cr11");
00982
00983 CONS("c_bitsar ")
00984
00985 }
00986
00987
00988
00989
00990 break;
00991 case 49:
00992 if ((MATCH_w_32_0 >> 13 & 0x1) == 0) {
00993 unsigned p_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
00994
00995 #line 257 "machine/hppa/disassembler.m"
00996 {
00997
00998 astr += sprintf(astr, "@%d",p_06);
00999
01000 CONS("c_bitpos_w ")
01001
01002 }
01003
01004
01005
01006
01007 }
01008 else
01009 goto MATCH_label_c0;
01010
01011 break;
01012 default: assert(0);
01013 }
01014
01015 }goto MATCH_finished_c;
01016
01017 MATCH_label_c0: (void)0;
01018
01019 #line 264 "machine/hppa/disassembler.m"
01020
01021 astr += sprintf(astr, "#c_BIT%08X#", getDword(hostpc));
01022
01023
01024
01025 goto MATCH_finished_c;
01026
01027 MATCH_finished_c: (void)0;
01028
01029 }
01030
01031 #line 268 "machine/hppa/disassembler.m"
01032 }
01033
01034 void NJMCDecoder::dis_c_addr(ADDRESS hostpc)
01035 {
01036
01037
01038 #line 271 "machine/hppa/disassembler.m"
01039 {
01040 dword MATCH_p =
01041
01042 #line 271 "machine/hppa/disassembler.m"
01043 hostpc
01044 ;
01045 unsigned MATCH_w_32_0;
01046 {
01047 MATCH_w_32_0 = getDword(MATCH_p);
01048 if (28 <= (MATCH_w_32_0 >> 26 & 0x3f) &&
01049 (MATCH_w_32_0 >> 26 & 0x3f) < 64)
01050 goto MATCH_label_b0;
01051 else
01052 switch((MATCH_w_32_0 >> 26 & 0x3f) ) {
01053 case 0: case 1: case 2: case 4: case 5: case 6: case 7: case 8:
01054 case 10: case 12: case 13: case 14: case 15: case 20: case 21:
01055 case 22: case 23:
01056 goto MATCH_label_b0; break;
01057 case 3:
01058 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
01059 if ((MATCH_w_32_0 >> 5 & 0x1) == 1)
01060 if ((MATCH_w_32_0 >> 13 & 0x1) == 1)
01061 if (12 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01062 (MATCH_w_32_0 >> 6 & 0xf) < 14)
01063
01064 #line 295 "machine/hppa/disassembler.m"
01065 {
01066
01067 apre += sprintf(apre, ",me");
01068
01069 CONS("c_y_addr_me ")
01070
01071 }
01072
01073
01074
01075 else
01076 goto MATCH_label_b5;
01077 else
01078 if (12 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01079 (MATCH_w_32_0 >> 6 & 0xf) < 14)
01080
01081 #line 299 "machine/hppa/disassembler.m"
01082 {
01083
01084 apre += sprintf(apre, ",m");
01085
01086 CONS("c_y_addr_m ")
01087
01088 }
01089
01090
01091
01092 else
01093 goto MATCH_label_b4;
01094 else
01095 if (12 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01096 (MATCH_w_32_0 >> 6 & 0xf) < 14)
01097 if ((MATCH_w_32_0 >> 13 & 0x1) == 1)
01098
01099 #line 291 "machine/hppa/disassembler.m"
01100 {
01101
01102 apre += sprintf(apre, ",e");
01103
01104 CONS("c_y_addr_e ")
01105
01106 }
01107
01108
01109
01110 else
01111
01112 #line 303 "machine/hppa/disassembler.m"
01113 {
01114
01115 CONS("c_y_addr_none ")
01116
01117 }
01118
01119
01120
01121 else
01122 goto MATCH_label_b3;
01123 else
01124 if (0 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01125 (MATCH_w_32_0 >> 6 & 0xf) < 8)
01126 if ((MATCH_w_32_0 >> 5 & 0x1) == 1)
01127 goto MATCH_label_b2;
01128 else
01129 goto MATCH_label_b1;
01130 else
01131 goto MATCH_label_b0;
01132 break;
01133 case 9: case 11:
01134 if ((MATCH_w_32_0 >> 7 & 0x3) == 0)
01135 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
01136 if ((MATCH_w_32_0 >> 5 & 0x1) == 1)
01137 if ((MATCH_w_32_0 >> 13 & 0x1) == 1 &&
01138 (0 <= (MATCH_w_32_0 >> 9 & 0x1) &&
01139 (MATCH_w_32_0 >> 9 & 0x1) < 2))
01140 goto MATCH_label_b5;
01141 else
01142 goto MATCH_label_b4;
01143 else
01144 goto MATCH_label_b3;
01145 else
01146 if ((MATCH_w_32_0 >> 5 & 0x1) == 1 &&
01147 (0 <= (MATCH_w_32_0 >> 9 & 0x1) &&
01148 (MATCH_w_32_0 >> 9 & 0x1) < 2))
01149 goto MATCH_label_b2;
01150 else
01151 goto MATCH_label_b1;
01152 else
01153 goto MATCH_label_b0;
01154 break;
01155 case 16: case 17: case 18: case 19: case 24: case 25: case 26:
01156 case 27:
01157
01158 #line 306 "machine/hppa/disassembler.m"
01159 {
01160
01161 CONS("c_l_addr_none ");
01162
01163 }
01164
01165
01166
01167
01168
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189
01190
01191
01192
01193
01194
01195
01196 break;
01197 default: assert(0);
01198 }
01199
01200 }goto MATCH_finished_b;
01201
01202 MATCH_label_b0: (void)0;
01203
01204 #line 323 "machine/hppa/disassembler.m"
01205
01206
01207
01208 CONS("BUG!!");
01209
01210
01211
01212 goto MATCH_finished_b;
01213
01214 MATCH_label_b1: (void)0;
01215
01216 #line 288 "machine/hppa/disassembler.m"
01217 {
01218
01219 CONS("c_x_addr_notm ")
01220
01221 }
01222
01223
01224
01225 goto MATCH_finished_b;
01226
01227 MATCH_label_b2: (void)0;
01228
01229 #line 284 "machine/hppa/disassembler.m"
01230 {
01231
01232 apre += sprintf(apre, ",x");
01233
01234 CONS("c_x_addr_m ")
01235
01236 }
01237
01238
01239
01240 goto MATCH_finished_b;
01241
01242 MATCH_label_b3: (void)0;
01243
01244 #line 281 "machine/hppa/disassembler.m"
01245 {
01246
01247 CONS("c_s_addr_notm ")
01248
01249 }
01250
01251
01252
01253 goto MATCH_finished_b;
01254
01255 MATCH_label_b4: (void)0;
01256
01257 #line 277 "machine/hppa/disassembler.m"
01258 {
01259
01260 apre += sprintf(apre, ",ma");
01261
01262 CONS("c_s_addr_ma ")
01263
01264 }
01265
01266
01267
01268 goto MATCH_finished_b;
01269
01270 MATCH_label_b5: (void)0;
01271
01272 #line 273 "machine/hppa/disassembler.m"
01273 {
01274
01275 apre += sprintf(apre, ",mb");
01276
01277 CONS("c_s_addr_mb ")
01278
01279 }
01280
01281
01282
01283 goto MATCH_finished_b;
01284
01285 MATCH_finished_b: (void)0;
01286
01287 }
01288
01289 #line 327 "machine/hppa/disassembler.m"
01290 }
01291
01292 void NJMCDecoder::dis_flt_fmt(int fmt)
01293 {
01294
01295 switch(fmt) {
01296 case 0: apre += sprintf(apre, ",sgl"); break;
01297 case 1: apre += sprintf(apre, ",dbl"); break;
01298 case 3: apre += sprintf(apre, ",quad"); break;
01299 default:apre += sprintf(apre, ",?"); break;
01300 }
01301 }
01302
01303 static char regbuf[32];
01304 char* NJMCDecoder::dis_freg(int regNum)
01305 {
01306 if (regNum >= 32)
01307 sprintf(regbuf, "fr%dR", regNum - 32);
01308 else
01309 sprintf(regbuf, "fr%d", regNum);
01310 return regbuf;
01311 }
01312
01313
01314
01315
01316
01317
01318
01319
01320
01321
01322
01323
01324
01325
01326
01327
01328
01329 int NJMCDecoder::decodeAssemblyInstruction (ADDRESS pc, int delta)
01330 {
01331 ADDRESS hostPC = pc + delta;
01332 *(apre = aprefix) = '\0';
01333 *(astr = adata) = '\0';
01334 apre += sprintf(apre, "%x: %08x ", pc, *(unsigned*)hostPC);
01335
01336
01337
01338 #line 372 "machine/hppa/disassembler.m"
01339 {
01340 dword MATCH_p =
01341
01342 #line 372 "machine/hppa/disassembler.m"
01343 hostPC
01344 ;
01345 char *MATCH_name;
01346 static char *MATCH_name_ext8_19_0[] = {
01347 "BREAK", (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01348 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01349 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01350 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01351 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01352 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01353 (char *)0, "MFSP", (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01354 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01355 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01356 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01357 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01358 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01359 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01360 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01361 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01362 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, "RFI", (char *)0,
01363 (char *)0, (char *)0, (char *)0, "RFI.r", (char *)0, (char *)0,
01364 (char *)0, (char *)0, (char *)0, "SSM", (char *)0, (char *)0, (char *)0,
01365 (char *)0, (char *)0, (char *)0, (char *)0, "RSM", (char *)0, (char *)0,
01366 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01367 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01368 (char *)0, (char *)0, (char *)0, "LDSID", (char *)0, (char *)0,
01369 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01370 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01371 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01372 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01373 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, "MFIA", (char *)0,
01374 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01375 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01376 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01377 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01378 (char *)0, (char *)0, "MTSP", "MTCTL", "MTSM", (char *)0, (char *)0,
01379 "MTSARCM",
01380 };
01381 static char *MATCH_name_ext5_11_1[] = {
01382 "SYNC", (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01383 (char *)0, (char *)0, (char *)0, "SYNCDMA",
01384 };
01385 static char *MATCH_name_ext_17_2[] = {"MFCTL", "MFCTL.w", };
01386 static char *MATCH_name_ext4_22_55[] = {
01387 "LDBS", "LDHS", "LDWS", "LDDS", "LDDAS", "LDCDS", "LDWAS", "LDCWS",
01388 "STBS", "STHS", "STWS", "STDS", "STBYS", "STDBYS", "STWAS", "STWDS",
01389 };
01390 static char *MATCH_name_op_58[] = {
01391 (char *)0, (char *)0, (char *)0, (char *)0, (char *)0, (char *)0,
01392 (char *)0, (char *)0, "LDIL", (char *)0, "ADDIL", (char *)0, (char *)0,
01393 "LDO", (char *)0, (char *)0, "LDB", "LDH", "LDW", "LDWM", (char *)0,
01394 (char *)0, (char *)0, (char *)0, "STB", "STH", "STW", "STWM",
01395 };
01396 static char *MATCH_name_sub_16_71[] = {
01397 "FID", "FTEST", "FCPY", "FABS", "FSQRT", "FRND", "FNEG", "FNEGABS",
01398 };
01399 static char *MATCH_name_sub_14_72[] = {
01400 "FCNVFF", "FCNVXF", "FCNVFX", "FCNVFXT",
01401 };
01402 static char *MATCH_name_sub_16_73[] = {"FCMP", "FSUB", "FMPY", "FDIV", };
01403 static char *MATCH_name_sub_16_74[] = {"FADD", "FTEST.E", };
01404 static char *MATCH_name_sub_14_75[] = {
01405 "FCNVFF.E", "FCNVXF.E", "FCNVFX.E", "FCNVFXT.E",
01406 };
01407 static char *MATCH_name_p_20_98[] = {"VSHD", "SHD", };
01408 static char *MATCH_name_se_21_99[] = {"VEXTRU", "VEXTRS", };
01409 static char *MATCH_name_se_21_100[] = {"EXTRU", "EXTRS", };
01410 static char *MATCH_name_se_21_101[] = {"ZVDEP", "VDEP", };
01411 static char *MATCH_name_se_21_102[] = {"ZDEP", "DEP", };
01412 static char *MATCH_name_se_21_103[] = {"ZVDEPI", "VDEPI", };
01413 static char *MATCH_name_se_21_104[] = {"ZDEPI", "DEPI", };
01414 unsigned MATCH_w_32_0;
01415 {
01416 MATCH_w_32_0 = getDword(MATCH_p);
01417
01418 switch((MATCH_w_32_0 >> 26 & 0x3f) ) {
01419 case 0:
01420 if (199 <= (MATCH_w_32_0 >> 5 & 0xff) &&
01421 (MATCH_w_32_0 >> 5 & 0xff) < 256)
01422 goto MATCH_label_a0;
01423 else
01424 switch((MATCH_w_32_0 >> 5 & 0xff) ) {
01425 case 0:
01426 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01427 ];
01428 {
01429 char *name = MATCH_name;
01430 unsigned im13_06 =
01431 (MATCH_w_32_0 >> 13 & 0x1fff) ;
01432 unsigned im5_27 = (MATCH_w_32_0 & 0x1f) ;
01433
01434 #line 544 "machine/hppa/disassembler.m"
01435 {
01436
01437 ANAME
01438
01439 astr += sprintf(astr, "%d,%d", im5_27,im13_06);
01440
01441 CONS("BREAK ")
01442
01443 }
01444
01445
01446
01447
01448 }
01449
01450 break;
01451 case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8:
01452 case 9: case 10: case 11: case 12: case 13: case 14: case 15:
01453 case 16: case 17: case 18: case 19: case 20: case 21: case 22:
01454 case 23: case 24: case 25: case 26: case 27: case 28: case 29:
01455 case 30: case 31: case 33: case 34: case 35: case 36: case 38:
01456 case 39: case 40: case 41: case 42: case 43: case 44: case 45:
01457 case 46: case 47: case 48: case 49: case 50: case 51: case 52:
01458 case 53: case 54: case 55: case 56: case 57: case 58: case 59:
01459 case 60: case 61: case 62: case 63: case 64: case 65: case 66:
01460 case 67: case 68: case 70: case 71: case 72: case 73: case 74:
01461 case 75: case 76: case 77: case 78: case 79: case 80: case 81:
01462 case 82: case 83: case 84: case 85: case 86: case 87: case 88:
01463 case 89: case 90: case 91: case 92: case 93: case 94: case 95:
01464 case 97: case 98: case 99: case 100: case 102: case 103:
01465 case 104: case 105: case 106: case 108: case 109: case 110:
01466 case 111: case 112: case 113: case 114: case 116: case 117:
01467 case 118: case 119: case 120: case 121: case 122: case 123:
01468 case 124: case 125: case 126: case 127: case 128: case 129:
01469 case 130: case 131: case 132: case 134: case 135: case 136:
01470 case 137: case 138: case 139: case 140: case 141: case 142:
01471 case 143: case 144: case 145: case 146: case 147: case 148:
01472 case 149: case 150: case 151: case 152: case 153: case 154:
01473 case 155: case 156: case 157: case 158: case 159: case 160:
01474 case 161: case 162: case 163: case 164: case 166: case 167:
01475 case 168: case 169: case 170: case 171: case 172: case 173:
01476 case 174: case 175: case 176: case 177: case 178: case 179:
01477 case 180: case 181: case 182: case 183: case 184: case 185:
01478 case 186: case 187: case 188: case 189: case 190: case 191:
01479 case 192: case 196: case 197:
01480 goto MATCH_label_a0; break;
01481 case 32:
01482 if ((MATCH_w_32_0 >> 16 & 0x1f) == 0 ||
01483 (MATCH_w_32_0 >> 16 & 0x1f) == 10) {
01484 MATCH_name =
01485 MATCH_name_ext5_11_1[(MATCH_w_32_0 >> 16 & 0x1f)
01486 ];
01487 goto MATCH_label_a1;
01488
01489 }
01490 else
01491 goto MATCH_label_a0;
01492
01493 break;
01494 case 37:
01495 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01496 ];
01497 {
01498 char *name = MATCH_name;
01499 unsigned sr =
01500 ((MATCH_w_32_0 >> 13 & 0x1) << 2) +
01501 (MATCH_w_32_0 >> 14 & 0x3) ;
01502 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
01503
01504 #line 591 "machine/hppa/disassembler.m"
01505 {
01506
01507 ANAME
01508
01509 astr += sprintf(astr, "%s,%s", s3_16_names[sr],
01510
01511 t_27_names[t_27]);
01512
01513 CONS("MFSP ")
01514
01515 }
01516
01517
01518
01519
01520 }
01521
01522 break;
01523 case 69:
01524 MATCH_name = MATCH_name_ext_17_2[(MATCH_w_32_0 >> 14 & 0x1)
01525 ];
01526 {
01527 char *name = MATCH_name;
01528 unsigned cmplt = addressToPC(MATCH_p);
01529 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
01530
01531 #line 563 "machine/hppa/disassembler.m"
01532 {
01533
01534 ANAME
01535
01536 dis_c_wcr(cmplt);
01537
01538 astr += sprintf(astr, ",%s", t_27_names[t_27]);
01539
01540 CONS("sysop_cr_t ")
01541
01542 }
01543
01544
01545
01546
01547 }
01548
01549 break;
01550 case 96: case 101:
01551 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01552 ];
01553 goto MATCH_label_a1;
01554
01555 break;
01556 case 107: case 115:
01557 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01558 ];
01559 {
01560 char *name = MATCH_name;
01561 unsigned im10_06 =
01562 (MATCH_w_32_0 >> 16 & 0x3ff) ;
01563 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
01564
01565 #line 549 "machine/hppa/disassembler.m"
01566 {
01567
01568 ANAME
01569
01570 astr += sprintf(astr, "%d,%s", im10_06,t_27_names[t_27]);
01571
01572 CONS("sysop_i_t ");
01573
01574 }
01575
01576
01577
01578
01579 }
01580
01581 break;
01582 case 133:
01583 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01584 ];
01585 {
01586 char *name = MATCH_name;
01587 unsigned b_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
01588 unsigned s2_16 =
01589 (MATCH_w_32_0 >> 14 & 0x3) ;
01590 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
01591
01592 #line 579 "machine/hppa/disassembler.m"
01593 {
01594
01595 ANAME
01596
01597 astr += sprintf(astr, "(%s,%s),%s", s2_16_names[s2_16],
01598
01599 b_06_names[b_06], t_27_names[t_27]);
01600
01601 CONS("LDSID ")
01602
01603 }
01604
01605
01606
01607
01608 }
01609
01610 break;
01611 case 165:
01612 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01613 ];
01614 {
01615 char *name = MATCH_name;
01616 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
01617
01618 #line 574 "machine/hppa/disassembler.m"
01619 {
01620
01621 ANAME
01622
01623 astr += sprintf(astr, "%s", t_27_names[t_27]);
01624
01625 CONS("MFIA ")
01626
01627 }
01628
01629
01630
01631
01632 }
01633
01634 break;
01635 case 193:
01636 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01637 ];
01638 {
01639 char *name = MATCH_name;
01640 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
01641 unsigned sr =
01642 ((MATCH_w_32_0 >> 13 & 0x1) << 2) +
01643 (MATCH_w_32_0 >> 14 & 0x3) ;
01644
01645 #line 585 "machine/hppa/disassembler.m"
01646 {
01647
01648 ANAME
01649
01650 astr += sprintf(astr, "%s,%s", r_11_names[r_11],
01651
01652 s3_16_names[sr]);
01653
01654 CONS("MTSP ")
01655
01656 }
01657
01658
01659
01660
01661 }
01662
01663 break;
01664 case 194:
01665 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01666 ];
01667 {
01668 char *name = MATCH_name;
01669 unsigned cr_06 =
01670 (MATCH_w_32_0 >> 21 & 0x1f) ;
01671 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
01672
01673 #line 569 "machine/hppa/disassembler.m"
01674 {
01675
01676 ANAME
01677
01678 astr += sprintf(astr, "%s,%s", r_11_names[r_11],cr_06_names[cr_06]);
01679
01680 CONS("MTCTL ")
01681
01682 }
01683
01684
01685
01686
01687 }
01688
01689 break;
01690 case 195: case 198:
01691 MATCH_name = MATCH_name_ext8_19_0[(MATCH_w_32_0 >> 5 & 0xff)
01692 ];
01693 {
01694 char *name = MATCH_name;
01695 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
01696
01697 #line 558 "machine/hppa/disassembler.m"
01698 {
01699
01700 ANAME
01701
01702 astr += sprintf(astr, "%s", r_11_names[r_11]);
01703
01704 CONS("sysop_r ")
01705
01706 }
01707
01708
01709
01710
01711 }
01712
01713 break;
01714 default: assert(0);
01715 }
01716 break;
01717 case 1: case 4: case 5: case 6: case 7: case 15: case 20: case 21:
01718 case 22: case 23: case 28: case 29: case 30: case 31: case 38:
01719 case 46: case 50: case 51: case 54: case 55: case 56: case 57:
01720 case 60: case 61: case 62: case 63:
01721 goto MATCH_label_a0; break;
01722 case 2:
01723
01724 switch((MATCH_w_32_0 >> 6 & 0x3f) ) {
01725 case 0:
01726 MATCH_name = "ANDCM"; goto MATCH_label_a2; break;
01727 case 1: case 2: case 3: case 6: case 18: case 32: case 33:
01728 case 35: case 36: case 37: case 44: case 45: case 49: case 50:
01729 case 53: case 54: case 55: case 61: case 62: case 63:
01730 goto MATCH_label_a0; break;
01731 case 4:
01732 MATCH_name = "HSUB.u"; goto MATCH_label_a2; break;
01733 case 5:
01734 MATCH_name = "HSUB.s"; goto MATCH_label_a2; break;
01735 case 7:
01736 MATCH_name = "HSUB"; goto MATCH_label_a2; break;
01737 case 8:
01738 MATCH_name = "AND"; goto MATCH_label_a2; break;
01739 case 9:
01740 if ((MATCH_w_32_0 >> 21 & 0x1f) == 0)
01741 if ((MATCH_w_32_0 >> 16 & 0x1f) == 0)
01742 if ((MATCH_w_32_0 & 0x1f) == 0)
01743
01744 #line 374 "machine/hppa/disassembler.m"
01745 {
01746
01747 apre += sprintf(apre, "%s", "NOP");
01748
01749 CONS("NOP ")
01750
01751 }
01752
01753
01754
01755 else {
01756 MATCH_name = "OR";
01757 goto MATCH_label_a2;
01758
01759 }
01760 else {
01761 unsigned r = (MATCH_w_32_0 >> 16 & 0x1f) ;
01762 unsigned t = (MATCH_w_32_0 & 0x1f) ;
01763
01764 #line 378 "machine/hppa/disassembler.m"
01765 {
01766
01767 apre += sprintf(apre, "%s", "COPY");
01768
01769 astr += sprintf(astr, "%s,%s", r_06_names[r], t_27_names[t]);
01770
01771 CONS("COPY ")
01772
01773 }
01774
01775
01776
01777
01778 }
01779 else { MATCH_name = "OR"; goto MATCH_label_a2; }
01780 break;
01781 case 10:
01782 MATCH_name = "XOR"; goto MATCH_label_a2; break;
01783 case 11:
01784 MATCH_name = "HAVG"; goto MATCH_label_a2; break;
01785 case 12:
01786 MATCH_name = "HADD.u"; goto MATCH_label_a2; break;
01787 case 13:
01788 MATCH_name = "HADD.s"; goto MATCH_label_a2; break;
01789 case 14:
01790 MATCH_name = "UXOR"; goto MATCH_label_a2; break;
01791 case 15:
01792 MATCH_name = "HADD"; goto MATCH_label_a2; break;
01793 case 16:
01794 MATCH_name = "SUB"; goto MATCH_label_a2; break;
01795 case 17:
01796 MATCH_name = "DS"; goto MATCH_label_a2; break;
01797 case 19:
01798 MATCH_name = "SUB.t"; goto MATCH_label_a2; break;
01799 case 20:
01800 MATCH_name = "SUB.b"; goto MATCH_label_a2; break;
01801 case 21:
01802 MATCH_name = "HSHR1ADD"; goto MATCH_label_a2; break;
01803 case 22:
01804 MATCH_name = "HSHR2ADD"; goto MATCH_label_a2; break;
01805 case 23:
01806 MATCH_name = "HSHR3ADD"; goto MATCH_label_a2; break;
01807 case 24:
01808 MATCH_name = "ADD"; goto MATCH_label_a2; break;
01809 case 25:
01810 MATCH_name = "SHL1ADD"; goto MATCH_label_a2; break;
01811 case 26:
01812 MATCH_name = "SHL2ADD"; goto MATCH_label_a2; break;
01813 case 27:
01814 MATCH_name = "SHL3ADD"; goto MATCH_label_a2; break;
01815 case 28:
01816 MATCH_name = "ADD.c"; goto MATCH_label_a2; break;
01817 case 29:
01818 MATCH_name = "HSHL1ADD"; goto MATCH_label_a2; break;
01819 case 30:
01820 MATCH_name = "HSHL2ADD"; goto MATCH_label_a2; break;
01821 case 31:
01822 MATCH_name = "HSHL3ADD"; goto MATCH_label_a2; break;
01823 case 34:
01824 MATCH_name = "CMPCLR"; goto MATCH_label_a2; break;
01825 case 38:
01826 MATCH_name = "UADDCM"; goto MATCH_label_a2; break;
01827 case 39:
01828 MATCH_name = "UADDCMT"; goto MATCH_label_a2; break;
01829 case 40:
01830 MATCH_name = "ADD.l"; goto MATCH_label_a2; break;
01831 case 41:
01832 MATCH_name = "SHL1ADD.l"; goto MATCH_label_a2; break;
01833 case 42:
01834 MATCH_name = "SHL2ADD.l"; goto MATCH_label_a2; break;
01835 case 43:
01836 MATCH_name = "SHL3ADD.l"; goto MATCH_label_a2; break;
01837 case 46:
01838 MATCH_name = "DCOR"; goto MATCH_label_a2; break;
01839 case 47:
01840 MATCH_name = "IDCOR"; goto MATCH_label_a2; break;
01841 case 48:
01842 MATCH_name = "SUB.v"; goto MATCH_label_a2; break;
01843 case 51:
01844 MATCH_name = "SUB.t.v"; goto MATCH_label_a2; break;
01845 case 52:
01846 MATCH_name = "SUB.b.v"; goto MATCH_label_a2; break;
01847 case 56:
01848 MATCH_name = "ADD.v"; goto MATCH_label_a2; break;
01849 case 57:
01850 MATCH_name = "SHL1ADD.v"; goto MATCH_label_a2; break;
01851 case 58:
01852 MATCH_name = "SHL2ADD.v"; goto MATCH_label_a2; break;
01853 case 59:
01854 MATCH_name = "SHL3ADD.v"; goto MATCH_label_a2; break;
01855 case 60:
01856 MATCH_name = "ADD.c.v"; goto MATCH_label_a2; break;
01857 default: assert(0);
01858 }
01859 break;
01860 case 3:
01861 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
01862 if ((MATCH_w_32_0 >> 5 & 0x1) == 1)
01863 if (0 <= (MATCH_w_32_0 >> 13 & 0x1) &&
01864 (MATCH_w_32_0 >> 13 & 0x1) < 2 &&
01865 (8 <= (MATCH_w_32_0 >> 6 & 0xf) &&
01866 (MATCH_w_32_0 >> 6 & 0xf) < 16)) {
01867 MATCH_name = MATCH_name_ext4_22_55[(MATCH_w_32_0 >> 6 & 0xf)
01868 ];
01869 goto MATCH_label_a4;
01870
01871 }
01872 else {
01873 MATCH_name = MATCH_name_ext4_22_55[(MATCH_w_32_0 >> 6 & 0xf)
01874 ];
01875 goto MATCH_label_a3;
01876
01877 }
01878 else
01879
01880 switch((MATCH_w_32_0 >> 6 & 0xf) ) {
01881 case 0: case 1: case 2: case 3: case 4: case 5: case 6:
01882 case 7:
01883 MATCH_name =
01884 MATCH_name_ext4_22_55[(MATCH_w_32_0 >> 6 & 0xf)
01885 ];
01886 goto MATCH_label_a3;
01887
01888 break;
01889 case 8: case 9: case 10: case 11: case 14: case 15:
01890 MATCH_name =
01891 MATCH_name_ext4_22_55[(MATCH_w_32_0 >> 6 & 0xf)
01892 ];
01893 goto MATCH_label_a4;
01894
01895 break;
01896 case 12:
01897 MATCH_name = "STBYS"; goto MATCH_label_a4; break;
01898 case 13:
01899 MATCH_name = "STDBYS"; goto MATCH_label_a4; break;
01900 default: assert(0);
01901 }
01902 else
01903
01904 switch((MATCH_w_32_0 >> 6 & 0xf) ) {
01905 case 0:
01906 MATCH_name = "LDBX"; goto MATCH_label_a3; break;
01907 case 1:
01908 MATCH_name = "LDHX"; goto MATCH_label_a3; break;
01909 case 2:
01910 MATCH_name = "LDWX"; goto MATCH_label_a3; break;
01911 case 3:
01912 MATCH_name = "LDDX"; goto MATCH_label_a3; break;
01913 case 4:
01914 MATCH_name = "LDDAX"; goto MATCH_label_a3; break;
01915 case 5:
01916 MATCH_name = "LDCDX"; goto MATCH_label_a3; break;
01917 case 6:
01918 MATCH_name = "LDWAX"; goto MATCH_label_a3; break;
01919 case 7:
01920 MATCH_name = "LDCWX"; goto MATCH_label_a3; break;
01921 case 8: case 9: case 10: case 11: case 12: case 13: case 14:
01922 case 15:
01923 goto MATCH_label_a0; break;
01924 default: assert(0);
01925 }
01926 break;
01927 case 8:
01928 MATCH_name =
01929 MATCH_name_op_58[(MATCH_w_32_0 >> 26 & 0x3f) ];
01930 {
01931 char *name = MATCH_name;
01932 unsigned imm21 =
01933 ((MATCH_w_32_0 >> 12 & 0x3) << 11) +
01934 ((MATCH_w_32_0 >> 16 & 0x1f) << 13) +
01935 ((MATCH_w_32_0 >> 14 & 0x3) << 18) +
01936 ((MATCH_w_32_0 >> 1 & 0x7ff) << 20) +
01937 (((MATCH_w_32_0 & 0x1) & 0x1) << 31);
01938 unsigned t_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
01939
01940 #line 400 "machine/hppa/disassembler.m"
01941 {
01942
01943 ANAME
01944
01945 astr += sprintf(astr, "0x%x,%s", imm21, t_06_names[t_06]);
01946
01947 CONS("LDIL ")
01948
01949 }
01950
01951
01952
01953
01954 }
01955
01956 break;
01957 case 9:
01958 if ((MATCH_w_32_0 >> 7 & 0x3) == 0)
01959 if ((MATCH_w_32_0 >> 9 & 0x1) == 1)
01960 if ((MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01961 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
01962 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01963 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
01964 (0 <= (MATCH_w_32_0 >> 13 & 0x1) &&
01965 (MATCH_w_32_0 >> 13 & 0x1) < 2)) {
01966 MATCH_name = "FSTWS";
01967 goto MATCH_label_a6;
01968
01969 }
01970 else {
01971 MATCH_name = "FSTWX";
01972 goto MATCH_label_a6;
01973
01974 }
01975 else
01976 if ((MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01977 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
01978 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
01979 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
01980 (0 <= (MATCH_w_32_0 >> 13 & 0x1) &&
01981 (MATCH_w_32_0 >> 13 & 0x1) < 2)) {
01982 MATCH_name = "FLDWS";
01983 goto MATCH_label_a5;
01984
01985 }
01986 else {
01987 MATCH_name = "FLDWX";
01988 goto MATCH_label_a5;
01989
01990 }
01991 else
01992 goto MATCH_label_a0;
01993 break;
01994 case 10:
01995 MATCH_name =
01996 MATCH_name_op_58[(MATCH_w_32_0 >> 26 & 0x3f) ];
01997 {
01998 char *name = MATCH_name;
01999 unsigned imm21 =
02000 ((MATCH_w_32_0 >> 12 & 0x3) << 11) +
02001 ((MATCH_w_32_0 >> 16 & 0x1f) << 13) +
02002 ((MATCH_w_32_0 >> 14 & 0x3) << 18) +
02003 ((MATCH_w_32_0 >> 1 & 0x7ff) << 20) +
02004 (((MATCH_w_32_0 & 0x1) & 0x1) << 31);
02005 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
02006
02007 #line 395 "machine/hppa/disassembler.m"
02008 {
02009
02010 ANAME
02011
02012 astr += sprintf(astr, "%d,%s,%s", imm21, r_06_names[r_06], t_11_names[1]);
02013
02014 CONS("ADDIL ")
02015
02016 }
02017
02018
02019
02020
02021 }
02022
02023 break;
02024 case 11:
02025 if ((MATCH_w_32_0 >> 7 & 0x3) == 0)
02026 if ((MATCH_w_32_0 >> 9 & 0x1) == 1)
02027 if ((MATCH_w_32_0 >> 12 & 0x1) == 1 &&
02028 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
02029 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
02030 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
02031 (0 <= (MATCH_w_32_0 >> 13 & 0x1) &&
02032 (MATCH_w_32_0 >> 13 & 0x1) < 2)) {
02033 MATCH_name = "FSTDS";
02034 goto MATCH_label_a8;
02035
02036 }
02037 else {
02038 MATCH_name = "FSTDX";
02039 goto MATCH_label_a8;
02040
02041 }
02042 else
02043 if ((MATCH_w_32_0 >> 12 & 0x1) == 1 &&
02044 (MATCH_w_32_0 >> 5 & 0x1) == 0 ||
02045 (MATCH_w_32_0 >> 12 & 0x1) == 1 &&
02046 (MATCH_w_32_0 >> 5 & 0x1) == 1 &&
02047 (0 <= (MATCH_w_32_0 >> 13 & 0x1) &&
02048 (MATCH_w_32_0 >> 13 & 0x1) < 2)) {
02049 MATCH_name = "FLDDS";
02050 goto MATCH_label_a7;
02051
02052 }
02053 else {
02054 MATCH_name = "FLDDX";
02055 goto MATCH_label_a7;
02056
02057 }
02058 else
02059 goto MATCH_label_a0;
02060 break;
02061 case 12:
02062
02063 switch((MATCH_w_32_0 >> 9 & 0x3) ) {
02064 case 0:
02065 if ((MATCH_w_32_0 >> 13 & 0x7) == 1)
02066 goto MATCH_label_a0;
02067 else {
02068 MATCH_name =
02069 MATCH_name_sub_16_71[(MATCH_w_32_0 >> 13 & 0x7)
02070 ];
02071 {
02072 char *name = MATCH_name;
02073 unsigned fmt =
02074 (MATCH_w_32_0 >> 11 & 0x3) ;
02075 unsigned r = (MATCH_w_32_0 >> 21 & 0x1f) ;
02076 unsigned t = (MATCH_w_32_0 & 0x1f) ;
02077
02078 #line 638 "machine/hppa/disassembler.m"
02079 {
02080
02081 apre += sprintf(apre, "%s", killDot(name));
02082
02083 dis_flt_fmt(fmt);
02084
02085 astr += sprintf(astr, "%s, ", dis_freg(r));
02086
02087 astr += sprintf(astr, "%s", dis_freg(t));
02088
02089 CONS("flt_c0_all ")
02090
02091 }
02092
02093
02094
02095
02096 }
02097
02098 }
02099
02100 break;
02101 case 1:
02102 if (0 <= (MATCH_w_32_0 >> 15 & 0x7) &&
02103 (MATCH_w_32_0 >> 15 & 0x7) < 4) {
02104 MATCH_name =
02105 MATCH_name_sub_14_72[(MATCH_w_32_0 >> 15 & 0x7)
02106 ];
02107 {
02108 char *name = MATCH_name;
02109 unsigned df = (MATCH_w_32_0 >> 13 & 0x3) ;
02110 unsigned r = (MATCH_w_32_0 >> 21 & 0x1f) ;
02111 unsigned sf = (MATCH_w_32_0 >> 11 & 0x3) ;
02112 unsigned t = (MATCH_w_32_0 & 0x1f) ;
02113
02114 #line 645 "machine/hppa/disassembler.m"
02115 {
02116
02117 apre += sprintf(apre, "%s", killDot(name));
02118
02119 dis_flt_fmt(sf);
02120
02121 dis_flt_fmt(df);
02122
02123 astr += sprintf(astr, "%s, ", dis_freg(r));
02124
02125 astr += sprintf(astr, "%s", dis_freg(t));
02126
02127 CONS("flt_c1_all ")
02128
02129 }
02130
02131
02132
02133
02134 }
02135
02136 }
02137 else
02138 goto MATCH_label_a0;
02139
02140 break;
02141 case 2:
02142
02143 switch((MATCH_w_32_0 >> 13 & 0x7) ) {
02144 case 0:
02145 MATCH_name =
02146 MATCH_name_sub_16_73[(MATCH_w_32_0 >> 13 & 0x7)
02147 ];
02148 goto MATCH_label_a9;
02149
02150 break;
02151 case 1:
02152 MATCH_name =
02153 MATCH_name_sub_16_71[(MATCH_w_32_0 >> 13 & 0x7)
02154 ];
02155 goto MATCH_label_a9;
02156
02157 break;
02158 case 2: case 3: case 4: case 5: case 6: case 7:
02159 goto MATCH_label_a0; break;
02160 default: assert(0);
02161 }
02162 break;
02163 case 3:
02164
02165 switch((MATCH_w_32_0 >> 13 & 0x7) ) {
02166 case 0:
02167 MATCH_name =
02168 MATCH_name_sub_16_74[(MATCH_w_32_0 >> 13 & 0x7)
02169 ];
02170 goto MATCH_label_a10;
02171
02172 break;
02173 case 1: case 2: case 3:
02174 MATCH_name =
02175 MATCH_name_sub_16_73[(MATCH_w_32_0 >> 13 & 0x7)
02176 ];
02177 goto MATCH_label_a10;
02178
02179 break;
02180 case 4: case 5: case 6: case 7:
02181 goto MATCH_label_a0; break;
02182 default: assert(0);
02183 }
02184 break;
02185 default: assert(0);
02186 }
02187 break;
02188 case 13:
02189 MATCH_name =
02190 MATCH_name_op_58[(MATCH_w_32_0 >> 26 & 0x3f) ];
02191 {
02192 char *name = MATCH_name;
02193 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
02194 unsigned ldisp =
02195 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 13) +
02196 (MATCH_w_32_0 >> 1 & 0x1fff) ;
02197 unsigned t = (MATCH_w_32_0 >> 16 & 0x1f) ;
02198
02199 #line 440 "machine/hppa/disassembler.m"
02200 {
02201
02202 ANAME
02203
02204 astr += sprintf(astr, "%d(%s),%s", ldisp, b_06_names[b], t_06_names[t]);
02205
02206 CONS("LDO ")
02207
02208 }
02209
02210
02211
02212
02213 }
02214
02215 break;
02216 case 14:
02217
02218 switch((MATCH_w_32_0 >> 9 & 0x3) ) {
02219 case 0:
02220 goto MATCH_label_a0; break;
02221 case 1:
02222 if (0 <= (MATCH_w_32_0 >> 15 & 0x7) &&
02223 (MATCH_w_32_0 >> 15 & 0x7) < 4) {
02224 MATCH_name =
02225 MATCH_name_sub_14_75[(MATCH_w_32_0 >> 15 & 0x7)
02226 ];
02227 {
02228 char *name = MATCH_name;
02229 unsigned df = (MATCH_w_32_0 >> 13 & 0x3) ;
02230 unsigned r =
02231 ((MATCH_w_32_0 >> 7 & 0x1) << 5) +
02232 (MATCH_w_32_0 >> 21 & 0x1f) ;
02233 unsigned sf = (MATCH_w_32_0 >> 11 & 0x3) ;
02234 unsigned t =
02235 ((MATCH_w_32_0 >> 6 & 0x1) << 5) +
02236 (MATCH_w_32_0 & 0x1f) ;
02237
02238 #line 645 "machine/hppa/disassembler.m"
02239 {
02240
02241 apre += sprintf(apre, "%s", killDot(name));
02242
02243 dis_flt_fmt(sf);
02244
02245 dis_flt_fmt(df);
02246
02247 astr += sprintf(astr, "%s, ", dis_freg(r));
02248
02249 astr += sprintf(astr, "%s", dis_freg(t));
02250
02251 CONS("flt_c1_all ")
02252
02253 }
02254
02255
02256
02257
02258 }
02259
02260 }
02261 else
02262 goto MATCH_label_a0;
02263
02264 break;
02265 case 2:
02266
02267 switch((MATCH_w_32_0 >> 13 & 0x7) ) {
02268 case 0:
02269 MATCH_name = "FCMP.E"; goto MATCH_label_a11; break;
02270 case 1:
02271 MATCH_name =
02272 MATCH_name_sub_16_74[(MATCH_w_32_0 >> 13 & 0x7)
02273 ];
02274 goto MATCH_label_a11;
02275
02276 break;
02277 case 2: case 3: case 4: case 5: case 6: case 7:
02278 goto MATCH_label_a0; break;
02279 default: assert(0);
02280 }
02281 break;
02282 case 3:
02283
02284 switch((MATCH_w_32_0 >> 13 & 0x7) ) {
02285 case 0:
02286 if ((MATCH_w_32_0 >> 8 & 0x1) == 0) {
02287 MATCH_name = "FADD.E";
02288 goto MATCH_label_a12;
02289
02290 }
02291 else
02292 goto MATCH_label_a0;
02293
02294 break;
02295 case 1:
02296 if ((MATCH_w_32_0 >> 8 & 0x1) == 0) {
02297 MATCH_name = "FSUB.E";
02298 goto MATCH_label_a12;
02299
02300 }
02301 else
02302 goto MATCH_label_a0;
02303
02304 break;
02305 case 2:
02306 if ((MATCH_w_32_0 >> 8 & 0x1) == 1) {
02307 unsigned r1 =
02308 ((MATCH_w_32_0 >> 7 & 0x1) << 5) +
02309 (MATCH_w_32_0 >> 21 & 0x1f) ;
02310 unsigned r2 =
02311 ((MATCH_w_32_0 >> 12 & 0x1) << 5) +
02312 (MATCH_w_32_0 >> 16 & 0x1f) ;
02313 unsigned t =
02314 ((MATCH_w_32_0 >> 6 & 0x1) << 5) +
02315 (MATCH_w_32_0 & 0x1f) ;
02316
02317 #line 671 "machine/hppa/disassembler.m"
02318 {
02319
02320 apre += sprintf(apre, "XMPYU");
02321
02322 astr += sprintf(astr, "%s, ", dis_freg(r1));
02323
02324 astr += sprintf(astr, "%s, ", dis_freg(r2));
02325
02326 astr += sprintf(astr, "%s", dis_freg(t));
02327
02328 CONS("FMPYU ");
02329
02330 }
02331
02332
02333
02334
02335
02336
02337
02338
02339 }
02340 else {
02341 MATCH_name = "FMPY.E";
02342 goto MATCH_label_a12;
02343
02344 }
02345
02346 break;
02347 case 3:
02348 if ((MATCH_w_32_0 >> 8 & 0x1) == 0) {
02349 MATCH_name = "FDIV.E";
02350 goto MATCH_label_a12;
02351
02352 }
02353 else
02354 goto MATCH_label_a0;
02355
02356 break;
02357 case 4: case 5: case 6: case 7:
02358 goto MATCH_label_a0; break;
02359 default: assert(0);
02360 }
02361 break;
02362 default: assert(0);
02363 }
02364 break;
02365 case 16: case 17: case 18: case 19:
02366 MATCH_name =
02367 MATCH_name_op_58[(MATCH_w_32_0 >> 26 & 0x3f) ];
02368 {
02369 char *name = MATCH_name;
02370 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
02371 unsigned c_addr = addressToPC(MATCH_p);
02372 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
02373 unsigned t_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
02374 unsigned xd = addressToPC(MATCH_p);
02375
02376 #line 422 "machine/hppa/disassembler.m"
02377 {
02378
02379 ANAME
02380
02381 IGNORE(c_addr)
02382
02383 dis_c_xd(xd);
02384
02385 astr += sprintf(astr, "(%s,%s),%s",
02386
02387 s2_16_names[s], b_06_names[b],
02388
02389 t_11_names[t_11]);
02390
02391 CONS("iloads_ldisp ")
02392
02393 }
02394
02395
02396
02397
02398 }
02399
02400 break;
02401 case 24: case 25: case 26: case 27:
02402 MATCH_name =
02403 MATCH_name_op_58[(MATCH_w_32_0 >> 26 & 0x3f) ];
02404 {
02405 char *name = MATCH_name;
02406 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
02407 unsigned c_addr = addressToPC(MATCH_p);
02408 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
02409 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
02410 unsigned xd = addressToPC(MATCH_p);
02411
02412 #line 431 "machine/hppa/disassembler.m"
02413 {
02414
02415 ANAME
02416
02417 astr += sprintf(astr, "%s,", r_11_names[r_11]);
02418
02419 IGNORE(c_addr)
02420
02421 dis_c_xd(xd);
02422
02423 astr += sprintf(astr, "(%s,%s)",
02424
02425 s2_16_names[s], b_06_names[b]);
02426
02427 CONS("istores_ldisp ")
02428
02429 }
02430
02431
02432
02433
02434 }
02435
02436 break;
02437 case 32:
02438 MATCH_name = "CMPBT"; goto MATCH_label_a13; break;
02439 case 33:
02440 MATCH_name = "CMPIBT"; goto MATCH_label_a14; break;
02441 case 34:
02442 MATCH_name = "CMPBF"; goto MATCH_label_a13; break;
02443 case 35:
02444 MATCH_name = "CMPIBF"; goto MATCH_label_a14; break;
02445 case 36:
02446 MATCH_name = "CMPICLR"; goto MATCH_label_a15; break;
02447 case 37:
02448 if ((MATCH_w_32_0 >> 11 & 0x1) == 1 &&
02449 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
02450 (MATCH_w_32_0 >> 12 & 0x1) < 2)) {
02451 MATCH_name = "SUBI.v";
02452 goto MATCH_label_a15;
02453
02454 }
02455 else { MATCH_name = "SUBI"; goto MATCH_label_a15; }
02456
02457 break;
02458 case 39:
02459 MATCH_name = "CMPBdwt"; goto MATCH_label_a13; break;
02460 case 40:
02461 MATCH_name = "ADDBT"; goto MATCH_label_a16; break;
02462 case 41:
02463 MATCH_name = "ADDIBT"; goto MATCH_label_a17; break;
02464 case 42:
02465 MATCH_name = "ADDBF"; goto MATCH_label_a16; break;
02466 case 43:
02467 MATCH_name = "ADDIBF"; goto MATCH_label_a17; break;
02468 case 44:
02469 if ((MATCH_w_32_0 >> 11 & 0x1) == 1 &&
02470 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
02471 (MATCH_w_32_0 >> 12 & 0x1) < 2)) {
02472 MATCH_name = "ADDI.t.v";
02473 goto MATCH_label_a15;
02474
02475 }
02476 else { MATCH_name = "ADDI.t"; goto MATCH_label_a15; }
02477
02478 break;
02479 case 45:
02480 if ((MATCH_w_32_0 >> 11 & 0x1) == 1 &&
02481 (0 <= (MATCH_w_32_0 >> 12 & 0x1) &&
02482 (MATCH_w_32_0 >> 12 & 0x1) < 2)) {
02483 MATCH_name = "ADDI.v";
02484 goto MATCH_label_a15;
02485
02486 }
02487 else { MATCH_name = "ADDI"; goto MATCH_label_a15; }
02488
02489 break;
02490 case 47:
02491 MATCH_name = "CMPBdwf"; goto MATCH_label_a13; break;
02492 case 48:
02493 goto MATCH_label_a18; break;
02494 case 49:
02495 if ((MATCH_w_32_0 >> 13 & 0x1) == 1)
02496 goto MATCH_label_a0;
02497 else
02498 goto MATCH_label_a18;
02499
02500 break;
02501 case 52:
02502 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
02503 if ((MATCH_w_32_0 >> 11 & 0x1) == 1 &&
02504 (0 <= (MATCH_w_32_0 >> 10 & 0x1) &&
02505 (MATCH_w_32_0 >> 10 & 0x1) < 2)) {
02506 MATCH_name = MATCH_name_se_21_100[(MATCH_w_32_0 >> 10 & 0x1)
02507 ];
02508 {
02509 char *name = MATCH_name;
02510 unsigned c = addressToPC(MATCH_p);
02511 unsigned len = 32 - (MATCH_w_32_0 & 0x1f) ;
02512 unsigned p = (MATCH_w_32_0 >> 5 & 0x1f) ;
02513 unsigned r = (MATCH_w_32_0 >> 21 & 0x1f) ;
02514 unsigned t = (MATCH_w_32_0 >> 16 & 0x1f) ;
02515
02516 #line 466 "machine/hppa/disassembler.m"
02517 {
02518
02519 ANAME
02520
02521 dis_c_c(c);
02522
02523 astr += sprintf(astr, "%s,%d,%d,%s", r_11_names[r], p, len,
02524
02525 t_27_names[t]);
02526
02527 CONS("ext_fix ")
02528
02529 }
02530
02531
02532
02533
02534 }
02535
02536 }
02537 else {
02538 MATCH_name = MATCH_name_se_21_99[(MATCH_w_32_0 >> 10 & 0x1)
02539 ];
02540 {
02541 char *name = MATCH_name;
02542 unsigned c = addressToPC(MATCH_p);
02543 unsigned len = 32 - (MATCH_w_32_0 & 0x1f) ;
02544 unsigned r = (MATCH_w_32_0 >> 21 & 0x1f) ;
02545 unsigned t = (MATCH_w_32_0 >> 16 & 0x1f) ;
02546
02547 #line 459 "machine/hppa/disassembler.m"
02548 {
02549
02550 ANAME
02551
02552 dis_c_c(c);
02553
02554 astr += sprintf(astr, "%s,%d,%s", r_11_names[r], len,
02555
02556 t_27_names[t]);
02557
02558 CONS("ext_var ")
02559
02560 }
02561
02562
02563
02564
02565 }
02566
02567 }
02568 else
02569 if ((MATCH_w_32_0 >> 10 & 0x1) == 1)
02570 goto MATCH_label_a0;
02571 else
02572 if ((MATCH_w_32_0 >> 11 & 0x1) == 1) {
02573 MATCH_name = MATCH_name_p_20_98[(MATCH_w_32_0 >> 11 & 0x1)
02574 ];
02575 {
02576 char *name = MATCH_name;
02577 unsigned c = addressToPC(MATCH_p);
02578 unsigned p =
02579 31 - (MATCH_w_32_0 >> 5 & 0x1f) ;
02580 unsigned r1 = (MATCH_w_32_0 >> 16 & 0x1f) ;
02581 unsigned r2 = (MATCH_w_32_0 >> 21 & 0x1f) ;
02582 unsigned t = (MATCH_w_32_0 & 0x1f) ;
02583
02584 #line 452 "machine/hppa/disassembler.m"
02585 {
02586
02587 ANAME
02588
02589 dis_c_c(c);
02590
02591 astr += sprintf(astr, "%s,%s,%d,%s", r_11_names[r1], r_06_names[r2],
02592
02593 p, t_27_names[t]);
02594
02595 CONS("SHD ")
02596
02597 }
02598
02599
02600
02601
02602 }
02603
02604 }
02605 else {
02606 MATCH_name = MATCH_name_p_20_98[(MATCH_w_32_0 >> 11 & 0x1)
02607 ];
02608 {
02609 char *name = MATCH_name;
02610 unsigned c = addressToPC(MATCH_p);
02611 unsigned r1 = (MATCH_w_32_0 >> 16 & 0x1f) ;
02612 unsigned r2 = (MATCH_w_32_0 >> 21 & 0x1f) ;
02613 unsigned t = (MATCH_w_32_0 & 0x1f) ;
02614
02615 #line 445 "machine/hppa/disassembler.m"
02616 {
02617
02618 ANAME
02619
02620 dis_c_c(c);
02621
02622 astr += sprintf(astr, "%s,%s,%s", r_11_names[r1], r_06_names[r2],
02623
02624 t_27_names[t]);
02625
02626 CONS("VSHD ")
02627
02628 }
02629
02630
02631
02632
02633 }
02634
02635 }
02636 break;
02637 case 53:
02638 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
02639 if ((MATCH_w_32_0 >> 11 & 0x1) == 1 &&
02640 (0 <= (MATCH_w_32_0 >> 10 & 0x1) &&
02641 (MATCH_w_32_0 >> 10 & 0x1) < 2)) {
02642 MATCH_name = MATCH_name_se_21_104[(MATCH_w_32_0 >> 10 & 0x1)
02643 ];
02644 {
02645 char *name = MATCH_name;
02646 unsigned c = addressToPC(MATCH_p);
02647 unsigned i =
02648 ((sign_extend((MATCH_w_32_0 >> 16 & 0x1) ,
02649 1) & 0xfffffff) << 4) +
02650 (MATCH_w_32_0 >> 17 & 0xf) ;
02651 unsigned len = 32 - (MATCH_w_32_0 & 0x1f) ;
02652 unsigned p =
02653 31 - (MATCH_w_32_0 >> 5 & 0x1f) ;
02654 unsigned t = (MATCH_w_32_0 >> 21 & 0x1f) ;
02655
02656 #line 494 "machine/hppa/disassembler.m"
02657 {
02658
02659 ANAME
02660
02661 dis_c_c(c);
02662
02663 astr += sprintf(astr, "%d,%d,%d,%s", i, p, len,
02664
02665 t_27_names[t]);
02666
02667 CONS("dep_ifix ")
02668
02669 }
02670
02671
02672
02673
02674 }
02675
02676 }
02677 else {
02678 MATCH_name = MATCH_name_se_21_103[(MATCH_w_32_0 >> 10 & 0x1)
02679 ];
02680 {
02681 char *name = MATCH_name;
02682 unsigned c = addressToPC(MATCH_p);
02683 unsigned i =
02684 ((sign_extend((MATCH_w_32_0 >> 16 & 0x1) ,
02685 1) & 0xfffffff) << 4) +
02686 (MATCH_w_32_0 >> 17 & 0xf) ;
02687 unsigned len = 32 - (MATCH_w_32_0 & 0x1f) ;
02688 unsigned t = (MATCH_w_32_0 >> 21 & 0x1f) ;
02689
02690 #line 487 "machine/hppa/disassembler.m"
02691 {
02692
02693 ANAME
02694
02695 dis_c_c(c);
02696
02697 astr += sprintf(astr, "%d,%d,%s", i, len,
02698
02699 t_27_names[t]);
02700
02701 CONS("dep_ivar ")
02702
02703 }
02704
02705
02706
02707
02708 }
02709
02710 }
02711 else
02712 if ((MATCH_w_32_0 >> 11 & 0x1) == 1 &&
02713 (0 <= (MATCH_w_32_0 >> 10 & 0x1) &&
02714 (MATCH_w_32_0 >> 10 & 0x1) < 2)) {
02715 MATCH_name = MATCH_name_se_21_102[(MATCH_w_32_0 >> 10 & 0x1)
02716 ];
02717 {
02718 char *name = MATCH_name;
02719 unsigned c = addressToPC(MATCH_p);
02720 unsigned len = 32 - (MATCH_w_32_0 & 0x1f) ;
02721 unsigned p =
02722 31 - (MATCH_w_32_0 >> 5 & 0x1f) ;
02723 unsigned r = (MATCH_w_32_0 >> 16 & 0x1f) ;
02724 unsigned t = (MATCH_w_32_0 >> 21 & 0x1f) ;
02725
02726 #line 480 "machine/hppa/disassembler.m"
02727 {
02728
02729 ANAME
02730
02731 dis_c_c(c);
02732
02733 astr += sprintf(astr, "%s,%d,%d,%s", r_11_names[r], p, len,
02734
02735 t_27_names[t]);
02736
02737 CONS("dep_fix ")
02738
02739 }
02740
02741
02742
02743
02744 }
02745
02746 }
02747 else {
02748 MATCH_name = MATCH_name_se_21_101[(MATCH_w_32_0 >> 10 & 0x1)
02749 ];
02750 {
02751 char *name = MATCH_name;
02752 unsigned c = addressToPC(MATCH_p);
02753 unsigned len = 32 - (MATCH_w_32_0 & 0x1f) ;
02754 unsigned r = (MATCH_w_32_0 >> 16 & 0x1f) ;
02755 unsigned t = (MATCH_w_32_0 >> 21 & 0x1f) ;
02756
02757 #line 473 "machine/hppa/disassembler.m"
02758 {
02759
02760 ANAME
02761
02762 dis_c_c(c);
02763
02764 astr += sprintf(astr, "%s,%d,%s", r_11_names[r], len,
02765
02766 t_27_names[t]);
02767
02768 CONS("dep_var ")
02769
02770 }
02771
02772
02773
02774
02775 }
02776
02777 }
02778 break;
02779 case 58:
02780
02781 switch((MATCH_w_32_0 >> 13 & 0x7) ) {
02782 case 0:
02783 MATCH_name = "BL"; goto MATCH_label_a19; break;
02784 case 1:
02785 MATCH_name = "GATE"; goto MATCH_label_a19; break;
02786 case 2:
02787 if ((MATCH_w_32_0 >> 12 & 0x1) == 1)
02788 goto MATCH_label_a0;
02789 else {
02790 MATCH_name = "BLR";
02791 {
02792 char *name = MATCH_name;
02793 unsigned nulli = addressToPC(MATCH_p);
02794 unsigned t_06 =
02795 (MATCH_w_32_0 >> 21 & 0x1f) ;
02796 unsigned x_11 =
02797 (MATCH_w_32_0 >> 16 & 0x1f) ;
02798
02799 #line 518 "machine/hppa/disassembler.m"
02800 {
02801
02802 ANAME
02803
02804 dis_c_null(nulli);
02805
02806 astr += sprintf(astr, "%s,%s", x_11_names[x_11], t_06_names[t_06]);
02807
02808 CONS("BLR ")
02809
02810 }
02811
02812
02813
02814
02815 }
02816
02817 }
02818
02819 break;
02820 case 3:
02821 goto MATCH_label_a0; break;
02822 case 4:
02823 MATCH_name = "BL.PUSH"; goto MATCH_label_a19; break;
02824 case 5:
02825 MATCH_name = "BL.LONG";
02826 {
02827 char *name = MATCH_name;
02828 unsigned nulli = addressToPC(MATCH_p);
02829 unsigned ubr_target =
02830 8 +
02831 ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
02832 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
02833 ((MATCH_w_32_0 >> 16 & 0x1f) << 13) +
02834 ((MATCH_w_32_0 >> 21 & 0x1f) << 18) +
02835 (sign_extend((MATCH_w_32_0 & 0x1) ,
02836 1) << 23);
02837
02838 #line 512 "machine/hppa/disassembler.m"
02839 {
02840
02841 ANAME
02842
02843 dis_c_null(nulli);
02844
02845 astr += sprintf(astr, "%d %s", ubr_target, t_06_names[2]);
02846
02847 CONS("BL.LONG ")
02848
02849 }
02850
02851
02852
02853
02854 }
02855
02856 break;
02857 case 6:
02858 if ((MATCH_w_32_0 >> 12 & 0x1) == 1 &&
02859 (0 <= (MATCH_w_32_0 >> 1 & 0x1) &&
02860 (MATCH_w_32_0 >> 1 & 0x1) < 2)) {
02861 MATCH_name = "BVE";
02862 goto MATCH_label_a20;
02863
02864 }
02865 else {
02866 MATCH_name = "BV";
02867 {
02868 char *name = MATCH_name;
02869 unsigned b_06 =
02870 (MATCH_w_32_0 >> 21 & 0x1f) ;
02871 unsigned nulli = addressToPC(MATCH_p);
02872 unsigned x_11 =
02873 (MATCH_w_32_0 >> 16 & 0x1f) ;
02874
02875 #line 524 "machine/hppa/disassembler.m"
02876 {
02877
02878 ANAME
02879
02880 dis_c_null(nulli);
02881
02882 astr += sprintf(astr, "%s(%s)", x_11_names[x_11], b_06_names[b_06]);
02883
02884 CONS("BV ")
02885
02886 }
02887
02888
02889
02890
02891 }
02892
02893 }
02894
02895 break;
02896 case 7:
02897 if ((MATCH_w_32_0 >> 12 & 0x1) == 0)
02898 goto MATCH_label_a0;
02899 else {
02900 MATCH_name = "BVE.l";
02901 goto MATCH_label_a20;
02902
02903 }
02904
02905 break;
02906 default: assert(0);
02907 }
02908 break;
02909 case 59:
02910 MATCH_name = "cmpib_dw"; goto MATCH_label_a14; break;
02911 default: assert(0);
02912 }
02913
02914 }goto MATCH_finished_a;
02915
02916 MATCH_label_a0: (void)0;
02917
02918 #line 721 "machine/hppa/disassembler.m"
02919
02920 apre += sprintf(apre, "unrecog. %02X %08X",
02921
02922 (getDword(hostPC) >> 26) & 0x3F, getDword(hostPC) & 0x03FFFFFF);
02923
02924
02925
02926 goto MATCH_finished_a;
02927
02928 MATCH_label_a1: (void)0;
02929 {
02930 char *name = MATCH_name;
02931
02932 #line 554 "machine/hppa/disassembler.m"
02933 {
02934
02935 ANAME
02936
02937 CONS("sysop_simple ");
02938
02939 }
02940
02941
02942
02943
02944 }
02945 goto MATCH_finished_a;
02946
02947 MATCH_label_a2: (void)0;
02948 {
02949 char *name = MATCH_name;
02950 unsigned cmplt = addressToPC(MATCH_p);
02951 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
02952 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
02953 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
02954
02955 #line 383 "machine/hppa/disassembler.m"
02956 {
02957
02958 ANAME
02959
02960 dis_c_c(cmplt);
02961
02962 astr += sprintf(astr, "%s,%s,%s", r_11_names[r_11],r_06_names[r_06],t_27_names[t_27]);
02963
02964 CONS("arith ")
02965
02966 }
02967
02968
02969
02970
02971 }
02972 goto MATCH_finished_a;
02973
02974 MATCH_label_a3: (void)0;
02975 {
02976 char *name = MATCH_name;
02977 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
02978 unsigned c_addr = addressToPC(MATCH_p);
02979 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
02980 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
02981 unsigned xd = addressToPC(MATCH_p);
02982
02983 #line 405 "machine/hppa/disassembler.m"
02984 {
02985
02986 ANAME
02987
02988 dis_c_addr(c_addr);
02989
02990 dis_c_xd(xd);
02991
02992 astr += sprintf(astr, "(%s,%s),%s",
02993
02994 s2_16_names[s], b_06_names[b],
02995
02996 t_27_names[t_27]);
02997
02998 CONS("iloads ")
02999
03000 }
03001
03002
03003
03004
03005 }
03006 goto MATCH_finished_a;
03007
03008 MATCH_label_a4: (void)0;
03009 {
03010 char *name = MATCH_name;
03011 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
03012 unsigned c_addr = addressToPC(MATCH_p);
03013 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
03014 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
03015 unsigned xd = addressToPC(MATCH_p);
03016
03017 #line 414 "machine/hppa/disassembler.m"
03018 {
03019
03020 ANAME
03021
03022 dis_c_addr(c_addr);
03023
03024 astr += sprintf(astr, "%s,", r_11_names[r_11]);
03025
03026 dis_c_xd(xd);
03027
03028 astr += sprintf(astr, "(%s,%s)", s2_16_names[s], b_06_names[b]);
03029
03030 CONS("istores ")
03031
03032 }
03033
03034
03035
03036
03037 }
03038 goto MATCH_finished_a;
03039
03040 MATCH_label_a5: (void)0;
03041 {
03042 char *name = MATCH_name;
03043 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
03044 unsigned c_addr = addressToPC(MATCH_p);
03045 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
03046 unsigned t_27 =
03047 ((MATCH_w_32_0 >> 6 & 0x1) << 5) +
03048 (MATCH_w_32_0 & 0x1f) ;
03049 unsigned xd = addressToPC(MATCH_p);
03050
03051 #line 680 "machine/hppa/disassembler.m"
03052 {
03053
03054 apre += sprintf(apre, "%s",killDot(name));
03055
03056
03057
03058 dis_c_addr(c_addr);
03059
03060 dis_c_xd(xd);
03061
03062 astr += sprintf(astr, "(%s,%s),%s",
03063
03064 s2_16_names[s], b_06_names[b],
03065
03066 dis_freg(t_27));
03067
03068 CONS("fwloads ")
03069
03070 }
03071
03072
03073
03074
03075 }
03076 goto MATCH_finished_a;
03077
03078 MATCH_label_a6: (void)0;
03079 {
03080 char *name = MATCH_name;
03081 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
03082 unsigned c_addr = addressToPC(MATCH_p);
03083 unsigned r =
03084 ((MATCH_w_32_0 >> 6 & 0x1) << 5) +
03085 (MATCH_w_32_0 & 0x1f) ;
03086 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
03087 unsigned xd = addressToPC(MATCH_p);
03088
03089 #line 690 "machine/hppa/disassembler.m"
03090 {
03091
03092 apre += sprintf(apre, "%s",killDot(name));
03093
03094
03095
03096 dis_c_addr(c_addr);
03097
03098 astr += sprintf(astr, "%s,", dis_freg(r));
03099
03100 dis_c_xd(xd);
03101
03102 astr += sprintf(astr, "(%s,%s)",
03103
03104 s2_16_names[s], b_06_names[b]);
03105
03106 CONS("fwstores ")
03107
03108 }
03109
03110
03111
03112
03113 }
03114 goto MATCH_finished_a;
03115
03116 MATCH_label_a7: (void)0;
03117 {
03118 char *name = MATCH_name;
03119 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
03120 unsigned c_addr = addressToPC(MATCH_p);
03121 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
03122 unsigned t_27 = (MATCH_w_32_0 & 0x1f) ;
03123 unsigned xd = addressToPC(MATCH_p);
03124
03125 #line 700 "machine/hppa/disassembler.m"
03126 {
03127
03128 apre += sprintf(apre, "%s",killDot(name));
03129
03130
03131
03132 dis_c_addr(c_addr);
03133
03134 dis_c_xd(xd);
03135
03136 astr += sprintf(astr, "(%s,%s),%s",
03137
03138 s2_16_names[s], b_06_names[b],
03139
03140 dis_freg(t_27));
03141
03142 CONS("fdloads ")
03143
03144 }
03145
03146
03147
03148
03149 }
03150 goto MATCH_finished_a;
03151
03152 MATCH_label_a8: (void)0;
03153 {
03154 char *name = MATCH_name;
03155 unsigned b = (MATCH_w_32_0 >> 21 & 0x1f) ;
03156 unsigned c_addr = addressToPC(MATCH_p);
03157 unsigned r = (MATCH_w_32_0 & 0x1f) ;
03158 unsigned s = (MATCH_w_32_0 >> 14 & 0x3) ;
03159 unsigned xd = addressToPC(MATCH_p);
03160
03161 #line 710 "machine/hppa/disassembler.m"
03162 {
03163
03164 apre += sprintf(apre, "%s", killDot(name));
03165
03166
03167
03168 dis_c_addr(c_addr);
03169
03170 astr += sprintf(astr, "%s,", dis_freg(r));
03171
03172 dis_c_xd(xd);
03173
03174 astr += sprintf(astr, "(%s,%s)",
03175
03176 s2_16_names[s], b_06_names[b]);
03177
03178 CONS("fdstores ")
03179
03180 }
03181
03182
03183
03184
03185
03186
03187 }
03188 goto MATCH_finished_a;
03189
03190 MATCH_label_a9: (void)0;
03191 {
03192 char *name = MATCH_name;
03193 unsigned c = (MATCH_w_32_0 & 0x1f) ;
03194 unsigned fmt = (MATCH_w_32_0 >> 11 & 0x3) ;
03195 unsigned r1 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03196 unsigned r2 = (MATCH_w_32_0 >> 16 & 0x1f) ;
03197
03198 #line 653 "machine/hppa/disassembler.m"
03199 {
03200
03201 apre += sprintf(apre, "%s", killDot(name));
03202
03203 dis_flt_fmt(fmt);
03204
03205 astr += sprintf(astr, "%s, ", dis_freg(r1));
03206
03207 astr += sprintf(astr, "%s", dis_freg(r2));
03208
03209
03210
03211 astr += sprintf(astr, "\t/* Completer c needs decoding */");
03212
03213 IGNORE(c)
03214
03215 CONS("flt_c2_all ")
03216
03217 }
03218
03219
03220
03221
03222 }
03223 goto MATCH_finished_a;
03224
03225 MATCH_label_a10: (void)0;
03226 {
03227 char *name = MATCH_name;
03228 unsigned fmt = (MATCH_w_32_0 >> 11 & 0x3) ;
03229 unsigned r1 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03230 unsigned r2 = (MATCH_w_32_0 >> 16 & 0x1f) ;
03231 unsigned t = (MATCH_w_32_0 & 0x1f) ;
03232
03233 #line 663 "machine/hppa/disassembler.m"
03234 {
03235
03236 apre += sprintf(apre, "%s", killDot(name));
03237
03238 dis_flt_fmt(fmt);
03239
03240 astr += sprintf(astr, "%s, ", dis_freg(r1));
03241
03242 astr += sprintf(astr, "%s, ", dis_freg(r2));
03243
03244 astr += sprintf(astr, "%s", dis_freg(t));
03245
03246 CONS("flt_c3_all ")
03247
03248 }
03249
03250
03251
03252
03253 }
03254 goto MATCH_finished_a;
03255
03256 MATCH_label_a11: (void)0;
03257 {
03258 char *name = MATCH_name;
03259 unsigned c = (MATCH_w_32_0 & 0x1f) ;
03260 unsigned fmt = (MATCH_w_32_0 >> 11 & 0x1) ;
03261 unsigned r1 =
03262 ((MATCH_w_32_0 >> 7 & 0x1) << 5) +
03263 (MATCH_w_32_0 >> 21 & 0x1f) ;
03264 unsigned r2 =
03265 ((MATCH_w_32_0 >> 12 & 0x1) << 5) +
03266 (MATCH_w_32_0 >> 16 & 0x1f) ;
03267
03268 #line 653 "machine/hppa/disassembler.m"
03269 {
03270
03271 apre += sprintf(apre, "%s", killDot(name));
03272
03273 dis_flt_fmt(fmt);
03274
03275 astr += sprintf(astr, "%s, ", dis_freg(r1));
03276
03277 astr += sprintf(astr, "%s", dis_freg(r2));
03278
03279
03280
03281 astr += sprintf(astr, "\t/* Completer c needs decoding */");
03282
03283 IGNORE(c)
03284
03285 CONS("flt_c2_all ")
03286
03287 }
03288
03289
03290
03291
03292 }
03293 goto MATCH_finished_a;
03294
03295 MATCH_label_a12: (void)0;
03296 {
03297 char *name = MATCH_name;
03298 unsigned fmt = (MATCH_w_32_0 >> 11 & 0x1) ;
03299 unsigned r1 =
03300 ((MATCH_w_32_0 >> 7 & 0x1) << 5) +
03301 (MATCH_w_32_0 >> 21 & 0x1f) ;
03302 unsigned r2 =
03303 ((MATCH_w_32_0 >> 12 & 0x1) << 5) +
03304 (MATCH_w_32_0 >> 16 & 0x1f) ;
03305 unsigned t =
03306 ((MATCH_w_32_0 >> 6 & 0x1) << 5) +
03307 (MATCH_w_32_0 & 0x1f) ;
03308
03309 #line 663 "machine/hppa/disassembler.m"
03310 {
03311
03312 apre += sprintf(apre, "%s", killDot(name));
03313
03314 dis_flt_fmt(fmt);
03315
03316 astr += sprintf(astr, "%s, ", dis_freg(r1));
03317
03318 astr += sprintf(astr, "%s, ", dis_freg(r2));
03319
03320 astr += sprintf(astr, "%s", dis_freg(t));
03321
03322 CONS("flt_c3_all ")
03323
03324 }
03325
03326
03327
03328
03329 }
03330 goto MATCH_finished_a;
03331
03332 MATCH_label_a13: (void)0;
03333 {
03334 char *name = MATCH_name;
03335 unsigned c_cmplt = addressToPC(MATCH_p);
03336 unsigned null_cmplt = addressToPC(MATCH_p);
03337 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03338 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
03339 unsigned target =
03340 ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
03341 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
03342 ((sign_extend((MATCH_w_32_0 & 0x1) ,
03343 1) & 0x7ffff) << 13);
03344
03345 #line 613 "machine/hppa/disassembler.m"
03346 {
03347
03348 ANAME
03349
03350 dis_c_c(c_cmplt);
03351
03352 dis_c_null(null_cmplt);
03353
03354 astr += sprintf(astr, "%s,%s,0x%x", r_11_names[r_11],
03355
03356 r_06_names[r_06], target + pc + 8);
03357
03358 CONS("cmpb_all ")
03359
03360 }
03361
03362
03363
03364
03365 }
03366 goto MATCH_finished_a;
03367
03368 MATCH_label_a14: (void)0;
03369 {
03370 char *name = MATCH_name;
03371 unsigned c_cmplt = addressToPC(MATCH_p);
03372 unsigned im5_11 =
03373 ((sign_extend((MATCH_w_32_0 >> 16 & 0x1) ,
03374 1) & 0xfffffff) << 4) +
03375 (MATCH_w_32_0 >> 17 & 0xf) ;
03376 unsigned null_cmplt = addressToPC(MATCH_p);
03377 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03378 unsigned target =
03379 ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
03380 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
03381 ((sign_extend((MATCH_w_32_0 & 0x1) ,
03382 1) & 0x7ffff) << 13);
03383
03384 #line 621 "machine/hppa/disassembler.m"
03385 {
03386
03387 ANAME
03388
03389 dis_c_c(c_cmplt);
03390
03391 dis_c_null(null_cmplt);
03392
03393 astr += sprintf(astr, "%d,%s,0x%x", im5_11, r_06_names[r_06],
03394
03395 target + pc + 8);
03396
03397 CONS("cmpib_all ")
03398
03399 }
03400
03401
03402
03403
03404 }
03405 goto MATCH_finished_a;
03406
03407 MATCH_label_a15: (void)0;
03408 {
03409 char *name = MATCH_name;
03410 unsigned cmplt = addressToPC(MATCH_p);
03411 unsigned im11_21 =
03412 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 10) +
03413 (MATCH_w_32_0 >> 1 & 0x3ff) ;
03414 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03415 unsigned t_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
03416
03417 #line 389 "machine/hppa/disassembler.m"
03418 {
03419
03420 ANAME
03421
03422 dis_c_c(cmplt);
03423
03424 astr += sprintf(astr, "%d,%s,%s", im11_21, r_06_names[r_06], t_11_names[t_11]);
03425
03426 CONS("arith_imm ")
03427
03428 }
03429
03430
03431
03432
03433 }
03434 goto MATCH_finished_a;
03435
03436 MATCH_label_a16: (void)0;
03437 {
03438 char *name = MATCH_name;
03439 unsigned c_cmplt = addressToPC(MATCH_p);
03440 unsigned null_cmplt = addressToPC(MATCH_p);
03441 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03442 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
03443 unsigned target =
03444 ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
03445 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
03446 ((sign_extend((MATCH_w_32_0 & 0x1) ,
03447 1) & 0x7ffff) << 13);
03448
03449 #line 597 "machine/hppa/disassembler.m"
03450 {
03451
03452 ANAME
03453
03454 dis_c_c(c_cmplt);
03455
03456 dis_c_null(null_cmplt);
03457
03458 astr += sprintf(astr, "%s,%s,0x%x", r_11_names[r_11],
03459
03460 r_06_names[r_06], target + pc + 8);
03461
03462 CONS("addb_all ")
03463
03464 }
03465
03466
03467
03468
03469 }
03470 goto MATCH_finished_a;
03471
03472 MATCH_label_a17: (void)0;
03473 {
03474 char *name = MATCH_name;
03475 unsigned c_cmplt = addressToPC(MATCH_p);
03476 unsigned im5 =
03477 ((sign_extend((MATCH_w_32_0 >> 16 & 0x1) ,
03478 1) & 0xfffffff) << 4) +
03479 (MATCH_w_32_0 >> 17 & 0xf) ;
03480 unsigned null_cmplt = addressToPC(MATCH_p);
03481 unsigned r_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03482 unsigned target =
03483 ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
03484 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
03485 ((sign_extend((MATCH_w_32_0 & 0x1) ,
03486 1) & 0x7ffff) << 13);
03487
03488 #line 605 "machine/hppa/disassembler.m"
03489 {
03490
03491 ANAME
03492
03493 dis_c_c(c_cmplt);
03494
03495 dis_c_null(null_cmplt);
03496
03497 astr += sprintf(astr, "%d,%s,0x%x", im5,
03498
03499 r_06_names[r_06], target + pc + 8);
03500
03501 CONS("addb_all ")
03502
03503 }
03504
03505
03506
03507
03508 }
03509 goto MATCH_finished_a;
03510
03511 MATCH_label_a18: (void)0;
03512 {
03513 unsigned bit_cmplt = addressToPC(MATCH_p);
03514 unsigned c_cmplt = addressToPC(MATCH_p);
03515 unsigned null_cmplt = addressToPC(MATCH_p);
03516 unsigned r_11 = (MATCH_w_32_0 >> 16 & 0x1f) ;
03517 unsigned target =
03518 ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
03519 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
03520 ((sign_extend((MATCH_w_32_0 & 0x1) ,
03521 1) & 0x7ffff) << 13);
03522
03523 #line 629 "machine/hppa/disassembler.m"
03524 {
03525
03526 apre += sprintf(apre, "%s", "BB");
03527
03528 dis_c_c(c_cmplt);
03529
03530 dis_c_null(null_cmplt);
03531
03532 astr += sprintf(astr, "%s,", r_11_names[r_11]);
03533
03534 dis_c_bit(bit_cmplt);
03535
03536 sprintf(astr, ",%x", target + pc + 8);
03537
03538 CONS("bb_all ")
03539
03540 }
03541
03542
03543
03544
03545 }
03546 goto MATCH_finished_a;
03547
03548 MATCH_label_a19: (void)0;
03549 {
03550 char *name = MATCH_name;
03551 unsigned nulli = addressToPC(MATCH_p);
03552 unsigned t_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03553 unsigned ubr_target =
03554 8 + ((MATCH_w_32_0 >> 3 & 0x3ff) << 2) +
03555 ((MATCH_w_32_0 >> 2 & 0x1) << 12) +
03556 ((MATCH_w_32_0 >> 16 & 0x1f) << 13) +
03557 (sign_extend((MATCH_w_32_0 & 0x1) , 1) << 18);
03558
03559 #line 501 "machine/hppa/disassembler.m"
03560 {
03561
03562 ANAME
03563
03564 dis_c_null(nulli);
03565
03566
03567
03568 ADDRESS dest = ubr_target + hostPC - delta;
03569
03570 const char* dsym = pBF->SymbolByAddress(dest);
03571
03572 char hexsym[128];
03573
03574 if (dsym == 0) sprintf(hexsym, "0x%x", dest);
03575
03576 astr += sprintf(astr, "%s, %s", (dsym ? dsym : hexsym), t_06_names[t_06]);
03577
03578 CONS("ubranch ")
03579
03580 }
03581
03582
03583
03584
03585 }
03586 goto MATCH_finished_a;
03587
03588 MATCH_label_a20: (void)0;
03589 {
03590 char *name = MATCH_name;
03591 unsigned b_06 = (MATCH_w_32_0 >> 21 & 0x1f) ;
03592 unsigned nulli = addressToPC(MATCH_p);
03593 unsigned p_31 = (MATCH_w_32_0 & 0x1) ;
03594
03595 #line 530 "machine/hppa/disassembler.m"
03596 {
03597
03598 ANAME
03599
03600 not_used(p_31);
03601
03602 IGNORE(nulli)
03603
03604 astr += sprintf(astr, " (%s)", b_06_names[b_06]);
03605
03606 CONS("bve ")
03607
03608
03609
03610
03611
03612
03613
03614
03615
03616
03617
03618
03619
03620
03621
03622 }
03623
03624
03625
03626
03627 }
03628 goto MATCH_finished_a;
03629
03630 MATCH_finished_a: (void)0;
03631
03632 }
03633
03634 #line 725 "machine/hppa/disassembler.m"
03635
03636
03637 sprintf(_assembly, "%s%*s%s", aprefix, 28-strlen(aprefix), " ", adata);
03638 return 4;
03639
03640 }
03641
03642
03643
03644
03645
03646
03647
03648
03649
03650
03651