1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 package ppc64
31
32 import "cmd/internal/obj"
33
34
35
36
39 const (
40 NSNAME = 8
41 NSYM = 50
42 NREG = 32
43 NFREG = 32
44 )
45
46 const (
47
48
49 REG_R0 = obj.RBasePPC64 + iota
50 REG_R1
51 REG_R2
52 REG_R3
53 REG_R4
54 REG_R5
55 REG_R6
56 REG_R7
57 REG_R8
58 REG_R9
59 REG_R10
60 REG_R11
61 REG_R12
62 REG_R13
63 REG_R14
64 REG_R15
65 REG_R16
66 REG_R17
67 REG_R18
68 REG_R19
69 REG_R20
70 REG_R21
71 REG_R22
72 REG_R23
73 REG_R24
74 REG_R25
75 REG_R26
76 REG_R27
77 REG_R28
78 REG_R29
79 REG_R30
80 REG_R31
81
82
83 REG_CR0LT
84 REG_CR0GT
85 REG_CR0EQ
86 REG_CR0SO
87 REG_CR1LT
88 REG_CR1GT
89 REG_CR1EQ
90 REG_CR1SO
91 REG_CR2LT
92 REG_CR2GT
93 REG_CR2EQ
94 REG_CR2SO
95 REG_CR3LT
96 REG_CR3GT
97 REG_CR3EQ
98 REG_CR3SO
99 REG_CR4LT
100 REG_CR4GT
101 REG_CR4EQ
102 REG_CR4SO
103 REG_CR5LT
104 REG_CR5GT
105 REG_CR5EQ
106 REG_CR5SO
107 REG_CR6LT
108 REG_CR6GT
109 REG_CR6EQ
110 REG_CR6SO
111 REG_CR7LT
112 REG_CR7GT
113 REG_CR7EQ
114 REG_CR7SO
115
116
118
119 REG_F0
120 REG_F1
121 REG_F2
122 REG_F3
123 REG_F4
124 REG_F5
125 REG_F6
126 REG_F7
127 REG_F8
128 REG_F9
129 REG_F10
130 REG_F11
131 REG_F12
132 REG_F13
133 REG_F14
134 REG_F15
135 REG_F16
136 REG_F17
137 REG_F18
138 REG_F19
139 REG_F20
140 REG_F21
141 REG_F22
142 REG_F23
143 REG_F24
144 REG_F25
145 REG_F26
146 REG_F27
147 REG_F28
148 REG_F29
149 REG_F30
150 REG_F31
151
152
153 REG_V0
154 REG_V1
155 REG_V2
156 REG_V3
157 REG_V4
158 REG_V5
159 REG_V6
160 REG_V7
161 REG_V8
162 REG_V9
163 REG_V10
164 REG_V11
165 REG_V12
166 REG_V13
167 REG_V14
168 REG_V15
169 REG_V16
170 REG_V17
171 REG_V18
172 REG_V19
173 REG_V20
174 REG_V21
175 REG_V22
176 REG_V23
177 REG_V24
178 REG_V25
179 REG_V26
180 REG_V27
181 REG_V28
182 REG_V29
183 REG_V30
184 REG_V31
185
186
187 REG_VS0
188 REG_VS1
189 REG_VS2
190 REG_VS3
191 REG_VS4
192 REG_VS5
193 REG_VS6
194 REG_VS7
195 REG_VS8
196 REG_VS9
197 REG_VS10
198 REG_VS11
199 REG_VS12
200 REG_VS13
201 REG_VS14
202 REG_VS15
203 REG_VS16
204 REG_VS17
205 REG_VS18
206 REG_VS19
207 REG_VS20
208 REG_VS21
209 REG_VS22
210 REG_VS23
211 REG_VS24
212 REG_VS25
213 REG_VS26
214 REG_VS27
215 REG_VS28
216 REG_VS29
217 REG_VS30
218 REG_VS31
219 REG_VS32
220 REG_VS33
221 REG_VS34
222 REG_VS35
223 REG_VS36
224 REG_VS37
225 REG_VS38
226 REG_VS39
227 REG_VS40
228 REG_VS41
229 REG_VS42
230 REG_VS43
231 REG_VS44
232 REG_VS45
233 REG_VS46
234 REG_VS47
235 REG_VS48
236 REG_VS49
237 REG_VS50
238 REG_VS51
239 REG_VS52
240 REG_VS53
241 REG_VS54
242 REG_VS55
243 REG_VS56
244 REG_VS57
245 REG_VS58
246 REG_VS59
247 REG_VS60
248 REG_VS61
249 REG_VS62
250 REG_VS63
251
252 REG_CR0
253 REG_CR1
254 REG_CR2
255 REG_CR3
256 REG_CR4
257 REG_CR5
258 REG_CR6
259 REG_CR7
260
261
262
263
264 REG_A0
265 REG_A1
266 REG_A2
267 REG_A3
268 REG_A4
269 REG_A5
270 REG_A6
271 REG_A7
272
273 REG_MSR
274 REG_FPSCR
275 REG_CR
276
277 REG_SPECIAL = REG_CR0
278
279 REG_CRBIT0 = REG_CR0LT
280
281 REG_SPR0 = obj.RBasePPC64 + 1024
282
283 REG_XER = REG_SPR0 + 1
284 REG_LR = REG_SPR0 + 8
285 REG_CTR = REG_SPR0 + 9
286
287 REGZERO = REG_R0
288 REGSP = REG_R1
289 REGSB = REG_R2
290 REGRET = REG_R3
291 REGARG = -1
292 REGRT1 = REG_R20
293 REGRT2 = REG_R21
294 REGMIN = REG_R7
295 REGCTXT = REG_R11
296 REGTLS = REG_R13
297 REGMAX = REG_R27
298 REGEXT = REG_R30
299 REGG = REG_R30
300 REGTMP = REG_R31
301 FREGRET = REG_F0
302 FREGMIN = REG_F17
303 FREGMAX = REG_F26
304 FREGEXT = REG_F26
305 )
306
307
308
309 var PPC64DWARFRegisters = map[int16]int16{}
310
311 func init() {
312
313 f := func(from, to, base int16) {
314 for r := int16(from); r <= to; r++ {
315 PPC64DWARFRegisters[r] = r - from + base
316 }
317 }
318 f(REG_R0, REG_R31, 0)
319 f(REG_F0, REG_F31, 32)
320 f(REG_V0, REG_V31, 77)
321 f(REG_CR0, REG_CR7, 68)
322
323 f(REG_VS0, REG_VS31, 32)
324 f(REG_VS32, REG_VS63, 77)
325 PPC64DWARFRegisters[REG_LR] = 65
326 PPC64DWARFRegisters[REG_CTR] = 66
327 PPC64DWARFRegisters[REG_XER] = 76
328 }
329
330
340 const (
341 BIG = 32768 - 8
342 )
343
344 const (
345
346 LABEL = 1 << 0
347 LEAF = 1 << 1
348 FLOAT = 1 << 2
349 BRANCH = 1 << 3
350 LOAD = 1 << 4
351 FCMP = 1 << 5
352 SYNC = 1 << 6
353 LIST = 1 << 7
354 FOLL = 1 << 8
355 NOSCHED = 1 << 9
356 PFX_X64B = 1 << 10
357 )
358
359
360
361
362
363
364
365
366
367 const (
368 BI_CR0 = 0
369 BI_CR1 = 4
370 BI_CR2 = 8
371 BI_CR3 = 12
372 BI_CR4 = 16
373 BI_CR5 = 20
374 BI_CR6 = 24
375 BI_CR7 = 28
376 BI_LT = 0
377 BI_GT = 1
378 BI_EQ = 2
379 BI_FU = 3
380 )
381
382
383
384 const (
385 BO_ALWAYS = 20
386 BO_BCTR = 16
387 BO_NOTBCTR = 18
388 BO_BCR = 12
389 BO_BCRBCTR = 8
390 BO_NOTBCR = 4
391 )
392
393
394
395 const (
396 C_COND_LT = iota
397 C_COND_GT
398 C_COND_EQ
399 C_COND_SO
400 )
401
402
403 const (
404 C_NONE = iota
405 C_REGP
406 C_REG
407 C_FREGP
408 C_FREG
409 C_VREG
410 C_VSREGP
411 C_VSREG
412 C_CREG
413 C_CRBIT
414 C_SPR
415 C_AREG
416 C_ZCON
417 C_U1CON
418 C_U2CON
419 C_U3CON
420 C_U4CON
421 C_U5CON
422 C_U8CON
423 C_U15CON
424 C_S16CON
425 C_U16CON
426 C_16CON
427 C_U31CON
428 C_S32CON
429 C_U32CON
430 C_32CON
431 C_S34CON
432 C_64CON
433 C_SACON
434 C_LACON
435 C_DACON
436 C_BRA
437 C_BRAPIC
438 C_ZOREG
439 C_SOREG
440 C_LOREG
441 C_XOREG
442 C_FPSCR
443 C_LR
444 C_CTR
445 C_ANY
446 C_GOK
447 C_ADDR
448 C_TLS_LE
449 C_TLS_IE
450 C_TEXTSIZE
451
452 C_NCLASS
453 )
454
455 const (
456 AADD = obj.ABasePPC64 + obj.A_ARCHSPECIFIC + iota
457 AADDCC
458 AADDIS
459 AADDV
460 AADDVCC
461 AADDC
462 AADDCCC
463 AADDCV
464 AADDCVCC
465 AADDME
466 AADDMECC
467 AADDMEVCC
468 AADDMEV
469 AADDE
470 AADDECC
471 AADDEVCC
472 AADDEV
473 AADDZE
474 AADDZECC
475 AADDZEVCC
476 AADDZEV
477 AADDEX
478 AAND
479 AANDCC
480 AANDN
481 AANDNCC
482 AANDISCC
483 ABC
484 ABCL
485 ABEQ
486 ABGE
487 ABGT
488 ABLE
489 ABLT
490 ABNE
491 ABVC
492 ABVS
493 ABDNZ
494 ABDZ
495 ACMP
496 ACMPU
497 ACMPEQB
498 ACNTLZW
499 ACNTLZWCC
500 ACRAND
501 ACRANDN
502 ACREQV
503 ACRNAND
504 ACRNOR
505 ACROR
506 ACRORN
507 ACRXOR
508 ADADD
509 ADDIV
510 ADIVW
511 ADIVWCC
512 ADIVWVCC
513 ADIVWV
514 ADIVWU
515 ADIVWUCC
516 ADIVWUVCC
517 ADIVWUV
518 ADMUL
519 ADSUB
520 AMODUD
521 AMODUW
522 AMODSD
523 AMODSW
524 AEQV
525 AEQVCC
526 AEXTSB
527 AEXTSBCC
528 AEXTSH
529 AEXTSHCC
530 AFABS
531 AFABSCC
532 AFADD
533 AFADDCC
534 AFADDS
535 AFADDSCC
536 AFCMPO
537 AFCMPU
538 AFCTIW
539 AFCTIWCC
540 AFCTIWZ
541 AFCTIWZCC
542 AFDIV
543 AFDIVCC
544 AFDIVS
545 AFDIVSCC
546 AFMADD
547 AFMADDCC
548 AFMADDS
549 AFMADDSCC
550 AFMOVD
551 AFMOVDCC
552 AFMOVDU
553 AFMOVS
554 AFMOVSU
555 AFMOVSX
556 AFMOVSZ
557 AFMSUB
558 AFMSUBCC
559 AFMSUBS
560 AFMSUBSCC
561 AFMUL
562 AFMULCC
563 AFMULS
564 AFMULSCC
565 AFNABS
566 AFNABSCC
567 AFNEG
568 AFNEGCC
569 AFNMADD
570 AFNMADDCC
571 AFNMADDS
572 AFNMADDSCC
573 AFNMSUB
574 AFNMSUBCC
575 AFNMSUBS
576 AFNMSUBSCC
577 AFRSP
578 AFRSPCC
579 AFSUB
580 AFSUBCC
581 AFSUBS
582 AFSUBSCC
583 AISEL
584 AMOVMW
585 ALBAR
586 ALHAR
587 ALSW
588 ALWAR
589 ALWSYNC
590 AMOVDBR
591 AMOVWBR
592 AMOVB
593 AMOVBU
594 AMOVBZ
595 AMOVBZU
596 AMOVH
597 AMOVHBR
598 AMOVHU
599 AMOVHZ
600 AMOVHZU
601 AMOVW
602 AMOVWU
603 AMOVFL
604 AMOVCRFS
605 AMTFSB0
606 AMTFSB0CC
607 AMTFSB1
608 AMTFSB1CC
609 AMULHW
610 AMULHWCC
611 AMULHWU
612 AMULHWUCC
613 AMULLW
614 AMULLWCC
615 AMULLWVCC
616 AMULLWV
617 ANAND
618 ANANDCC
619 ANEG
620 ANEGCC
621 ANEGVCC
622 ANEGV
623 ANOR
624 ANORCC
625 AOR
626 AORCC
627 AORN
628 AORNCC
629 AORIS
630 AREM
631 AREMU
632 ARFI
633 ARLWMI
634 ARLWMICC
635 ARLWNM
636 ARLWNMCC
637 ACLRLSLWI
638 ASLW
639 ASLWCC
640 ASRW
641 ASRAW
642 ASRAWCC
643 ASRWCC
644 ASTBCCC
645 ASTHCCC
646 ASTSW
647 ASTWCCC
648 ASUB
649 ASUBCC
650 ASUBVCC
651 ASUBC
652 ASUBCCC
653 ASUBCV
654 ASUBCVCC
655 ASUBME
656 ASUBMECC
657 ASUBMEVCC
658 ASUBMEV
659 ASUBV
660 ASUBE
661 ASUBECC
662 ASUBEV
663 ASUBEVCC
664 ASUBZE
665 ASUBZECC
666 ASUBZEVCC
667 ASUBZEV
668 ASYNC
669 AXOR
670 AXORCC
671 AXORIS
672
673 ADCBF
674 ADCBI
675 ADCBST
676 ADCBT
677 ADCBTST
678 ADCBZ
679 AEIEIO
680 AICBI
681 AISYNC
682 APTESYNC
683 ATLBIE
684 ATLBIEL
685 ATLBSYNC
686 ATW
687
688 ASYSCALL
689 AWORD
690
691 ARFCI
692
693 AFCPSGN
694 AFCPSGNCC
695
696 AFRES
697 AFRESCC
698 AFRIM
699 AFRIMCC
700 AFRIP
701 AFRIPCC
702 AFRIZ
703 AFRIZCC
704 AFRIN
705 AFRINCC
706 AFRSQRTE
707 AFRSQRTECC
708 AFSEL
709 AFSELCC
710 AFSQRT
711 AFSQRTCC
712 AFSQRTS
713 AFSQRTSCC
714
715
716
717 ACNTLZD
718 ACNTLZDCC
719 ACMPW
720 ACMPWU
721 ACMPB
722 AFTDIV
723 AFTSQRT
724 ADIVD
725 ADIVDCC
726 ADIVDE
727 ADIVDECC
728 ADIVDEU
729 ADIVDEUCC
730 ADIVDVCC
731 ADIVDV
732 ADIVDU
733 ADIVDUCC
734 ADIVDUVCC
735 ADIVDUV
736 AEXTSW
737 AEXTSWCC
738
739 AFCFID
740 AFCFIDCC
741 AFCFIDU
742 AFCFIDUCC
743 AFCFIDS
744 AFCFIDSCC
745 AFCTID
746 AFCTIDCC
747 AFCTIDZ
748 AFCTIDZCC
749 ALDAR
750 AMOVD
751 AMOVDU
752 AMOVWZ
753 AMOVWZU
754 AMULHD
755 AMULHDCC
756 AMULHDU
757 AMULHDUCC
758 AMULLD
759 AMULLDCC
760 AMULLDVCC
761 AMULLDV
762 ARFID
763 ARLDMI
764 ARLDMICC
765 ARLDIMI
766 ARLDIMICC
767 ARLDC
768 ARLDCCC
769 ARLDCR
770 ARLDCRCC
771 ARLDICR
772 ARLDICRCC
773 ARLDCL
774 ARLDCLCC
775 ARLDICL
776 ARLDICLCC
777 ARLDIC
778 ARLDICCC
779 ACLRLSLDI
780 AROTL
781 AROTLW
782 ASLBIA
783 ASLBIE
784 ASLBMFEE
785 ASLBMFEV
786 ASLBMTE
787 ASLD
788 ASLDCC
789 ASRD
790 ASRAD
791 ASRADCC
792 ASRDCC
793 AEXTSWSLI
794 AEXTSWSLICC
795 ASTDCCC
796 ATD
797 ASETB
798
799
800 ADWORD
801 AREMD
802 AREMDU
803
804
805 AHRFID
806 APOPCNTD
807 APOPCNTW
808 APOPCNTB
809 ACNTTZW
810 ACNTTZWCC
811 ACNTTZD
812 ACNTTZDCC
813 ACOPY
814 APASTECC
815 ADARN
816 AMADDHD
817 AMADDHDU
818 AMADDLD
819
820
821 ALVEBX
822 ALVEHX
823 ALVEWX
824 ALVX
825 ALVXL
826 ALVSL
827 ALVSR
828 ASTVEBX
829 ASTVEHX
830 ASTVEWX
831 ASTVX
832 ASTVXL
833 AVAND
834 AVANDC
835 AVNAND
836 AVOR
837 AVORC
838 AVNOR
839 AVXOR
840 AVEQV
841 AVADDUM
842 AVADDUBM
843 AVADDUHM
844 AVADDUWM
845 AVADDUDM
846 AVADDUQM
847 AVADDCU
848 AVADDCUQ
849 AVADDCUW
850 AVADDUS
851 AVADDUBS
852 AVADDUHS
853 AVADDUWS
854 AVADDSS
855 AVADDSBS
856 AVADDSHS
857 AVADDSWS
858 AVADDE
859 AVADDEUQM
860 AVADDECUQ
861 AVSUBUM
862 AVSUBUBM
863 AVSUBUHM
864 AVSUBUWM
865 AVSUBUDM
866 AVSUBUQM
867 AVSUBCU
868 AVSUBCUQ
869 AVSUBCUW
870 AVSUBUS
871 AVSUBUBS
872 AVSUBUHS
873 AVSUBUWS
874 AVSUBSS
875 AVSUBSBS
876 AVSUBSHS
877 AVSUBSWS
878 AVSUBE
879 AVSUBEUQM
880 AVSUBECUQ
881 AVMULESB
882 AVMULOSB
883 AVMULEUB
884 AVMULOUB
885 AVMULESH
886 AVMULOSH
887 AVMULEUH
888 AVMULOUH
889 AVMULESW
890 AVMULOSW
891 AVMULEUW
892 AVMULOUW
893 AVMULUWM
894 AVPMSUM
895 AVPMSUMB
896 AVPMSUMH
897 AVPMSUMW
898 AVPMSUMD
899 AVMSUMUDM
900 AVR
901 AVRLB
902 AVRLH
903 AVRLW
904 AVRLD
905 AVS
906 AVSLB
907 AVSLH
908 AVSLW
909 AVSL
910 AVSLO
911 AVSRB
912 AVSRH
913 AVSRW
914 AVSR
915 AVSRO
916 AVSLD
917 AVSRD
918 AVSA
919 AVSRAB
920 AVSRAH
921 AVSRAW
922 AVSRAD
923 AVSOI
924 AVSLDOI
925 AVCLZ
926 AVCLZB
927 AVCLZH
928 AVCLZW
929 AVCLZD
930 AVPOPCNT
931 AVPOPCNTB
932 AVPOPCNTH
933 AVPOPCNTW
934 AVPOPCNTD
935 AVCMPEQ
936 AVCMPEQUB
937 AVCMPEQUBCC
938 AVCMPEQUH
939 AVCMPEQUHCC
940 AVCMPEQUW
941 AVCMPEQUWCC
942 AVCMPEQUD
943 AVCMPEQUDCC
944 AVCMPGT
945 AVCMPGTUB
946 AVCMPGTUBCC
947 AVCMPGTUH
948 AVCMPGTUHCC
949 AVCMPGTUW
950 AVCMPGTUWCC
951 AVCMPGTUD
952 AVCMPGTUDCC
953 AVCMPGTSB
954 AVCMPGTSBCC
955 AVCMPGTSH
956 AVCMPGTSHCC
957 AVCMPGTSW
958 AVCMPGTSWCC
959 AVCMPGTSD
960 AVCMPGTSDCC
961 AVCMPNEZB
962 AVCMPNEZBCC
963 AVCMPNEB
964 AVCMPNEBCC
965 AVCMPNEH
966 AVCMPNEHCC
967 AVCMPNEW
968 AVCMPNEWCC
969 AVPERM
970 AVPERMXOR
971 AVPERMR
972 AVBPERMQ
973 AVBPERMD
974 AVSEL
975 AVSPLTB
976 AVSPLTH
977 AVSPLTW
978 AVSPLTISB
979 AVSPLTISH
980 AVSPLTISW
981 AVCIPH
982 AVCIPHER
983 AVCIPHERLAST
984 AVNCIPH
985 AVNCIPHER
986 AVNCIPHERLAST
987 AVSBOX
988 AVSHASIGMA
989 AVSHASIGMAW
990 AVSHASIGMAD
991 AVMRGEW
992 AVMRGOW
993 AVCLZLSBB
994 AVCTZLSBB
995
996
997 ALXV
998 ALXVL
999 ALXVLL
1000 ALXVD2X
1001 ALXVW4X
1002 ALXVH8X
1003 ALXVB16X
1004 ALXVX
1005 ALXVDSX
1006 ASTXV
1007 ASTXVL
1008 ASTXVLL
1009 ASTXVD2X
1010 ASTXVW4X
1011 ASTXVH8X
1012 ASTXVB16X
1013 ASTXVX
1014 ALXSDX
1015 ASTXSDX
1016 ALXSIWAX
1017 ALXSIWZX
1018 ASTXSIWX
1019 AMFVSRD
1020 AMFFPRD
1021 AMFVRD
1022 AMFVSRWZ
1023 AMFVSRLD
1024 AMTVSRD
1025 AMTFPRD
1026 AMTVRD
1027 AMTVSRWA
1028 AMTVSRWZ
1029 AMTVSRDD
1030 AMTVSRWS
1031 AXXLAND
1032 AXXLANDC
1033 AXXLEQV
1034 AXXLNAND
1035 AXXLOR
1036 AXXLORC
1037 AXXLNOR
1038 AXXLORQ
1039 AXXLXOR
1040 AXXSEL
1041 AXXMRGHW
1042 AXXMRGLW
1043 AXXSPLTW
1044 AXXSPLTIB
1045 AXXPERM
1046 AXXPERMDI
1047 AXXSLDWI
1048 AXXBRQ
1049 AXXBRD
1050 AXXBRW
1051 AXXBRH
1052 AXSCVDPSP
1053 AXSCVSPDP
1054 AXSCVDPSPN
1055 AXSCVSPDPN
1056 AXVCVDPSP
1057 AXVCVSPDP
1058 AXSCVDPSXDS
1059 AXSCVDPSXWS
1060 AXSCVDPUXDS
1061 AXSCVDPUXWS
1062 AXSCVSXDDP
1063 AXSCVUXDDP
1064 AXSCVSXDSP
1065 AXSCVUXDSP
1066 AXVCVDPSXDS
1067 AXVCVDPSXWS
1068 AXVCVDPUXDS
1069 AXVCVDPUXWS
1070 AXVCVSPSXDS
1071 AXVCVSPSXWS
1072 AXVCVSPUXDS
1073 AXVCVSPUXWS
1074 AXVCVSXDDP
1075 AXVCVSXWDP
1076 AXVCVUXDDP
1077 AXVCVUXWDP
1078 AXVCVSXDSP
1079 AXVCVSXWSP
1080 AXVCVUXDSP
1081 AXVCVUXWSP
1082 AXSMAXJDP
1083 AXSMINJDP
1084 ALASTAOUT
1085
1086
1087 ABR = obj.AJMP
1088 ABL = obj.ACALL
1089 ALAST = ALASTGEN
1090 )
1091
View as plain text