github.com/FenixAra/go@v0.0.0-20170127160404-96ea0918e670/src/cmd/internal/obj/s390x/a.out.go (about) 1 // Based on cmd/internal/obj/ppc64/a.out.go. 2 // 3 // Copyright © 1994-1999 Lucent Technologies Inc. All rights reserved. 4 // Portions Copyright © 1995-1997 C H Forsyth (forsyth@terzarima.net) 5 // Portions Copyright © 1997-1999 Vita Nuova Limited 6 // Portions Copyright © 2000-2008 Vita Nuova Holdings Limited (www.vitanuova.com) 7 // Portions Copyright © 2004,2006 Bruce Ellis 8 // Portions Copyright © 2005-2007 C H Forsyth (forsyth@terzarima.net) 9 // Revisions Copyright © 2000-2008 Lucent Technologies Inc. and others 10 // Portions Copyright © 2009 The Go Authors. All rights reserved. 11 // 12 // Permission is hereby granted, free of charge, to any person obtaining a copy 13 // of this software and associated documentation files (the "Software"), to deal 14 // in the Software without restriction, including without limitation the rights 15 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 16 // copies of the Software, and to permit persons to whom the Software is 17 // furnished to do so, subject to the following conditions: 18 // 19 // The above copyright notice and this permission notice shall be included in 20 // all copies or substantial portions of the Software. 21 // 22 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 23 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 24 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 25 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 26 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 27 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 28 // THE SOFTWARE. 29 30 package s390x 31 32 import "cmd/internal/obj" 33 34 //go:generate go run ../stringer.go -i $GOFILE -o anames.go -p s390x 35 36 const ( 37 NSNAME = 8 38 NSYM = 50 39 NREG = 16 // number of general purpose registers 40 NFREG = 16 // number of floating point registers 41 ) 42 43 const ( 44 // General purpose registers (GPRs). 45 REG_R0 = obj.RBaseS390X + iota 46 REG_R1 47 REG_R2 48 REG_R3 49 REG_R4 50 REG_R5 51 REG_R6 52 REG_R7 53 REG_R8 54 REG_R9 55 REG_R10 56 REG_R11 57 REG_R12 58 REG_R13 59 REG_R14 60 REG_R15 61 62 // Floating point registers (FPRs). 63 REG_F0 64 REG_F1 65 REG_F2 66 REG_F3 67 REG_F4 68 REG_F5 69 REG_F6 70 REG_F7 71 REG_F8 72 REG_F9 73 REG_F10 74 REG_F11 75 REG_F12 76 REG_F13 77 REG_F14 78 REG_F15 79 80 // Vector registers (VRs) - only available when the vector 81 // facility is installed. 82 // V0-V15 are aliases for F0-F15. 83 // We keep them in a separate space to make printing etc. easier 84 // If the code generator ever emits vector instructions it will 85 // need to take into account the aliasing. 86 REG_V0 87 REG_V1 88 REG_V2 89 REG_V3 90 REG_V4 91 REG_V5 92 REG_V6 93 REG_V7 94 REG_V8 95 REG_V9 96 REG_V10 97 REG_V11 98 REG_V12 99 REG_V13 100 REG_V14 101 REG_V15 102 REG_V16 103 REG_V17 104 REG_V18 105 REG_V19 106 REG_V20 107 REG_V21 108 REG_V22 109 REG_V23 110 REG_V24 111 REG_V25 112 REG_V26 113 REG_V27 114 REG_V28 115 REG_V29 116 REG_V30 117 REG_V31 118 119 // Access registers (ARs). 120 // The thread pointer is typically stored in the register pair 121 // AR0 and AR1. 122 REG_AR0 123 REG_AR1 124 REG_AR2 125 REG_AR3 126 REG_AR4 127 REG_AR5 128 REG_AR6 129 REG_AR7 130 REG_AR8 131 REG_AR9 132 REG_AR10 133 REG_AR11 134 REG_AR12 135 REG_AR13 136 REG_AR14 137 REG_AR15 138 139 REG_RESERVED // end of allocated registers 140 141 REGZERO = REG_R0 // set to zero 142 REGARG = -1 // -1 disables passing the first argument in register 143 REGRT1 = REG_R3 // used during zeroing of the stack - not reserved 144 REGRT2 = REG_R4 // used during zeroing of the stack - not reserved 145 REGTMP = REG_R10 // scratch register used in the assembler and linker 146 REGTMP2 = REG_R11 // scratch register used in the assembler and linker 147 REGCTXT = REG_R12 // context for closures 148 REGG = REG_R13 // G 149 REG_LR = REG_R14 // link register 150 REGSP = REG_R15 // stack pointer 151 ) 152 153 const ( 154 BIG = 32768 - 8 155 DISP12 = 4096 156 DISP16 = 65536 157 DISP20 = 1048576 158 ) 159 160 const ( 161 // mark flags 162 LABEL = 1 << 0 163 LEAF = 1 << 1 164 FLOAT = 1 << 2 165 BRANCH = 1 << 3 166 LOAD = 1 << 4 167 FCMP = 1 << 5 168 SYNC = 1 << 6 169 LIST = 1 << 7 170 FOLL = 1 << 8 171 NOSCHED = 1 << 9 172 ) 173 174 const ( // comments from func aclass in asmz.go 175 C_NONE = iota 176 C_REG // general-purpose register (64-bit) 177 C_FREG // floating-point register (64-bit) 178 C_VREG // vector register (128-bit) 179 C_AREG // access register (32-bit) 180 C_ZCON // constant == 0 181 C_SCON // 0 <= constant <= 0x7fff (positive int16) 182 C_UCON // constant & 0xffff == 0 (int16 or uint16) 183 C_ADDCON // 0 > constant >= -0x8000 (negative int16) 184 C_ANDCON // constant <= 0xffff 185 C_LCON // constant (int32 or uint32) 186 C_DCON // constant (int64 or uint64) 187 C_SACON // computed address, 16-bit displacement, possibly SP-relative 188 C_LACON // computed address, 32-bit displacement, possibly SP-relative 189 C_DACON // computed address, 64-bit displacment? 190 C_SBRA // short branch 191 C_LBRA // long branch 192 C_SAUTO // short auto 193 C_LAUTO // long auto 194 C_ZOREG // heap address, register-based, displacement == 0 195 C_SOREG // heap address, register-based, int16 displacement 196 C_LOREG // heap address, register-based, int32 displacement 197 C_TLS_LE // TLS - local exec model (for executables) 198 C_TLS_IE // TLS - initial exec model (for shared libraries loaded at program startup) 199 C_GOK // general address 200 C_ADDR // relocation for extern or static symbols (loads and stores) 201 C_SYMADDR // relocation for extern or static symbols (address taking) 202 C_GOTADDR // GOT slot for a symbol in -dynlink mode 203 C_TEXTSIZE // text size 204 C_ANY 205 C_NCLASS // must be the last 206 ) 207 208 const ( 209 // integer arithmetic 210 AADD = obj.ABaseS390X + obj.A_ARCHSPECIFIC + iota 211 AADDC 212 AADDE 213 AADDW 214 ADIVW 215 ADIVWU 216 ADIVD 217 ADIVDU 218 AMODW 219 AMODWU 220 AMODD 221 AMODDU 222 AMULLW 223 AMULLD 224 AMULHD 225 AMULHDU 226 ASUB 227 ASUBC 228 ASUBV 229 ASUBE 230 ASUBW 231 ANEG 232 ANEGW 233 234 // integer moves 235 AMOVWBR 236 AMOVB 237 AMOVBZ 238 AMOVH 239 AMOVHBR 240 AMOVHZ 241 AMOVW 242 AMOVWZ 243 AMOVD 244 AMOVDBR 245 246 // conditional moves 247 AMOVDEQ 248 AMOVDGE 249 AMOVDGT 250 AMOVDLE 251 AMOVDLT 252 AMOVDNE 253 254 // find leftmost one 255 AFLOGR 256 257 // integer bitwise 258 AAND 259 AANDW 260 AOR 261 AORW 262 AXOR 263 AXORW 264 ASLW 265 ASLD 266 ASRW 267 ASRAW 268 ASRD 269 ASRAD 270 ARLL 271 ARLLG 272 273 // floating point 274 AFABS 275 AFADD 276 AFADDS 277 AFCMPO 278 AFCMPU 279 ACEBR 280 AFDIV 281 AFDIVS 282 AFMADD 283 AFMADDS 284 AFMOVD 285 AFMOVS 286 AFMSUB 287 AFMSUBS 288 AFMUL 289 AFMULS 290 AFNABS 291 AFNEG 292 AFNEGS 293 AFNMADD 294 AFNMADDS 295 AFNMSUB 296 AFNMSUBS 297 ALEDBR 298 ALDEBR 299 AFSUB 300 AFSUBS 301 AFSQRT 302 AFSQRTS 303 AFIEBR 304 AFIDBR 305 306 // convert from int32/int64 to float/float64 307 ACEFBRA 308 ACDFBRA 309 ACEGBRA 310 ACDGBRA 311 312 // convert from float/float64 to int32/int64 313 ACFEBRA 314 ACFDBRA 315 ACGEBRA 316 ACGDBRA 317 318 // convert from uint32/uint64 to float/float64 319 ACELFBR 320 ACDLFBR 321 ACELGBR 322 ACDLGBR 323 324 // convert from float/float64 to uint32/uint64 325 ACLFEBR 326 ACLFDBR 327 ACLGEBR 328 ACLGDBR 329 330 // compare 331 ACMP 332 ACMPU 333 ACMPW 334 ACMPWU 335 336 // compare and swap 337 ACS 338 ACSG 339 340 // serialize 341 ASYNC 342 343 // branch 344 ABC 345 ABCL 346 ABEQ 347 ABGE 348 ABGT 349 ABLE 350 ABLT 351 ABLEU 352 ABLTU 353 ABNE 354 ABVC 355 ABVS 356 ASYSCALL 357 358 // compare and branch 359 ACMPBEQ 360 ACMPBGE 361 ACMPBGT 362 ACMPBLE 363 ACMPBLT 364 ACMPBNE 365 ACMPUBEQ 366 ACMPUBGE 367 ACMPUBGT 368 ACMPUBLE 369 ACMPUBLT 370 ACMPUBNE 371 372 // storage-and-storage 373 AMVC 374 ACLC 375 AXC 376 AOC 377 ANC 378 379 // load 380 AEXRL 381 ALARL 382 ALA 383 ALAY 384 385 // interlocked load and op 386 ALAA 387 ALAAG 388 ALAAL 389 ALAALG 390 ALAN 391 ALANG 392 ALAX 393 ALAXG 394 ALAO 395 ALAOG 396 397 // load/store multiple 398 ALMY 399 ALMG 400 ASTMY 401 ASTMG 402 403 // store clock 404 ASTCK 405 ASTCKC 406 ASTCKE 407 ASTCKF 408 409 // macros 410 ACLEAR 411 412 // vector 413 AVA 414 AVAB 415 AVAH 416 AVAF 417 AVAG 418 AVAQ 419 AVACC 420 AVACCB 421 AVACCH 422 AVACCF 423 AVACCG 424 AVACCQ 425 AVAC 426 AVACQ 427 AVACCC 428 AVACCCQ 429 AVN 430 AVNC 431 AVAVG 432 AVAVGB 433 AVAVGH 434 AVAVGF 435 AVAVGG 436 AVAVGL 437 AVAVGLB 438 AVAVGLH 439 AVAVGLF 440 AVAVGLG 441 AVCKSM 442 AVCEQ 443 AVCEQB 444 AVCEQH 445 AVCEQF 446 AVCEQG 447 AVCEQBS 448 AVCEQHS 449 AVCEQFS 450 AVCEQGS 451 AVCH 452 AVCHB 453 AVCHH 454 AVCHF 455 AVCHG 456 AVCHBS 457 AVCHHS 458 AVCHFS 459 AVCHGS 460 AVCHL 461 AVCHLB 462 AVCHLH 463 AVCHLF 464 AVCHLG 465 AVCHLBS 466 AVCHLHS 467 AVCHLFS 468 AVCHLGS 469 AVCLZ 470 AVCLZB 471 AVCLZH 472 AVCLZF 473 AVCLZG 474 AVCTZ 475 AVCTZB 476 AVCTZH 477 AVCTZF 478 AVCTZG 479 AVEC 480 AVECB 481 AVECH 482 AVECF 483 AVECG 484 AVECL 485 AVECLB 486 AVECLH 487 AVECLF 488 AVECLG 489 AVERIM 490 AVERIMB 491 AVERIMH 492 AVERIMF 493 AVERIMG 494 AVERLL 495 AVERLLB 496 AVERLLH 497 AVERLLF 498 AVERLLG 499 AVERLLV 500 AVERLLVB 501 AVERLLVH 502 AVERLLVF 503 AVERLLVG 504 AVESLV 505 AVESLVB 506 AVESLVH 507 AVESLVF 508 AVESLVG 509 AVESL 510 AVESLB 511 AVESLH 512 AVESLF 513 AVESLG 514 AVESRA 515 AVESRAB 516 AVESRAH 517 AVESRAF 518 AVESRAG 519 AVESRAV 520 AVESRAVB 521 AVESRAVH 522 AVESRAVF 523 AVESRAVG 524 AVESRL 525 AVESRLB 526 AVESRLH 527 AVESRLF 528 AVESRLG 529 AVESRLV 530 AVESRLVB 531 AVESRLVH 532 AVESRLVF 533 AVESRLVG 534 AVX 535 AVFAE 536 AVFAEB 537 AVFAEH 538 AVFAEF 539 AVFAEBS 540 AVFAEHS 541 AVFAEFS 542 AVFAEZB 543 AVFAEZH 544 AVFAEZF 545 AVFAEZBS 546 AVFAEZHS 547 AVFAEZFS 548 AVFEE 549 AVFEEB 550 AVFEEH 551 AVFEEF 552 AVFEEBS 553 AVFEEHS 554 AVFEEFS 555 AVFEEZB 556 AVFEEZH 557 AVFEEZF 558 AVFEEZBS 559 AVFEEZHS 560 AVFEEZFS 561 AVFENE 562 AVFENEB 563 AVFENEH 564 AVFENEF 565 AVFENEBS 566 AVFENEHS 567 AVFENEFS 568 AVFENEZB 569 AVFENEZH 570 AVFENEZF 571 AVFENEZBS 572 AVFENEZHS 573 AVFENEZFS 574 AVFA 575 AVFADB 576 AWFADB 577 AWFK 578 AWFKDB 579 AVFCE 580 AVFCEDB 581 AVFCEDBS 582 AWFCEDB 583 AWFCEDBS 584 AVFCH 585 AVFCHDB 586 AVFCHDBS 587 AWFCHDB 588 AWFCHDBS 589 AVFCHE 590 AVFCHEDB 591 AVFCHEDBS 592 AWFCHEDB 593 AWFCHEDBS 594 AWFC 595 AWFCDB 596 AVCDG 597 AVCDGB 598 AWCDGB 599 AVCDLG 600 AVCDLGB 601 AWCDLGB 602 AVCGD 603 AVCGDB 604 AWCGDB 605 AVCLGD 606 AVCLGDB 607 AWCLGDB 608 AVFD 609 AVFDDB 610 AWFDDB 611 AVLDE 612 AVLDEB 613 AWLDEB 614 AVLED 615 AVLEDB 616 AWLEDB 617 AVFM 618 AVFMDB 619 AWFMDB 620 AVFMA 621 AVFMADB 622 AWFMADB 623 AVFMS 624 AVFMSDB 625 AWFMSDB 626 AVFPSO 627 AVFPSODB 628 AWFPSODB 629 AVFLCDB 630 AWFLCDB 631 AVFLNDB 632 AWFLNDB 633 AVFLPDB 634 AWFLPDB 635 AVFSQ 636 AVFSQDB 637 AWFSQDB 638 AVFS 639 AVFSDB 640 AWFSDB 641 AVFTCI 642 AVFTCIDB 643 AWFTCIDB 644 AVGFM 645 AVGFMB 646 AVGFMH 647 AVGFMF 648 AVGFMG 649 AVGFMA 650 AVGFMAB 651 AVGFMAH 652 AVGFMAF 653 AVGFMAG 654 AVGEF 655 AVGEG 656 AVGBM 657 AVZERO 658 AVONE 659 AVGM 660 AVGMB 661 AVGMH 662 AVGMF 663 AVGMG 664 AVISTR 665 AVISTRB 666 AVISTRH 667 AVISTRF 668 AVISTRBS 669 AVISTRHS 670 AVISTRFS 671 AVL 672 AVLR 673 AVLREP 674 AVLREPB 675 AVLREPH 676 AVLREPF 677 AVLREPG 678 AVLC 679 AVLCB 680 AVLCH 681 AVLCF 682 AVLCG 683 AVLEH 684 AVLEF 685 AVLEG 686 AVLEB 687 AVLEIH 688 AVLEIF 689 AVLEIG 690 AVLEIB 691 AVFI 692 AVFIDB 693 AWFIDB 694 AVLGV 695 AVLGVB 696 AVLGVH 697 AVLGVF 698 AVLGVG 699 AVLLEZ 700 AVLLEZB 701 AVLLEZH 702 AVLLEZF 703 AVLLEZG 704 AVLM 705 AVLP 706 AVLPB 707 AVLPH 708 AVLPF 709 AVLPG 710 AVLBB 711 AVLVG 712 AVLVGB 713 AVLVGH 714 AVLVGF 715 AVLVGG 716 AVLVGP 717 AVLL 718 AVMX 719 AVMXB 720 AVMXH 721 AVMXF 722 AVMXG 723 AVMXL 724 AVMXLB 725 AVMXLH 726 AVMXLF 727 AVMXLG 728 AVMRH 729 AVMRHB 730 AVMRHH 731 AVMRHF 732 AVMRHG 733 AVMRL 734 AVMRLB 735 AVMRLH 736 AVMRLF 737 AVMRLG 738 AVMN 739 AVMNB 740 AVMNH 741 AVMNF 742 AVMNG 743 AVMNL 744 AVMNLB 745 AVMNLH 746 AVMNLF 747 AVMNLG 748 AVMAE 749 AVMAEB 750 AVMAEH 751 AVMAEF 752 AVMAH 753 AVMAHB 754 AVMAHH 755 AVMAHF 756 AVMALE 757 AVMALEB 758 AVMALEH 759 AVMALEF 760 AVMALH 761 AVMALHB 762 AVMALHH 763 AVMALHF 764 AVMALO 765 AVMALOB 766 AVMALOH 767 AVMALOF 768 AVMAL 769 AVMALB 770 AVMALHW 771 AVMALF 772 AVMAO 773 AVMAOB 774 AVMAOH 775 AVMAOF 776 AVME 777 AVMEB 778 AVMEH 779 AVMEF 780 AVMH 781 AVMHB 782 AVMHH 783 AVMHF 784 AVMLE 785 AVMLEB 786 AVMLEH 787 AVMLEF 788 AVMLH 789 AVMLHB 790 AVMLHH 791 AVMLHF 792 AVMLO 793 AVMLOB 794 AVMLOH 795 AVMLOF 796 AVML 797 AVMLB 798 AVMLHW 799 AVMLF 800 AVMO 801 AVMOB 802 AVMOH 803 AVMOF 804 AVNO 805 AVNOT 806 AVO 807 AVPK 808 AVPKH 809 AVPKF 810 AVPKG 811 AVPKLS 812 AVPKLSH 813 AVPKLSF 814 AVPKLSG 815 AVPKLSHS 816 AVPKLSFS 817 AVPKLSGS 818 AVPKS 819 AVPKSH 820 AVPKSF 821 AVPKSG 822 AVPKSHS 823 AVPKSFS 824 AVPKSGS 825 AVPERM 826 AVPDI 827 AVPOPCT 828 AVREP 829 AVREPB 830 AVREPH 831 AVREPF 832 AVREPG 833 AVREPI 834 AVREPIB 835 AVREPIH 836 AVREPIF 837 AVREPIG 838 AVSCEF 839 AVSCEG 840 AVSEL 841 AVSL 842 AVSLB 843 AVSLDB 844 AVSRA 845 AVSRAB 846 AVSRL 847 AVSRLB 848 AVSEG 849 AVSEGB 850 AVSEGH 851 AVSEGF 852 AVST 853 AVSTEH 854 AVSTEF 855 AVSTEG 856 AVSTEB 857 AVSTM 858 AVSTL 859 AVSTRC 860 AVSTRCB 861 AVSTRCH 862 AVSTRCF 863 AVSTRCBS 864 AVSTRCHS 865 AVSTRCFS 866 AVSTRCZB 867 AVSTRCZH 868 AVSTRCZF 869 AVSTRCZBS 870 AVSTRCZHS 871 AVSTRCZFS 872 AVS 873 AVSB 874 AVSH 875 AVSF 876 AVSG 877 AVSQ 878 AVSCBI 879 AVSCBIB 880 AVSCBIH 881 AVSCBIF 882 AVSCBIG 883 AVSCBIQ 884 AVSBCBI 885 AVSBCBIQ 886 AVSBI 887 AVSBIQ 888 AVSUMG 889 AVSUMGH 890 AVSUMGF 891 AVSUMQ 892 AVSUMQF 893 AVSUMQG 894 AVSUM 895 AVSUMB 896 AVSUMH 897 AVTM 898 AVUPH 899 AVUPHB 900 AVUPHH 901 AVUPHF 902 AVUPLH 903 AVUPLHB 904 AVUPLHH 905 AVUPLHF 906 AVUPLL 907 AVUPLLB 908 AVUPLLH 909 AVUPLLF 910 AVUPL 911 AVUPLB 912 AVUPLHW 913 AVUPLF 914 915 // binary 916 ABYTE 917 AWORD 918 ADWORD 919 920 // end marker 921 ALAST 922 923 // aliases 924 ABR = obj.AJMP 925 ABL = obj.ACALL 926 )