5 #ifndef V8_S390_CONSTANTS_S390_H_ 6 #define V8_S390_CONSTANTS_S390_H_ 9 #ifndef __STDC_FORMAT_MACROS 10 #define __STDC_FORMAT_MACROS 16 #include "src/base/logging.h" 17 #include "src/base/macros.h" 18 #include "src/globals.h" 22 #define UNIMPLEMENTED_S390() \ 23 v8::internal::PrintF("%s, \tline %d: \tfunction %s not implemented. \n", \ 24 __FILE__, __LINE__, __func__) 26 #define UNIMPLEMENTED_S390() 33 constexpr
size_t kMaxPCRelativeCodeRangeInMB = 0;
36 const int kNumRegisters = 16;
39 const int kNumDoubleRegisters = 16;
41 const int kNoRegister = -1;
46 constexpr
int kRootRegisterBias = 128;
49 #define SIGN_EXT_IMM16(imm) ((static_cast<int>(imm) << 16) >> 16) 52 #define SIGN_EXT_IMM26(imm) ((static_cast<int>(imm) << 6) >> 6) 79 CC_LE = CC_EQ | CC_LT,
81 CC_GE = CC_EQ | CC_GT,
108 CURRENT_ROUNDING_MODE = 0,
109 ROUND_TO_NEAREST_WITH_TIES_AWAY_FROM_0 = 1,
110 ROUND_TO_PREPARE_FOR_SHORTER_PRECISION = 3,
111 ROUND_TO_NEAREST_WITH_TIES_TO_EVEN = 4,
113 ROUND_TOWARD_PLUS_INFINITE = 6,
114 ROUND_TOWARD_MINUS_INFINITE = 7
117 inline Condition NegateCondition(Condition cond) {
151 typedef int32_t Instr;
152 typedef uint16_t TwoByteInstr;
154 typedef uint64_t SixByteInstr;
156 #define S390_RSY_A_OPCODE_LIST(V) \ 157 V(lmg, LMG, 0xEB04) \ 158 V(srag, SRAG, 0xEB0A) \ 159 V(slag, SLAG, 0xEB0B) \ 160 V(srlg, SRLG, 0xEB0C) \ 161 V(sllg, SLLG, 0xEB0D) \ 162 V(tracg, TRACG, 0xEB0F) \ 163 V(csy, CSY, 0xEB14) \ 164 V(rllg, RLLG, 0xEB1C) \ 165 V(rll, RLL, 0xEB1D) \ 166 V(stmg, STMG, 0xEB24) \ 167 V(stctg, STCTG, 0xEB25) \ 168 V(stmh, STMH, 0xEB26) \ 169 V(lctlg, LCTLG, 0xEB2F) \ 170 V(csg, CSG, 0xEB30) \ 171 V(cdsy, CDSY, 0xEB31) \ 172 V(cdsg, CDSG, 0xEB3E) \ 173 V(bxhg, BXHG, 0xEB44) \ 174 V(bxleg, BXLEG, 0xEB45) \ 175 V(ecag, ECAG, 0xEB4C) \ 176 V(mvclu, MVCLU, 0xEB8E) \ 177 V(clclu, CLCLU, 0xEB8F) \ 178 V(stmy, STMY, 0xEB90) \ 179 V(lmh, LMH, 0xEB96) \ 180 V(lmy, LMY, 0xEB98) \ 181 V(lamy, LAMY, 0xEB9A) \ 182 V(stamy, STAMY, 0xEB9B) \ 183 V(srak, SRAK, 0xEBDC) \ 184 V(slak, SLAK, 0xEBDD) \ 185 V(srlk, SRLK, 0xEBDE) \ 186 V(sllk, SLLK, 0xEBDF) \ 187 V(lang, LANG, 0xEBE4) \ 188 V(laog, LAOG, 0xEBE6) \ 189 V(laxg, LAXG, 0xEBE7) \ 190 V(laag, LAAG, 0xEBE8) \ 191 V(laalg, LAALG, 0xEBEA) \ 192 V(lan, LAN, 0xEBF4) \ 193 V(lao, LAO, 0xEBF6) \ 194 V(lax, LAX, 0xEBF7) \ 195 V(laa, LAA, 0xEBF8) \ 196 V(laal, LAAL, 0xEBFA) 198 #define S390_RSY_B_OPCODE_LIST(V) \ 203 V(clt, CLT, 0xEB23) \ 204 V(clgt, CLGT, 0xEB2B) \ 207 V(stcmy, STCMY, 0xEB2D) \ 208 V(icmh, ICMH, 0xEB80) \ 209 V(icmy, ICMY, 0xEB81) \ 210 V(locfh, LOCFH, 0xEBE0) \ 211 V(stocfh, STOCFH, 0xEBE1) \ 212 V(locg, LOCG, 0xEBE2) \ 213 V(stocg, STOCG, 0xEBE3) \ 214 V(loc, LOC, 0xEBF2) \ 215 V(stoc, STOC, 0xEBF3) 217 #define S390_RXE_OPCODE_LIST(V) \ 218 V(lcbb, LCBB, 0xE727) \ 219 V(ldeb, LDEB, 0xED04) \ 224 V(mxdb, MXDB, 0xED07) \ 225 V(keb, KEB, 0xED08) \ 226 V(ceb, CEB, 0xED09) \ 227 V(aeb, AEB, 0xED0A) \ 228 V(seb, SEB, 0xED0B) \ 229 V(mdeb, MDEB, 0xED0C) \ 230 V(deb, DEB, 0xED0D) \ 231 V(tceb, TCEB, 0xED10) \ 232 V(tcdb, TCDB, 0xED11) \ 233 V(tcxb, TCXB, 0xED12) \ 234 V(sqeb, SQEB, 0xED14) \ 235 V(sqdb, SQDB, 0xED15) \ 236 V(meeb, MEEB, 0xED17) \ 237 V(kdb, KDB, 0xED18) \ 238 V(cdb, CDB, 0xED19) \ 239 V(adb, ADB, 0xED1A) \ 240 V(sdb, SDB, 0xED1B) \ 241 V(mdb, MDB, 0xED1C) \ 242 V(ddb, DDB, 0xED1D) \ 243 V(lde, LDE, 0xED24) \ 248 V(sqe, SQE, 0xED34) \ 249 V(sqd, SQD, 0xED35) \ 250 V(mee, MEE, 0xED37) \ 251 V(tdcet, TDCET, 0xED50) \ 252 V(tdget, TDGET, 0xED51) \ 253 V(tdcdt, TDCDT, 0xED54) \ 254 V(tdgdt, TDGDT, 0xED55) \ 255 V(tdcxt, TDCXT, 0xED58) \ 256 V(tdgxt, TDGXT, 0xED59) 258 #define S390_RRF_A_OPCODE_LIST(V) \ 259 V(ipte, IPTE, 0xB221) \ 260 V(mdtra, MDTRA, 0xB3D0) \ 261 V(ddtra, DDTRA, 0xB3D1) \ 262 V(adtra, ADTRA, 0xB3D2) \ 263 V(sdtra, SDTRA, 0xB3D3) \ 264 V(mxtra, MXTRA, 0xB3D8) \ 265 V(msrkc, MSRKC, 0xB9FD) \ 266 V(msgrkc, MSGRKC, 0xB9ED) \ 267 V(dxtra, DXTRA, 0xB3D9) \ 268 V(axtra, AXTRA, 0xB3DA) \ 269 V(sxtra, SXTRA, 0xB3DB) \ 270 V(ahhhr, AHHHR, 0xB9C8) \ 271 V(shhhr, SHHHR, 0xB9C9) \ 272 V(alhhhr, ALHHHR, 0xB9CA) \ 273 V(slhhhr, SLHHHR, 0xB9CB) \ 274 V(ahhlr, AHHLR, 0xB9D8) \ 275 V(shhlr, SHHLR, 0xB9D9) \ 276 V(alhhlr, ALHHLR, 0xB9DA) \ 277 V(slhhlr, SLHHLR, 0xB9DB) \ 278 V(ngrk, NGRK, 0xB9E4) \ 279 V(ogrk, OGRK, 0xB9E6) \ 280 V(xgrk, XGRK, 0xB9E7) \ 281 V(agrk, AGRK, 0xB9E8) \ 282 V(sgrk, SGRK, 0xB9E9) \ 283 V(algrk, ALGRK, 0xB9EA) \ 284 V(slgrk, SLGRK, 0xB9EB) \ 285 V(nrk, NRK, 0xB9F4) \ 286 V(ork, ORK, 0xB9F6) \ 287 V(xrk, XRK, 0xB9F7) \ 288 V(ark, ARK, 0xB9F8) \ 289 V(srk, SRK, 0xB9F9) \ 290 V(alrk, ALRK, 0xB9FA) \ 291 V(slrk, SLRK, 0xB9FB) 293 #define S390_RXF_OPCODE_LIST(V) \ 294 V(maeb, MAEB, 0xED0E) \ 295 V(mseb, MSEB, 0xED0F) \ 296 V(madb, MADB, 0xED1E) \ 297 V(msdb, MSDB, 0xED1F) \ 298 V(mae, MAE, 0xED2E) \ 299 V(mse, MSE, 0xED2F) \ 312 V(mad, MAD, 0xED3E) \ 313 V(msd, MSD, 0xED3F) \ 314 V(sldt, SLDT, 0xED40) \ 315 V(srdt, SRDT, 0xED41) \ 321 #define S390_IE_OPCODE_LIST(V) \ 322 V(niai, NIAI, 0xB2FA) 324 #define S390_RRF_B_OPCODE_LIST(V) \ 325 V(diebr, DIEBR, 0xB353) \ 326 V(didbr, DIDBR, 0xB35B) \ 327 V(cpsdr, CPSDR, 0xB372) \ 328 V(qadtr, QADTR, 0xB3F5) \ 331 V(rrdtr, RRDTR, 0xB3F7) \ 332 V(qaxtr, QAXTR, 0xB3FD) \ 335 V(rrxtr, RRXTR, 0xB3FF) \ 336 V(kmctr, KMCTR, 0xB92D) \ 337 V(idte, IDTE, 0xB98E) \ 340 V(lptea, LPTEA, 0xB9AA) 342 #define S390_RRF_C_OPCODE_LIST(V) \ 343 V(sske, SSKE, 0xB22B) \ 344 V(cu21, CU21, 0xB2A6) \ 345 V(cu12, CU12, 0xB2A7) \ 346 V(ppa, PPA, 0xB2E8) \ 347 V(cgrt, CGRT, 0xB960) \ 348 V(clgrt, CLGRT, 0xB961) \ 349 V(crt, CRT, 0xB972) \ 350 V(clrt, CLRT, 0xB973) \ 351 V(trtt, TRTT, 0xB990) \ 352 V(trto, TRTO, 0xB991) \ 353 V(trot, TROT, 0xB992) \ 354 V(troo, TROO, 0xB993) \ 355 V(cu14, CU14, 0xB9B0) \ 356 V(cu24, CU24, 0xB9B1) \ 359 V(trte, TRTE, 0xB9BF) \ 360 V(locfhr, LOCFHR, 0xB9E0) \ 361 V(locgr, LOCGR, 0xB9E2) \ 362 V(locr, LOCR, 0xB9F2) 364 #define S390_MII_OPCODE_LIST(V) \ 367 #define S390_RRF_D_OPCODE_LIST(V) \ 377 #define S390_RRF_E_OPCODE_LIST(V) \ 384 V(fixbra, FIXBRA, 0xB347) \ 387 V(tbdr, TBDR, 0xB351) \ 388 V(fiebra, FIEBRA, 0xB357) \ 389 V(fidbra, FIDBRA, 0xB35F) \ 438 V(cfer, CFER, 0xB3B8) \ 439 V(cfdr, CFDR, 0xB3B9) \ 442 V(cger, CGER, 0xB3C8) \ 443 V(cgdr, CGDR, 0xB3C9) \ 446 V(ledtr, LEDTR, 0xB3D5) \ 447 V(fidtr, FIDTR, 0xB3D7) \ 450 V(fixtr, FIXTR, 0xB3DF) \ 459 V(cfdtr, CFDTR, 0xB941) \ 479 #define S390_VRR_A_OPCODE_LIST(V) \ 480 V(vpopct, VPOPCT, 0xE750) \ 481 V(vctz, VCTZ, 0xE752) \ 482 V(vclz, VCLZ, 0xE753) \ 483 V(vlr, VLR, 0xE756) \ 484 V(vistr, VISTR, 0xE75C) \ 485 V(vseg, VSEG, 0xE75F) \ 490 V(vcgd, VCGD, 0xE7C2) \ 491 V(vcdg, VCDG, 0xE7C3) \ 492 V(vlde, VLDE, 0xE7C4) \ 493 V(vled, VLED, 0xE7C5) \ 494 V(vfi, VFI, 0xE7C7) \ 495 V(wfk, WFK, 0xE7CA) \ 496 V(wfc, WFC, 0xE7CB) \ 497 V(vfpso, VFPSO, 0xE7CC) \ 498 V(vfsq, VFSQ, 0xE7CE) \ 499 V(vupll, VUPLL, 0xE7D4) \ 500 V(vuplh, VUPLH, 0xE7D5) \ 501 V(vupl, VUPL, 0xE7D6) \ 502 V(vuph, VUPH, 0xE7D7) \ 503 V(vtm, VTM, 0xE7D8) \ 504 V(vecl, VECL, 0xE7D9) \ 505 V(vec, VEC, 0xE7DB) \ 506 V(vlc, VLC, 0xE7DE) \ 509 #define S390_VRR_B_OPCODE_LIST(V) \ 510 V(vfee, VFEE, 0xE780) \ 511 V(vfene, VFENE, 0xE781) \ 512 V(vfae, VFAE, 0xE782) \ 513 V(vpkls, VPKLS, 0xE795) \ 514 V(vpks, VPKS, 0xE797) \ 515 V(vceq, VCEQ, 0xE7F8) \ 516 V(vchl, VCHL, 0xE7F9) \ 519 #define S390_VRR_C_OPCODE_LIST(V) \ 520 V(vmrl, VMRL, 0xE760) \ 521 V(vmrh, VMRH, 0xE761) \ 522 V(vsum, VSUM, 0xE764) \ 523 V(vsumg, VSUMG, 0xE765) \ 524 V(vcksm, VCKSM, 0xE766) \ 525 V(vsumq, VSUMQ, 0xE767) \ 527 V(vnc, VNC, 0xE769) \ 529 V(vno, VNO, 0xE76B) \ 531 V(veslv, VESLV, 0xE770) \ 534 V(vsl, VSL, 0xE774) \ 535 V(vslb, VSLB, 0xE775) \ 540 V(vsrl, VSRL, 0xE77C) \ 543 V(vsra, VSRA, 0xE77E) \ 546 V(vpdi, VPDI, 0xE784) \ 547 V(vpk, VPK, 0xE794) \ 548 V(vmlh, VMLH, 0xE7A1) \ 549 V(vml, VML, 0xE7A2) \ 550 V(vmh, VMH, 0xE7A3) \ 551 V(vmle, VMLE, 0xE7A4) \ 552 V(vmlo, VMLO, 0xE7A5) \ 553 V(vme, VME, 0xE7A6) \ 554 V(vmo, VMO, 0xE7A7) \ 555 V(vgfm, VGFM, 0xE7B4) \ 556 V(vfs, VFS, 0xE7E2) \ 557 V(vfa, VFA, 0xE7E3) \ 558 V(vfd, VFD, 0xE7E5) \ 559 V(vfm, VFM, 0xE7E7) \ 560 V(vfce, VFCE, 0xE7E8) \ 561 V(vfche, VFCHE, 0xE7EA) \ 562 V(vfch, VFCH, 0xE7EB) \ 563 V(vavgl, VAVGL, 0xE7F0) \ 564 V(vacc, VACC, 0xE7F1) \ 565 V(vavg, VAVG, 0xE7F2) \ 570 V(vmnl, VMNL, 0xE7FC) \ 571 V(vmxl, VMXL, 0xE7FD) \ 572 V(vmn, VMN, 0xE7FE) \ 575 #define S390_VRI_A_OPCODE_LIST(V) \ 576 V(vleib, VLEIB, 0xE740) \ 583 V(vgbm, VGBM, 0xE744) \ 584 V(vrepi, VREPI, 0xE745) 586 #define S390_VRR_D_OPCODE_LIST(V) \ 587 V(vstrc, VSTRC, 0xE78A) \ 590 V(vmal, VMAL, 0xE7AA) \ 591 V(vmah, VMAH, 0xE7AB) \ 596 V(vmae, VMAE, 0xE7AE) \ 597 V(vmao, VMAO, 0xE7AF) \ 600 V(vac, VAC, 0xE7BB) \ 603 V(vsbcbi, VSBCBI, 0xE7BD) \ 608 #define S390_VRI_B_OPCODE_LIST(V) \ 611 #define S390_VRR_E_OPCODE_LIST(V) \ 612 V(vperm, VPERM, 0xE78C) \ 613 V(vsel, VSEL, 0xE78D) \ 614 V(vfms, VFMS, 0xE78E) \ 615 V(vfma, VFMA, 0xE78F) 617 #define S390_VRI_C_OPCODE_LIST(V) \ 618 V(vrep, VREP, 0xE74D) 620 #define S390_VRI_D_OPCODE_LIST(V) \ 623 V(vsldb, VSLDB, 0xE777) 625 #define S390_VRR_F_OPCODE_LIST(V) \ 626 V(vlvgp, VLVGP, 0xE762) 628 #define S390_RIS_OPCODE_LIST(V) \ 633 V(cib, CIB, 0xECFE) \ 637 #define S390_VRI_E_OPCODE_LIST(V) \ 641 #define S390_RSL_A_OPCODE_LIST(V) \ 644 #define S390_RSL_B_OPCODE_LIST(V) \ 645 V(cpdt, CPDT, 0xEDAC) \ 648 V(cdpt, CDPT, 0xEDAE) \ 651 V(czdt, CZDT, 0xEDA8) \ 652 V(czxt, CZXT, 0xEDA9) \ 653 V(cdzt, CDZT, 0xEDAA) \ 654 V(cxzt, CXZT, 0xEDAB) 656 #define S390_SI_OPCODE_LIST(V) \ 663 V(stnsm, STNSM, 0xAC) \ 664 V(stosm, STOSM, 0xAD) \ 667 #define S390_SIL_OPCODE_LIST(V) \ 668 V(mvhhi, MVHHI, 0xE544) \ 669 V(mvghi, MVGHI, 0xE548) \ 670 V(mvhi, MVHI, 0xE54C) \ 679 V(chsi, CHSI, 0xE55C) \ 684 V(tbeginc, TBEGINC, \ 687 #define S390_VRS_A_OPCODE_LIST(V) \ 688 V(vesl, VESL, 0xE730) \ 691 V(vlm, VLM, 0xE736) \ 696 V(vstm, VSTM, 0xE73E) 698 #define S390_RIL_A_OPCODE_LIST(V) \ 699 V(lgfi, LGFI, 0xC01) \ 700 V(xihf, XIHF, 0xC06) \ 701 V(xilf, XILF, 0xC07) \ 702 V(iihf, IIHF, 0xC08) \ 703 V(iilf, IILF, 0xC09) \ 704 V(nihf, NIHF, 0xC0A) \ 705 V(nilf, NILF, 0xC0B) \ 706 V(oihf, OIHF, 0xC0C) \ 707 V(oilf, OILF, 0xC0D) \ 708 V(llihf, LLIHF, 0xC0E) \ 709 V(llilf, LLILF, 0xC0F) \ 710 V(msgfi, MSGFI, 0xC20) \ 711 V(msfi, MSFI, 0xC21) \ 714 V(slfi, SLFI, 0xC25) \ 715 V(agfi, AGFI, 0xC28) \ 717 V(algfi, ALGFI, 0xC2A) \ 718 V(alfi, ALFI, 0xC2B) \ 719 V(cgfi, CGFI, 0xC2C) \ 721 V(clgfi, CLGFI, 0xC2E) \ 722 V(clfi, CLFI, 0xC2F) \ 731 #define S390_RIL_B_OPCODE_LIST(V) \ 732 V(larl, LARL, 0xC00) \ 733 V(brasl, BRASL, 0xC05) \ 738 V(lhrl, LHRL, 0xC45) \ 741 V(sthrl, STHRL, 0xC47) \ 742 V(lgrl, LGRL, 0xC48) \ 743 V(stgrl, STGRL, 0xC4B) \ 744 V(lgfrl, LGFRL, 0xC4C) \ 748 V(strl, STRL, 0xC4F) \ 749 V(exrl, EXRL, 0xC60) \ 758 V(cgrl, CGRL, 0xC68) \ 759 V(clgrl, CLGRL, 0xC6A) \ 760 V(cgfrl, CGFRL, 0xC6C) \ 764 V(clrl, CLRL, 0xC6F) \ 765 V(brcth, BRCTH, 0xCC6) 767 #define S390_VRS_B_OPCODE_LIST(V) \ 768 V(vlvg, VLVG, 0xE722) \ 769 V(vll, VLL, 0xE737) \ 770 V(vstl, VSTL, 0xE73F) 772 #define S390_RIL_C_OPCODE_LIST(V) \ 773 V(brcl, BRCL, 0xC04) \ 774 V(pfdrl, PFDRL, 0xC62) 776 #define S390_VRS_C_OPCODE_LIST(V) \ 777 V(vlgv, VLGV, 0xE721) 779 #define S390_RI_A_OPCODE_LIST(V) \ 780 V(iihh, IIHH, 0xA50) \ 781 V(iihl, IIHL, 0xA51) \ 782 V(iilh, IILH, 0xA52) \ 783 V(iill, IILL, 0xA53) \ 784 V(nihh, NIHH, 0xA54) \ 785 V(nihl, NIHL, 0xA55) \ 786 V(nilh, NILH, 0xA56) \ 787 V(nill, NILL, 0xA57) \ 788 V(oihh, OIHH, 0xA58) \ 789 V(oihl, OIHL, 0xA59) \ 790 V(oilh, OILH, 0xA5A) \ 791 V(oill, OILL, 0xA5B) \ 792 V(llihh, LLIHH, 0xA5C) \ 793 V(llihl, LLIHL, 0xA5D) \ 794 V(llilh, LLILH, 0xA5E) \ 795 V(llill, LLILL, 0xA5F) \ 796 V(tmlh, TMLH, 0xA70) \ 797 V(tmll, TMLL, 0xA71) \ 798 V(tmhh, TMHH, 0xA72) \ 799 V(tmhl, TMHL, 0xA73) \ 801 V(lghi, LGHI, 0xA79) \ 803 V(aghi, AGHI, 0xA7B) \ 805 V(mghi, MGHI, 0xA7D) \ 809 #define S390_RSI_OPCODE_LIST(V) \ 810 V(brxh, BRXH, 0x84) \ 814 #define S390_RI_B_OPCODE_LIST(V) \ 815 V(bras, BRAS, 0xA75) \ 816 V(brct, BRCT, 0xA76) \ 817 V(brctg, BRCTG, 0xA77) 819 #define S390_RI_C_OPCODE_LIST(V) \ 822 #define S390_SMI_OPCODE_LIST(V) \ 825 #define S390_RXY_A_OPCODE_LIST(V) \ 826 V(ltg, LTG, 0xE302) \ 827 V(lrag, LRAG, 0xE303) \ 829 V(cvby, CVBY, 0xE306) \ 832 V(alg, ALG, 0xE30A) \ 833 V(slg, SLG, 0xE30B) \ 834 V(msg, MSG, 0xE30C) \ 835 V(dsg, DSG, 0xE30D) \ 836 V(cvbg, CVBG, 0xE30E) \ 837 V(lrvg, LRVG, 0xE30F) \ 838 V(lt_z, LT, 0xE312) \ 839 V(lray, LRAY, 0xE313) \ 840 V(lgf, LGF, 0xE314) \ 841 V(lgh, LGH, 0xE315) \ 842 V(llgf, LLGF, 0xE316) \ 845 V(agf, AGF, 0xE318) \ 846 V(sgf, SGF, 0xE319) \ 847 V(algf, ALGF, 0xE31A) \ 848 V(slgf, SLGF, 0xE31B) \ 849 V(msgf, MSGF, 0xE31C) \ 850 V(dsgf, DSGF, 0xE31D) \ 851 V(lrv, LRV, 0xE31E) \ 852 V(lrvh, LRVH, 0xE31F) \ 854 V(clg, CLG, 0xE321) \ 855 V(stg, STG, 0xE324) \ 856 V(ntstg, NTSTG, 0xE325) \ 857 V(cvdy, CVDY, 0xE326) \ 858 V(lzrg, LZRG, 0xE32A) \ 859 V(cvdg, CVDG, 0xE32E) \ 860 V(strvg, STRVG, 0xE32F) \ 861 V(cgf, CGF, 0xE330) \ 862 V(clgf, CLGF, 0xE331) \ 863 V(ltgf, LTGF, 0xE332) \ 864 V(cgh, CGH, 0xE334) \ 867 V(lzrf, LZRF, 0xE33B) \ 868 V(strv, STRV, 0xE33E) \ 869 V(strvh, STRVH, 0xE33F) \ 870 V(bctg, BCTG, 0xE346) \ 871 V(sty, STY, 0xE350) \ 872 V(msy, MSY, 0xE351) \ 874 V(cly, CLY, 0xE355) \ 881 V(mfy, MFY, 0xE35C) \ 882 V(aly, ALY, 0xE35E) \ 883 V(sly, SLY, 0xE35F) \ 884 V(sthy, STHY, 0xE370) \ 885 V(lay, LAY, 0xE371) \ 886 V(stcy, STCY, 0xE372) \ 887 V(icy, ICY, 0xE373) \ 888 V(laey, LAEY, 0xE375) \ 890 V(lgb, LGB, 0xE377) \ 891 V(lhy, LHY, 0xE378) \ 892 V(chy, CHY, 0xE379) \ 893 V(ahy, AHY, 0xE37A) \ 894 V(shy, SHY, 0xE37B) \ 895 V(mhy, MHY, 0xE37C) \ 899 V(lgat, LGAT, 0xE385) \ 900 V(mlg, MLG, 0xE386) \ 901 V(dlg, DLG, 0xE387) \ 902 V(alcg, ALCG, 0xE388) \ 903 V(slbg, SLBG, 0xE389) \ 904 V(stpq, STPQ, 0xE38E) \ 905 V(lpq, LPQ, 0xE38F) \ 906 V(llgc, LLGC, 0xE390) \ 907 V(llgh, LLGH, 0xE391) \ 908 V(llc, LLC, 0xE394) \ 909 V(llh, LLH, 0xE395) \ 912 V(alc, ALC, 0xE398) \ 913 V(slb, SLB, 0xE399) \ 916 V(llgfat, LLGFAT, 0xE39D) \ 917 V(lat, LAT, 0xE39F) \ 918 V(lbh, LBH, 0xE3C0) \ 919 V(llch, LLCH, 0xE3C2) \ 920 V(stch, STCH, 0xE3C3) \ 921 V(lhh, LHH, 0xE3C4) \ 922 V(llhh, LLHH, 0xE3C6) \ 923 V(sthh, STHH, 0xE3C7) \ 924 V(lfhat, LFHAT, 0xE3C8) \ 925 V(lfh, LFH, 0xE3CA) \ 926 V(stfh, STFH, 0xE3CB) \ 927 V(chf, CHF, 0xE3CD) \ 928 V(clhf, CLHF, 0xE3CF) \ 929 V(ley, LEY, 0xED64) \ 930 V(ldy, LDY, 0xED65) \ 931 V(stey, STEY, 0xED66) \ 932 V(stdy, STDY, 0xED67) \ 933 V(msc, MSC, 0xE353) \ 934 V(msgc, MSGC, 0xE383) 936 #define S390_RXY_B_OPCODE_LIST(V) \ 939 #define S390_SIY_OPCODE_LIST(V) \ 940 V(tmy, TMY, 0xEB51) \ 941 V(mviy, MVIY, 0xEB52) \ 942 V(niy, NIY, 0xEB54) \ 943 V(cliy, CLIY, 0xEB55) \ 944 V(oiy, OIY, 0xEB56) \ 945 V(xiy, XIY, 0xEB57) \ 946 V(asi, ASI, 0xEB6A) \ 949 V(agsi, AGSI, 0xEB7A) \ 953 #define S390_SS_A_OPCODE_LIST(V) \ 954 V(trtr, TRTR, 0xD0) \ 965 V(edmk, EDMK, 0xDF) \ 966 V(unpku, UNPKU, 0xE2) \ 967 V(mvcin, MVCIN, 0xE8) \ 968 V(unpka, UNPKA, 0xEA) 970 #define S390_E_OPCODE_LIST(V) \ 972 V(upt, UPT, 0x0102) \ 973 V(ptff, PTFF, 0x0104) \ 974 V(sckpf, SCKPF, 0x0107) \ 975 V(pfpo, PFPO, 0x010A) \ 976 V(tam, TAM, 0x010B) \ 977 V(sam24, SAM24, 0x010C) \ 978 V(sam31, SAM31, 0x010D) \ 979 V(sam64, SAM64, 0x010E) \ 980 V(trap2, TRAP2, 0x01FF) 982 #define S390_SS_B_OPCODE_LIST(V) \ 984 V(pack, PACK, 0xF2) \ 985 V(unpk, UNPK, 0xF3) \ 993 #define S390_SS_C_OPCODE_LIST(V) \ 996 #define S390_SS_D_OPCODE_LIST(V) \ 997 V(mvck, MVCK, 0xD9) \ 998 V(mvcp, MVCP, 0xDA) \ 1001 #define S390_SS_E_OPCODE_LIST(V) \ 1005 #define S390_I_OPCODE_LIST(V) \ 1008 #define S390_SS_F_OPCODE_LIST(V) \ 1012 #define S390_SSE_OPCODE_LIST(V) \ 1013 V(lasp, LASP, 0xE500) \ 1014 V(tprot, TPROT, 0xE501) \ 1015 V(strag, STRAG, 0xE502) \ 1016 V(mvcsk, MVCSK, 0xE50E) \ 1017 V(mvcdk, MVCDK, 0xE50F) 1019 #define S390_SSF_OPCODE_LIST(V) \ 1020 V(mvcos, MVCOS, 0xC80) \ 1021 V(ectg, ECTG, 0xC81) \ 1022 V(csst, CSST, 0xC82) \ 1023 V(lpd, LPD, 0xC84) \ 1024 V(lpdg, LPDG, 0xC85) 1026 #define S390_RS_A_OPCODE_LIST(V) \ 1028 V(bxle, BXLE, 0x87) \ 1033 V(srdl, SRDL, 0x8C) \ 1034 V(sldl, SLDL, 0x8D) \ 1035 V(srda, SRDA, 0x8E) \ 1036 V(slda, SLDA, 0x8F) \ 1039 V(trace, TRACE, 0x99) \ 1041 V(stam, STAM, 0x9B) \ 1042 V(mvcle, MVCLE, 0xA8) \ 1043 V(clcle, CLCLE, 0xA9) \ 1044 V(sigp, SIGP, 0xAE) \ 1045 V(stctl, STCTL, 0xB6) \ 1046 V(lctl, LCTL, 0xB7) \ 1050 #define S390_RS_B_OPCODE_LIST(V) \ 1052 V(stcm, STCM, 0xBE) \ 1055 #define S390_S_OPCODE_LIST(V) \ 1056 V(lpsw, LPSW, 0x82) \ 1057 V(diagnose, DIAGNOSE, 0x83) \ 1059 V(stidp, STIDP, 0xB202) \ 1060 V(sck, SCK, 0xB204) \ 1061 V(stck, STCK, 0xB205) \ 1062 V(sckc, SCKC, 0xB206) \ 1063 V(stckc, STCKC, 0xB207) \ 1064 V(spt, SPT, 0xB208) \ 1065 V(stpt, STPT, 0xB209) \ 1066 V(spka, SPKA, 0xB20A) \ 1067 V(ipk, IPK, 0xB20B) \ 1068 V(ptlb, PTLB, 0xB20D) \ 1069 V(spx, SPX, 0xB210) \ 1070 V(stpx, STPX, 0xB211) \ 1071 V(stap, STAP, 0xB212) \ 1073 V(sac, SAC, 0xB219) \ 1074 V(cfc, CFC, 0xB21A) \ 1075 V(csch, CSCH, 0xB230) \ 1076 V(hsch, HSCH, 0xB231) \ 1077 V(msch, MSCH, 0xB232) \ 1078 V(ssch, SSCH, 0xB233) \ 1079 V(stsch, STSCH, 0xB234) \ 1080 V(tsch, TSCH, 0xB235) \ 1081 V(tpi, TPI, 0xB236) \ 1082 V(sal, SAL, 0xB237) \ 1083 V(rsch, RSCH, 0xB238) \ 1084 V(stcrw, STCRW, 0xB239) \ 1085 V(stcps, STCPS, 0xB23A) \ 1086 V(rchp, RCHP, 0xB23B) \ 1087 V(schm, SCHM, 0xB23C) \ 1088 V(xsch, XSCH, 0xB276) \ 1089 V(rp, RP_Z, 0xB277) \ 1090 V(stcke, STCKE, 0xB278) \ 1091 V(sacf, SACF, 0xB279) \ 1092 V(stckf, STCKF, 0xB27C) \ 1093 V(stsi, STSI, 0xB27D) \ 1094 V(srnm, SRNM, 0xB299) \ 1095 V(stfpc, STFPC, 0xB29C) \ 1096 V(lfpc, LFPC, 0xB29D) \ 1097 V(stfle, STFLE, 0xB2B0) \ 1098 V(stfl, STFL, 0xB2B1) \ 1099 V(lpswe, LPSWE, 0xB2B2) \ 1100 V(srnmb, SRNMB, 0xB2B8) \ 1101 V(srnmt, SRNMT, 0xB2B9) \ 1102 V(lfas, LFAS, 0xB2BD) \ 1103 V(tend, TEND, 0xB2F8) \ 1104 V(tabort, TABORT, 0xB2FC) \ 1105 V(trap4, TRAP4, 0xB2FF) 1107 #define S390_RX_A_OPCODE_LIST(V) \ 1110 V(ic_z, IC_z, 0x43) \ 1160 #define S390_RX_B_OPCODE_LIST(V) \ 1163 #define S390_RIE_A_OPCODE_LIST(V) \ 1164 V(cgit, CGIT, 0xEC70) \ 1167 V(cit, CIT, 0xEC72) \ 1171 #define S390_RRD_OPCODE_LIST(V) \ 1172 V(maebr, MAEBR, 0xB30E) \ 1173 V(msebr, MSEBR, 0xB30F) \ 1174 V(madbr, MADBR, 0xB31E) \ 1175 V(msdbr, MSDBR, 0xB31F) \ 1176 V(maer, MAER, 0xB32E) \ 1177 V(mser, MSER, 0xB32F) \ 1190 V(madr, MADR, 0xB33E) \ 1191 V(msdr, MSDR, 0xB33F) 1193 #define S390_RIE_B_OPCODE_LIST(V) \ 1194 V(cgrj, CGRJ, 0xEC64) \ 1197 V(crj, CRJ, 0xEC76) \ 1201 #define S390_RRE_OPCODE_LIST(V) \ 1202 V(ipm, IPM, 0xB222) \ 1203 V(ivsk, IVSK, 0xB223) \ 1204 V(iac, IAC, 0xB224) \ 1205 V(ssar, SSAR, 0xB225) \ 1206 V(epar, EPAR, 0xB226) \ 1207 V(esar, ESAR, 0xB227) \ 1209 V(iske, ISKE, 0xB229) \ 1210 V(rrbe, RRBE, 0xB22A) \ 1212 V(dxr, DXR, 0xB22D) \ 1213 V(pgin, PGIN, 0xB22E) \ 1214 V(pgout, PGOUT, 0xB22F) \ 1215 V(bakr, BAKR, 0xB240) \ 1216 V(cksm, CKSM, 0xB241) \ 1217 V(sqdr, SQDR, 0xB244) \ 1218 V(sqer, SQER, 0xB245) \ 1219 V(stura, STURA, 0xB246) \ 1220 V(msta, MSTA, 0xB247) \ 1221 V(palb, PALB, 0xB248) \ 1222 V(ereg, EREG, 0xB249) \ 1223 V(esta, ESTA, 0xB24A) \ 1224 V(lura, LURA, 0xB24B) \ 1225 V(tar, TAR, 0xB24C) \ 1226 V(cpya, CPYA, 0xB24D) \ 1227 V(sar, SAR, 0xB24E) \ 1228 V(ear, EAR, 0xB24F) \ 1229 V(csp, CSP, 0xB250) \ 1230 V(msr, MSR, 0xB252) \ 1231 V(mvpg, MVPG, 0xB254) \ 1232 V(mvst, MVST, 0xB255) \ 1233 V(cuse, CUSE, 0xB257) \ 1234 V(bsg, BSG, 0xB258) \ 1235 V(bsa, BSA, 0xB25A) \ 1236 V(clst, CLST, 0xB25D) \ 1237 V(srst, SRST, 0xB25E) \ 1238 V(cmpsc, CMPSC, 0xB263) \ 1239 V(tre, TRE, 0xB2A5) \ 1240 V(etnd, ETND, 0xB2EC) \ 1241 V(lpebr, LPEBR, 0xB300) \ 1242 V(lnebr, LNEBR, 0xB301) \ 1243 V(ltebr, LTEBR, 0xB302) \ 1244 V(lcebr, LCEBR, 0xB303) \ 1251 V(mxdbr, MXDBR, 0xB307) \ 1252 V(kebr, KEBR, 0xB308) \ 1253 V(cebr, CEBR, 0xB309) \ 1254 V(aebr, AEBR, 0xB30A) \ 1255 V(sebr, SEBR, 0xB30B) \ 1256 V(mdebr, MDEBR, 0xB30C) \ 1257 V(debr, DEBR, 0xB30D) \ 1258 V(lpdbr, LPDBR, 0xB310) \ 1259 V(lndbr, LNDBR, 0xB311) \ 1260 V(ltdbr, LTDBR, 0xB312) \ 1261 V(lcdbr, LCDBR, 0xB313) \ 1262 V(sqebr, SQEBR, 0xB314) \ 1263 V(sqdbr, SQDBR, 0xB315) \ 1264 V(sqxbr, SQXBR, 0xB316) \ 1265 V(meebr, MEEBR, 0xB317) \ 1266 V(kdbr, KDBR, 0xB318) \ 1267 V(cdbr, CDBR, 0xB319) \ 1268 V(adbr, ADBR, 0xB31A) \ 1269 V(sdbr, SDBR, 0xB31B) \ 1270 V(mdbr, MDBR, 0xB31C) \ 1271 V(ddbr, DDBR, 0xB31D) \ 1272 V(lder, LDER, 0xB324) \ 1277 V(sqxr, SQXR, 0xB336) \ 1278 V(meer, MEER, 0xB337) \ 1279 V(lpxbr, LPXBR, 0xB340) \ 1280 V(lnxbr, LNXBR, 0xB341) \ 1281 V(ltxbr, LTXBR, 0xB342) \ 1282 V(lcxbr, LCXBR, 0xB343) \ 1283 V(kxbr, KXBR, 0xB348) \ 1284 V(cxbr, CXBR, 0xB349) \ 1285 V(axbr, AXBR, 0xB34A) \ 1286 V(sxbr, SXBR, 0xB34B) \ 1287 V(mxbr, MXBR, 0xB34C) \ 1288 V(dxbr, DXBR, 0xB34D) \ 1291 V(thdr, THDR, 0xB359) \ 1292 V(lpxr, LPXR, 0xB360) \ 1293 V(lnxr, LNXR, 0xB361) \ 1294 V(ltxr, LTXR, 0xB362) \ 1295 V(lcxr, LCXR, 0xB363) \ 1296 V(lxr, LXR, 0xB365) \ 1299 V(fixr, FIXR, 0xB367) \ 1300 V(cxr, CXR, 0xB369) \ 1301 V(lpdfr, LPDFR, 0xB370) \ 1302 V(lndfr, LNDFR, 0xB371) \ 1303 V(lcdfr, LCDFR, 0xB373) \ 1304 V(lzer, LZER, 0xB374) \ 1305 V(lzdr, LZDR, 0xB375) \ 1306 V(lzxr, LZXR, 0xB376) \ 1307 V(fier, FIER, 0xB377) \ 1308 V(fidr, FIDR, 0xB37F) \ 1309 V(sfpc, SFPC, 0xB384) \ 1310 V(sfasr, SFASR, 0xB385) \ 1311 V(efpc, EFPC, 0xB38C) \ 1314 V(cdfr, CDFR, 0xB3B5) \ 1317 V(ldgr, LDGR, 0xB3C1) \ 1320 V(cdgr, CDGR, 0xB3C5) \ 1323 V(lgdr, LGDR, 0xB3CD) \ 1324 V(ltdtr, LTDTR, 0xB3D6) \ 1325 V(ltxtr, LTXTR, 0xB3DE) \ 1326 V(kdtr, KDTR, 0xB3E0) \ 1327 V(cudtr, CUDTR, 0xB3E2) \ 1329 V(cdtr, CDTR, 0xB3E4) \ 1334 V(kxtr, KXTR, 0xB3E8) \ 1338 V(cxtr, CXTR, 0xB3EC) \ 1351 V(cxstr, CXSTR, 0xB3FB) \ 1355 V(lpgr, LPGR, 0xB900) \ 1356 V(lngr, LNGR, 0xB901) \ 1357 V(ltgr, LTGR, 0xB902) \ 1358 V(lcgr, LCGR, 0xB903) \ 1359 V(lgr, LGR, 0xB904) \ 1360 V(lurag, LURAG, 0xB905) \ 1361 V(lgbr, LGBR, 0xB906) \ 1362 V(lghr, LGHR, 0xB907) \ 1363 V(agr, AGR, 0xB908) \ 1364 V(sgr, SGR, 0xB909) \ 1365 V(algr, ALGR, 0xB90A) \ 1366 V(slgr, SLGR, 0xB90B) \ 1367 V(msgr, MSGR, 0xB90C) \ 1368 V(dsgr, DSGR, 0xB90D) \ 1369 V(eregg, EREGG, 0xB90E) \ 1370 V(lrvgr, LRVGR, 0xB90F) \ 1371 V(lpgfr, LPGFR, 0xB910) \ 1372 V(lngfr, LNGFR, 0xB911) \ 1373 V(ltgfr, LTGFR, 0xB912) \ 1374 V(lcgfr, LCGFR, 0xB913) \ 1375 V(lgfr, LGFR, 0xB914) \ 1376 V(llgfr, LLGFR, 0xB916) \ 1379 V(agfr, AGFR, 0xB918) \ 1380 V(sgfr, SGFR, 0xB919) \ 1381 V(algfr, ALGFR, 0xB91A) \ 1382 V(slgfr, SLGFR, 0xB91B) \ 1383 V(msgfr, MSGFR, 0xB91C) \ 1384 V(dsgfr, DSGFR, 0xB91D) \ 1385 V(kmac, KMAC, 0xB91E) \ 1386 V(lrvr, LRVR, 0xB91F) \ 1387 V(cgr, CGR, 0xB920) \ 1388 V(clgr, CLGR, 0xB921) \ 1389 V(sturg, STURG, 0xB925) \ 1390 V(lbr, LBR, 0xB926) \ 1391 V(lhr, LHR, 0xB927) \ 1394 V(kmf, KMF, 0xB92A) \ 1395 V(kmo, KMO, 0xB92B) \ 1396 V(pcc, PCC, 0xB92C) \ 1398 V(kmc, KMC, 0xB92F) \ 1399 V(cgfr, CGFR, 0xB930) \ 1400 V(clgfr, CLGFR, 0xB931) \ 1403 V(kimd, KIMD, 0xB93E) \ 1404 V(klmd, KLMD, 0xB93F) \ 1405 V(bctgr, BCTGR, 0xB946) \ 1410 V(ngr, NGR, 0xB980) \ 1411 V(ogr, OGR, 0xB981) \ 1412 V(xgr, XGR, 0xB982) \ 1413 V(flogr, FLOGR, 0xB983) \ 1414 V(llgcr, LLGCR, 0xB984) \ 1415 V(llghr, LLGHR, 0xB985) \ 1416 V(mlgr, MLGR, 0xB986) \ 1417 V(dlgr, DLGR, 0xB987) \ 1418 V(alcgr, ALCGR, 0xB988) \ 1419 V(slbgr, SLBGR, 0xB989) \ 1420 V(cspg, CSPG, 0xB98A) \ 1421 V(epsw, EPSW, 0xB98D) \ 1422 V(llcr, LLCR, 0xB994) \ 1423 V(llhr, LLHR, 0xB995) \ 1424 V(mlr, MLR, 0xB996) \ 1425 V(dlr, DLR, 0xB997) \ 1426 V(alcr, ALCR, 0xB998) \ 1427 V(slbr, SLBR, 0xB999) \ 1428 V(epair, EPAIR, 0xB99A) \ 1431 V(esea, ESEA, 0xB99D) \ 1432 V(pti, PTI, 0xB99E) \ 1433 V(ssair, SSAIR, 0xB99F) \ 1434 V(ptf, PTF, 0xB9A2) \ 1435 V(rrbm, RRBM, 0xB9AE) \ 1436 V(pfmf, PFMF, 0xB9AF) \ 1437 V(cu41, CU41, 0xB9B2) \ 1438 V(cu42, CU42, 0xB9B3) \ 1439 V(srstu, SRSTU, 0xB9BE) \ 1440 V(chhr, CHHR, 0xB9CD) \ 1441 V(clhhr, CLHHR, 0xB9CF) \ 1442 V(chlr, CHLR, 0xB9DD) \ 1443 V(clhlr, CLHLR, 0xB9DF) \ 1444 V(popcnt, POPCNT_Z, 0xB9E1) 1446 #define S390_RIE_C_OPCODE_LIST(V) \ 1454 V(clij, CLIJ, 0xEC7F) \ 1457 #define S390_RIE_D_OPCODE_LIST(V) \ 1458 V(ahik, AHIK, 0xECD8) \ 1459 V(aghik, AGHIK, 0xECD9) \ 1462 V(alghsik, ALGHSIK, \ 1465 #define S390_VRV_OPCODE_LIST(V) \ 1466 V(vgeg, VGEG, 0xE712) \ 1467 V(vgef, VGEF, 0xE713) \ 1468 V(vsceg, VSCEG, 0xE71A) \ 1469 V(vscef, VSCEF, 0xE71B) 1471 #define S390_RIE_E_OPCODE_LIST(V) \ 1477 #define S390_RR_OPCODE_LIST(V) \ 1480 V(balr, BALR, 0x05) \ 1481 V(bctr, BCTR, 0x06) \ 1484 V(bassm, BASSM, 0x0C) \ 1485 V(basr, BASR, 0x0D) \ 1486 V(mvcl, MVCL, 0x0E) \ 1487 V(clcl, CLCL, 0x0F) \ 1504 V(lpdr, LPDR, 0x20) \ 1505 V(lndr, LNDR, 0x21) \ 1506 V(ltdr, LTDR, 0x22) \ 1507 V(lcdr, LCDR, 0x23) \ 1509 V(ldxr, LDXR, 0x25) \ 1511 V(mxdr, MXDR, 0x27) \ 1519 V(lper, LPER, 0x30) \ 1520 V(lner, LNER, 0x31) \ 1521 V(lter, LTER, 0x32) \ 1522 V(lcer, LCER, 0x33) \ 1523 V(her_z, HER_Z, 0x34) \ 1524 V(ledr, LEDR, 0x35) \ 1531 V(mder, MDER, 0x3C) \ 1536 #define S390_RIE_F_OPCODE_LIST(V) \ 1543 V(rosbg, ROSBG, 0xEC56) \ 1551 #define S390_VRX_OPCODE_LIST(V) \ 1552 V(vleb, VLEB, 0xE700) \ 1553 V(vleh, VLEH, 0xE701) \ 1554 V(vleg, VLEG, 0xE702) \ 1555 V(vlef, VLEF, 0xE703) \ 1558 V(vlrep, VLREP, 0xE705) \ 1560 V(vlbb, VLBB, 0xE707) \ 1561 V(vsteb, VSTEB, 0xE708) \ 1562 V(vsteh, VSTEH, 0xE709) \ 1563 V(vsteg, VSTEG, 0xE70A) \ 1564 V(vstef, VSTEF, 0xE70B) \ 1567 #define S390_RIE_G_OPCODE_LIST(V) \ 1572 V(lochhi, LOCHHI, 0xEC4E) \ 1575 #define S390_RRS_OPCODE_LIST(V) \ 1576 V(cgrb, CGRB, 0xECE4) \ 1577 V(clgrb, CLGRB, 0xECE5) \ 1578 V(crb, CRB, 0xECF6) \ 1579 V(clrb, CLRB, 0xECF7) 1581 #define S390_OPCODE_LIST(V) \ 1582 S390_RSY_A_OPCODE_LIST(V) \ 1583 S390_RSY_B_OPCODE_LIST(V) \ 1584 S390_RXE_OPCODE_LIST(V) \ 1585 S390_RRF_A_OPCODE_LIST(V) \ 1586 S390_RXF_OPCODE_LIST(V) \ 1587 S390_IE_OPCODE_LIST(V) \ 1588 S390_RRF_B_OPCODE_LIST(V) \ 1589 S390_RRF_C_OPCODE_LIST(V) \ 1590 S390_MII_OPCODE_LIST(V) \ 1591 S390_RRF_D_OPCODE_LIST(V) \ 1592 S390_RRF_E_OPCODE_LIST(V) \ 1593 S390_VRR_A_OPCODE_LIST(V) \ 1594 S390_VRR_B_OPCODE_LIST(V) \ 1595 S390_VRR_C_OPCODE_LIST(V) \ 1596 S390_VRI_A_OPCODE_LIST(V) \ 1597 S390_VRR_D_OPCODE_LIST(V) \ 1598 S390_VRI_B_OPCODE_LIST(V) \ 1599 S390_VRR_E_OPCODE_LIST(V) \ 1600 S390_VRI_C_OPCODE_LIST(V) \ 1601 S390_VRI_D_OPCODE_LIST(V) \ 1602 S390_VRR_F_OPCODE_LIST(V) \ 1603 S390_RIS_OPCODE_LIST(V) \ 1604 S390_VRI_E_OPCODE_LIST(V) \ 1605 S390_RSL_A_OPCODE_LIST(V) \ 1606 S390_RSL_B_OPCODE_LIST(V) \ 1607 S390_SI_OPCODE_LIST(V) \ 1608 S390_SIL_OPCODE_LIST(V) \ 1609 S390_VRS_A_OPCODE_LIST(V) \ 1610 S390_RIL_A_OPCODE_LIST(V) \ 1611 S390_RIL_B_OPCODE_LIST(V) \ 1612 S390_VRS_B_OPCODE_LIST(V) \ 1613 S390_RIL_C_OPCODE_LIST(V) \ 1614 S390_VRS_C_OPCODE_LIST(V) \ 1615 S390_RI_A_OPCODE_LIST(V) \ 1616 S390_RSI_OPCODE_LIST(V) \ 1617 S390_RI_B_OPCODE_LIST(V) \ 1618 S390_RI_C_OPCODE_LIST(V) \ 1619 S390_SMI_OPCODE_LIST(V) \ 1620 S390_RXY_A_OPCODE_LIST(V) \ 1621 S390_RXY_B_OPCODE_LIST(V) \ 1622 S390_SIY_OPCODE_LIST(V) \ 1623 S390_SS_A_OPCODE_LIST(V) \ 1624 S390_E_OPCODE_LIST(V) \ 1625 S390_SS_B_OPCODE_LIST(V) \ 1626 S390_SS_C_OPCODE_LIST(V) \ 1627 S390_SS_D_OPCODE_LIST(V) \ 1628 S390_SS_E_OPCODE_LIST(V) \ 1629 S390_I_OPCODE_LIST(V) \ 1630 S390_SS_F_OPCODE_LIST(V) \ 1631 S390_SSE_OPCODE_LIST(V) \ 1632 S390_SSF_OPCODE_LIST(V) \ 1633 S390_RS_A_OPCODE_LIST(V) \ 1634 S390_RS_B_OPCODE_LIST(V) \ 1635 S390_S_OPCODE_LIST(V) \ 1636 S390_RX_A_OPCODE_LIST(V) \ 1637 S390_RX_B_OPCODE_LIST(V) \ 1638 S390_RIE_A_OPCODE_LIST(V) \ 1639 S390_RRD_OPCODE_LIST(V) \ 1640 S390_RIE_B_OPCODE_LIST(V) \ 1641 S390_RRE_OPCODE_LIST(V) \ 1642 S390_RIE_C_OPCODE_LIST(V) \ 1643 S390_RIE_D_OPCODE_LIST(V) \ 1644 S390_VRV_OPCODE_LIST(V) \ 1645 S390_RIE_E_OPCODE_LIST(V) \ 1646 S390_RR_OPCODE_LIST(V) \ 1647 S390_RIE_F_OPCODE_LIST(V) \ 1648 S390_VRX_OPCODE_LIST(V) \ 1649 S390_RIE_G_OPCODE_LIST(V) \ 1650 S390_RRS_OPCODE_LIST(V) 1654 #define DECLARE_OPCODES(name, opcode_name, opcode_value) \ 1655 opcode_name = opcode_value, 1656 S390_OPCODE_LIST(DECLARE_OPCODES)
1657 #undef DECLARE_OPCODES 1692 kCondMask = 0x1F << 21,
1693 kOff12Mask = (1 << 12) - 1,
1694 kImm24Mask = (1 << 24) - 1,
1695 kOff16Mask = (1 << 16) - 1,
1696 kImm16Mask = (1 << 16) - 1,
1697 kImm26Mask = (1 << 26) - 1,
1698 kBOfieldMask = 0x1f << 21,
1699 kOpcodeMask = 0x3f << 26,
1700 kExt2OpcodeMask = 0x1f << 1,
1701 kExt5OpcodeMask = 0x3 << 2,
1702 kBIMask = 0x1F << 16,
1703 kBDMask = 0x14 << 2,
1704 kAAMask = 0x01 << 1,
1707 kTOMask = 0x1f << 21
1712 #define B32 ((uint64_t)1 << 32) 1713 #define B36 ((uint64_t)1 << 36) 1714 #define B40 ((uint64_t)1 << 40) 1715 const FourByteInstr kFourByteBrCondMask = 0xF << 20;
1716 const SixByteInstr kSixByteBrCondMask =
static_cast<SixByteInstr
>(0xF) << 36;
1758 enum CRBit { CR_LT = 0, CR_GT = 1, CR_EQ = 2, CR_SO = 3, CR_FU = 3 };
1769 enum SoftwareInterruptCodes {
1771 kCallRtRedirected = 0x0010,
1773 kBreakpoint = 0x0000,
1777 const uint32_t kStopCodeMask = kStopCode - 1;
1778 const uint32_t kMaxStopCode = kStopCode - 1;
1779 const int32_t kDefaultStopCode = -1;
1782 enum FPRoundingMode {
1789 kRoundToNearest = RN,
1791 kRoundToPlusInf = RP,
1792 kRoundToMinusInf = RM
1795 const uint32_t kFPRoundingModeMask = 3;
1797 enum CheckForInexactConversion {
1798 kCheckForInexactConversion,
1799 kDontCheckForInexactConversion
1806 const Instr rtCallRedirInstr = TRAP4;
1818 enum OpcodeFormatType {
1821 TWO_BYTE_DISJOINT_OPCODE,
1825 static OpcodeFormatType OpcodeFormatTable[256];
1828 #define DECLARE_STATIC_TYPED_ACCESSOR(return_type, Name) \ 1829 static inline return_type Name(Instr instr) { \ 1830 char* temp = reinterpret_cast<char*>(&instr); \ 1831 return reinterpret_cast<Instruction*>(temp)->Name(); \ 1834 #define DECLARE_STATIC_ACCESSOR(Name) DECLARE_STATIC_TYPED_ACCESSOR(int, Name) 1837 template <
typename T>
1838 inline T InstructionBits()
const {
1839 return Instruction::InstructionBits<T>(
reinterpret_cast<const byte*
>(
this));
1841 inline Instr InstructionBits()
const {
1842 return *
reinterpret_cast<const Instr*
>(
this);
1846 template <
typename T>
1847 inline void SetInstructionBits(T value)
const {
1848 Instruction::SetInstructionBits<T>(
reinterpret_cast<const byte*
>(
this),
1851 inline void SetInstructionBits(Instr value) {
1852 *
reinterpret_cast<Instr*
>(
this) = value;
1856 inline int Bit(
int nr)
const {
return (InstructionBits() >> nr) & 1; }
1859 inline int Bits(
int hi,
int lo)
const {
1860 return (InstructionBits() >> lo) & ((2 << (hi - lo)) - 1);
1864 template <
typename T,
typename U>
1865 inline U Bits(
int hi,
int lo)
const {
1866 return (InstructionBits<T>() >> lo) & ((2 << (hi - lo)) - 1);
1870 inline int BitField(
int hi,
int lo)
const {
1871 return InstructionBits() & (((2 << (hi - lo)) - 1) << lo);
1875 inline int InstructionLength() {
1876 return Instruction::InstructionLength(reinterpret_cast<const byte*>(
this));
1879 inline Opcode S390OpcodeValue() {
1880 return Instruction::S390OpcodeValue(reinterpret_cast<const byte*>(
this));
1886 static inline int Bit(Instr instr,
int nr) {
return (instr >> nr) & 1; }
1889 static inline int Bits(Instr instr,
int hi,
int lo) {
1890 return (instr >> lo) & ((2 << (hi - lo)) - 1);
1894 static inline int BitField(Instr instr,
int hi,
int lo) {
1895 return instr & (((2 << (hi - lo)) - 1) << lo);
1899 static inline int InstructionLength(
const byte* instr) {
1904 byte topNibble = (*instr >> 4) & 0xF;
1907 else if (topNibble <= 0xB)
1913 static inline uint64_t InstructionBits(
const byte* instr) {
1914 int length = InstructionLength(instr);
1916 return static_cast<uint64_t
>(InstructionBits<TwoByteInstr>(instr));
1917 else if (4 == length)
1918 return static_cast<uint64_t
>(InstructionBits<FourByteInstr>(instr));
1920 return InstructionBits<SixByteInstr>(instr);
1924 template <
typename T>
1925 static inline T InstructionBits(
const byte* instr) {
1926 #if !V8_TARGET_LITTLE_ENDIAN 1927 if (
sizeof(T) <= 4) {
1928 return *
reinterpret_cast<const T*
>(instr);
1933 uint64_t fourBytes = *
reinterpret_cast<const uint32_t*
>(instr);
1934 uint16_t twoBytes = *
reinterpret_cast<const uint16_t*
>(instr + 4);
1935 return (fourBytes << 16 | twoBytes);
1944 uint32_t size = (
sizeof(T) == 8) ? 6 :
sizeof(T);
1946 for (T
i = 0;
i < size;
i++) {
1948 instr_bits |= *(instr +
i);
1955 template <
typename T>
1956 static inline void SetInstructionBits(byte* instr, T value) {
1957 #if V8_TARGET_LITTLE_ENDIAN 1963 if (
sizeof(T) == 2) {
1965 value = ((value & 0x00FF) << 8) | ((value & 0xFF00) >> 8);
1966 }
else if (
sizeof(T) == 4) {
1968 value = ((value & 0x000000FF) << 24) | ((value & 0x0000FF00) << 8) |
1969 ((value & 0x00FF0000) >> 8) | ((value & 0xFF000000) >> 24);
1970 }
else if (
sizeof(T) == 8) {
1972 uint64_t orig_value =
static_cast<uint64_t
>(value);
1973 value = (
static_cast<uint64_t
>(orig_value & 0xFF) << 40) |
1974 (
static_cast<uint64_t
>((orig_value >> 8) & 0xFF) << 32) |
1975 (static_cast<uint64_t>((orig_value >> 16) & 0xFF) << 24) |
1976 (
static_cast<uint64_t
>((orig_value >> 24) & 0xFF) << 16) |
1977 (static_cast<uint64_t>((orig_value >> 32) & 0xFF) << 8) |
1978 (
static_cast<uint64_t
>((orig_value >> 40) & 0xFF));
1981 if (
sizeof(T) <= 4) {
1982 *
reinterpret_cast<T*
>(instr) = value;
1984 #if V8_TARGET_LITTLE_ENDIAN 1985 uint64_t orig_value =
static_cast<uint64_t
>(value);
1986 *
reinterpret_cast<uint32_t*
>(instr) = static_cast<uint32_t>(value);
1987 *
reinterpret_cast<uint16_t*
>(instr + 4) =
1988 static_cast<uint16_t>((orig_value >> 32) & 0xFFFF);
1990 *
reinterpret_cast<uint32_t*
>(instr) = static_cast<uint32_t>(value >> 16);
1991 *
reinterpret_cast<uint16_t*
>(instr + 4) =
1992 static_cast<uint16_t>(value & 0xFFFF);
1998 static OpcodeFormatType getOpcodeFormatType(
const byte* instr) {
1999 const byte firstByte = *instr;
2000 return OpcodeFormatTable[firstByte];
2004 static inline Opcode S390OpcodeValue(
const byte* instr) {
2005 OpcodeFormatType opcodeType = getOpcodeFormatType(instr);
2010 switch (opcodeType) {
2011 case ONE_BYTE_OPCODE:
2013 return static_cast<Opcode
>(*instr);
2014 case TWO_BYTE_OPCODE:
2016 return static_cast<Opcode
>((*instr << 8) | (*(instr + 1)));
2017 case TWO_BYTE_DISJOINT_OPCODE:
2019 return static_cast<Opcode
>((*instr << 8) | (*(instr + 5) & 0xFF));
2023 return static_cast<Opcode
>((*instr << 4) | (*(instr + 1) & 0xF));
2030 inline SoftwareInterruptCodes SvcValue()
const {
2031 return static_cast<SoftwareInterruptCodes
>(Bits<FourByteInstr, int>(15, 0));
2038 static Instruction* At(byte* pc) {
2039 return reinterpret_cast<Instruction*
>(pc);
2044 DISALLOW_IMPLICIT_CONSTRUCTORS(Instruction);
2047 #define DECLARE_FIELD_FOR_TWO_BYTE_INSTR(name, T, lo, hi) \ 2048 inline int name() const { \ 2049 return Bits<TwoByteInstr, T>(15 - (lo), 15 - (hi) + 1); \ 2052 #define DECLARE_FIELD_FOR_FOUR_BYTE_INSTR(name, T, lo, hi) \ 2053 inline int name() const { \ 2054 return Bits<FourByteInstr, T>(31 - (lo), 31 - (hi) + 1); \ 2057 #define DECLARE_FIELD_FOR_SIX_BYTE_INSTR(name, T, lo, hi) \ 2058 inline int name() const { \ 2059 return Bits<SixByteInstr, T>(47 - (lo), 47 - (hi) + 1); \ 2064 inline int size()
const {
return 2; }
2069 inline int size()
const {
return 4; }
2074 inline int size()
const {
return 6; }
2080 DECLARE_FIELD_FOR_TWO_BYTE_INSTR(IValue,
int, 8, 16);
2089 DECLARE_FIELD_FOR_FOUR_BYTE_INSTR(I1Value,
int, 24, 28);
2090 DECLARE_FIELD_FOR_FOUR_BYTE_INSTR(I2Value,
int, 28, 32);
2096 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(M1Value,
uint32_t, 8, 12);
2097 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(RI2Value,
int, 12, 24);
2098 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(RI3Value,
int, 24, 47);
2104 DECLARE_FIELD_FOR_FOUR_BYTE_INSTR(R1Value,
int, 8, 12);
2105 DECLARE_FIELD_FOR_FOUR_BYTE_INSTR(I2Value,
int, 16, 32);
2106 DECLARE_FIELD_FOR_FOUR_BYTE_INSTR(I2UnsignedValue,
uint32_t, 16, 32);
2107 DECLARE_FIELD_FOR_FOUR_BYTE_INSTR(M1Value,
uint32_t, 8, 12);
2113 inline int R1Value()
const {
2116 return Bits<TwoByteInstr, int>(7, 4);
2118 inline int R2Value()
const {
return Bits<TwoByteInstr, int>(3, 0); }
2119 inline Condition M1Value()
const {
2120 return static_cast<Condition
>(Bits<TwoByteInstr, int>(7, 4));
2123 inline int size()
const {
return 2; }
2129 inline int R1Value()
const {
return Bits<FourByteInstr, int>(7, 4); }
2130 inline int R2Value()
const {
return Bits<FourByteInstr, int>(3, 0); }
2131 inline int M3Value()
const {
return Bits<FourByteInstr, int>(15, 12); }
2132 inline int M4Value()
const {
return Bits<FourByteInstr, int>(19, 16); }
2133 inline int size()
const {
return 4; }
2139 inline int R1Value()
const {
return Bits<FourByteInstr, int>(7, 4); }
2140 inline int R2Value()
const {
return Bits<FourByteInstr, int>(3, 0); }
2141 inline int R3Value()
const {
return Bits<FourByteInstr, int>(15, 12); }
2142 inline int M3Value()
const {
return Bits<FourByteInstr, int>(15, 12); }
2143 inline int M4Value()
const {
return Bits<FourByteInstr, int>(11, 8); }
2144 inline int size()
const {
return 4; }
2150 inline int R1Value()
const {
return Bits<FourByteInstr, int>(15, 12); }
2151 inline int R2Value()
const {
return Bits<FourByteInstr, int>(3, 0); }
2152 inline int R3Value()
const {
return Bits<FourByteInstr, int>(7, 4); }
2153 inline int size()
const {
return 4; }
2159 inline int R1Value()
const {
return Bits<FourByteInstr, int>(23, 20); }
2160 inline int R3Value()
const {
return Bits<FourByteInstr, int>(19, 16); }
2161 inline int B2Value()
const {
return Bits<FourByteInstr, int>(15, 12); }
2162 inline unsigned int D2Value()
const {
2163 return Bits<FourByteInstr, unsigned int>(11, 0);
2165 inline int size()
const {
return 4; }
2171 inline int R1Value()
const {
return Bits<FourByteInstr, int>(23, 20); }
2172 inline int R3Value()
const {
return Bits<FourByteInstr, int>(19, 16); }
2173 inline int I2Value()
const {
2174 return static_cast<int32_t
>(Bits<FourByteInstr, int16_t>(15, 0));
2176 inline int size()
const {
return 4; }
2182 inline int R1Value()
const {
return Bits<SixByteInstr, int>(39, 36); }
2183 inline int R3Value()
const {
return Bits<SixByteInstr, int>(35, 32); }
2184 inline int B2Value()
const {
return Bits<SixByteInstr, int>(31, 28); }
2185 inline int32_t D2Value()
const {
2186 int32_t value = Bits<SixByteInstr, int32_t>(27, 16);
2187 value += Bits<SixByteInstr, int8_t>(15, 8) << 12;
2190 inline int size()
const {
return 6; }
2196 inline int R1Value()
const {
return Bits<FourByteInstr, int>(23, 20); }
2197 inline int X2Value()
const {
return Bits<FourByteInstr, int>(19, 16); }
2198 inline int B2Value()
const {
return Bits<FourByteInstr, int>(15, 12); }
2200 return Bits<FourByteInstr, uint32_t>(11, 0);
2202 inline int size()
const {
return 4; }
2208 inline int R1Value()
const {
return Bits<SixByteInstr, int>(39, 36); }
2209 inline int X2Value()
const {
return Bits<SixByteInstr, int>(35, 32); }
2210 inline int B2Value()
const {
return Bits<SixByteInstr, int>(31, 28); }
2211 inline int32_t D2Value()
const {
2212 int32_t value = Bits<SixByteInstr, uint32_t>(27, 16);
2213 value += Bits<SixByteInstr, int8_t>(15, 8) << 12;
2216 inline int size()
const {
return 6; }
2222 inline int R1Value()
const {
return Bits<SixByteInstr, int>(39, 36); }
2223 inline int32_t I2Value()
const {
return Bits<SixByteInstr, int32_t>(31, 0); }
2224 inline uint32_t I2UnsignedValue()
const {
2225 return Bits<SixByteInstr, uint32_t>(31, 0);
2227 inline int size()
const {
return 6; }
2233 inline int B1Value()
const {
return Bits<FourByteInstr, int>(15, 12); }
2235 return Bits<FourByteInstr, uint32_t>(11, 0);
2237 inline uint8_t I2Value()
const {
2238 return Bits<FourByteInstr, uint8_t>(23, 16);
2240 inline int size()
const {
return 4; }
2246 inline int B1Value()
const {
return Bits<SixByteInstr, int>(31, 28); }
2247 inline int32_t D1Value()
const {
2248 int32_t value = Bits<SixByteInstr, uint32_t>(27, 16);
2249 value += Bits<SixByteInstr, int8_t>(15, 8) << 12;
2252 inline uint8_t I2Value()
const {
return Bits<SixByteInstr, uint8_t>(39, 32); }
2253 inline int size()
const {
return 6; }
2259 inline int B1Value()
const {
return Bits<SixByteInstr, int>(31, 28); }
2260 inline int D1Value()
const {
return Bits<SixByteInstr, int>(27, 16); }
2261 inline int I2Value()
const {
return Bits<SixByteInstr, int>(15, 0); }
2262 inline int size()
const {
return 6; }
2268 inline int B1Value()
const {
return Bits<SixByteInstr, int>(31, 28); }
2269 inline int B2Value()
const {
return Bits<SixByteInstr, int>(15, 12); }
2270 inline int D1Value()
const {
return Bits<SixByteInstr, int>(27, 16); }
2271 inline int D2Value()
const {
return Bits<SixByteInstr, int>(11, 0); }
2272 inline int Length()
const {
return Bits<SixByteInstr, int>(39, 32); }
2273 inline int size()
const {
return 6; }
2279 inline int R1Value()
const {
return Bits<SixByteInstr, int>(39, 36); }
2280 inline int X2Value()
const {
return Bits<SixByteInstr, int>(35, 32); }
2281 inline int B2Value()
const {
return Bits<SixByteInstr, int>(31, 28); }
2282 inline int D2Value()
const {
return Bits<SixByteInstr, int>(27, 16); }
2283 inline int size()
const {
return 6; }
2289 inline int R1Value()
const {
return Bits<SixByteInstr, int>(39, 36); }
2290 inline int R2Value()
const {
return Bits<SixByteInstr, int>(35, 32); }
2291 inline int I3Value()
const {
return Bits<SixByteInstr, uint32_t>(31, 24); }
2292 inline int I4Value()
const {
return Bits<SixByteInstr, uint32_t>(23, 16); }
2293 inline int I5Value()
const {
return Bits<SixByteInstr, uint32_t>(15, 8); }
2294 inline int I6Value()
const {
2295 return static_cast<int32_t
>(Bits<SixByteInstr, int16_t>(31, 16));
2297 inline int size()
const {
return 6; }
2303 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(R1Value,
int, 8, 12);
2304 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(R2Value,
int, 12, 16);
2305 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(R3Value,
int, 16, 20);
2306 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(M6Value,
uint32_t, 24, 28);
2307 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(M5Value,
uint32_t, 28, 32);
2308 DECLARE_FIELD_FOR_SIX_BYTE_INSTR(M4Value,
uint32_t, 32, 36);
2315 static int Number(
const char* name);
2318 static const char* names_[kNumRegisters];
2322 class DoubleRegisters {
2325 static int Number(
const char* name);
2328 static const char* names_[kNumDoubleRegisters];
2334 #endif // V8_S390_CONSTANTS_S390_H_