24 #include "elf/common.h" 28 #include <asm/ptrace.h> 36 #ifndef HWCAP_S390_HIGH_GPRS 37 #define HWCAP_S390_HIGH_GPRS 512 41 #define HWCAP_S390_TE 1024 45 #define HWCAP_S390_VX 2048 49 #define HWCAP_S390_GS 16384 52 #define s390_num_regs 52 55 PT_PSWMASK, PT_PSWADDR,
57 PT_GPR0, PT_GPR1, PT_GPR2, PT_GPR3,
58 PT_GPR4, PT_GPR5, PT_GPR6, PT_GPR7,
59 PT_GPR8, PT_GPR9, PT_GPR10, PT_GPR11,
60 PT_GPR12, PT_GPR13, PT_GPR14, PT_GPR15,
62 PT_ACR0, PT_ACR1, PT_ACR2, PT_ACR3,
63 PT_ACR4, PT_ACR5, PT_ACR6, PT_ACR7,
64 PT_ACR8, PT_ACR9, PT_ACR10, PT_ACR11,
65 PT_ACR12, PT_ACR13, PT_ACR14, PT_ACR15,
70 PT_FPR0_HI, PT_FPR1_HI, PT_FPR2_HI, PT_FPR3_HI,
71 PT_FPR4_HI, PT_FPR5_HI, PT_FPR6_HI, PT_FPR7_HI,
72 PT_FPR8_HI, PT_FPR9_HI, PT_FPR10_HI, PT_FPR11_HI,
73 PT_FPR12_HI, PT_FPR13_HI, PT_FPR14_HI, PT_FPR15_HI,
75 PT_FPR0, PT_FPR1, PT_FPR2, PT_FPR3,
76 PT_FPR4, PT_FPR5, PT_FPR6, PT_FPR7,
77 PT_FPR8, PT_FPR9, PT_FPR10, PT_FPR11,
78 PT_FPR12, PT_FPR13, PT_FPR14, PT_FPR15,
84 #define s390_num_regs_3264 68 88 PT_PSWMASK, PT_PSWADDR,
90 PT_GPR0, PT_GPR0, PT_GPR1, PT_GPR1,
91 PT_GPR2, PT_GPR2, PT_GPR3, PT_GPR3,
92 PT_GPR4, PT_GPR4, PT_GPR5, PT_GPR5,
93 PT_GPR6, PT_GPR6, PT_GPR7, PT_GPR7,
94 PT_GPR8, PT_GPR8, PT_GPR9, PT_GPR9,
95 PT_GPR10, PT_GPR10, PT_GPR11, PT_GPR11,
96 PT_GPR12, PT_GPR12, PT_GPR13, PT_GPR13,
97 PT_GPR14, PT_GPR14, PT_GPR15, PT_GPR15,
99 PT_ACR0, PT_ACR1, PT_ACR2, PT_ACR3,
100 PT_ACR4, PT_ACR5, PT_ACR6, PT_ACR7,
101 PT_ACR8, PT_ACR9, PT_ACR10, PT_ACR11,
102 PT_ACR12, PT_ACR13, PT_ACR14, PT_ACR15,
106 PT_FPR0, PT_FPR1, PT_FPR2, PT_FPR3,
107 PT_FPR4, PT_FPR5, PT_FPR6, PT_FPR7,
108 PT_FPR8, PT_FPR9, PT_FPR10, PT_FPR11,
109 PT_FPR12, PT_FPR13, PT_FPR14, PT_FPR15,
115 PT_PSWMASK, PT_PSWADDR,
117 -1, PT_GPR0, -1, PT_GPR1,
118 -1, PT_GPR2, -1, PT_GPR3,
119 -1, PT_GPR4, -1, PT_GPR5,
120 -1, PT_GPR6, -1, PT_GPR7,
121 -1, PT_GPR8, -1, PT_GPR9,
122 -1, PT_GPR10, -1, PT_GPR11,
123 -1, PT_GPR12, -1, PT_GPR13,
124 -1, PT_GPR14, -1, PT_GPR15,
126 PT_ACR0, PT_ACR1, PT_ACR2, PT_ACR3,
127 PT_ACR4, PT_ACR5, PT_ACR6, PT_ACR7,
128 PT_ACR8, PT_ACR9, PT_ACR10, PT_ACR11,
129 PT_ACR12, PT_ACR13, PT_ACR14, PT_ACR15,
133 PT_FPR0_HI, PT_FPR1_HI, PT_FPR2_HI, PT_FPR3_HI,
134 PT_FPR4_HI, PT_FPR5_HI, PT_FPR6_HI, PT_FPR7_HI,
135 PT_FPR8_HI, PT_FPR9_HI, PT_FPR10_HI, PT_FPR11_HI,
136 PT_FPR12_HI, PT_FPR13_HI, PT_FPR14_HI, PT_FPR15_HI,
161 int regaddr = usr->
regmap[regno];
163 if (size <
sizeof (
long))
165 memset (buf, 0,
sizeof (
long));
168 && usr->
regmap[regno ^ 1] == regaddr)
172 buf +
sizeof (
long) - size);
174 else if (regaddr == PT_PSWMASK)
182 buf[size] |= (addr[0] & 0x80);
184 else if (regaddr == PT_PSWADDR)
189 buf[
sizeof (long) - size] &= ~0x80;
191 else if ((regaddr >= PT_GPR0 && regaddr <= PT_GPR15)
192 || regaddr == PT_ORIGGPR2)
197 else if (regaddr != -1)
203 int regno,
const char *buf)
208 int regaddr = usr->
regmap[regno];
210 if (size <
sizeof (
long))
213 && usr->
regmap[regno ^ 1] == regaddr)
217 buf +
sizeof (
long) - size);
219 else if (regaddr == PT_PSWMASK)
225 memcpy (mask, buf, size);
231 addr[0] |= (buf[size] & 0x80);
234 else if (regaddr == PT_PSWADDR)
241 amode = addr[0] & 0x80;
242 memcpy (addr, buf +
sizeof (
long) - size, size);
247 else if ((regaddr >= PT_GPR0 && regaddr <= PT_GPR15)
248 || regaddr == PT_ORIGGPR2)
253 else if (regaddr != -1)
269 if (usr->
regmap[i] < PT_PSWMASK
270 || usr->
regmap[i] > PT_ACR15)
274 (
char *) buf + usr->
regmap[i]);
287 for (i = 0; i < 16; i++)
297 for (i = 0; i < 16; i++)
330 for (i = 0; i < 4; i++)
333 for (i = 0; i < 16; i++)
343 for (i = 0; i < 16; i++)
353 for (i = 0; i < 16; i++)
363 for (i = 0; i < 16; i++)
373 for (i = 0; i < 16; i++)
383 for (i = 0; i < 3; i++)
393 for (i = 0; i < 3; i++)
403 for (i = 0; i < 3; i++)
413 for (i = 0; i < 3; i++)
444 #define s390_breakpoint_len 2 462 return pswa & 0x7fffffff;
479 pswa = (pswa & 0x80000000) | (newpc & 0x7fffffff);
484 unsigned long pc = newpc;
500 unsigned int *data_p = (
unsigned int *)data;
501 if (data_p[0] == AT_HWCAP)
506 unsigned long *data_p = (
unsigned long *)data;
507 if (data_p[0] == AT_HWCAP)
520 void *buf =
alloca (regsize);
524 iov.iov_len = regsize;
541 struct regset_info *regset;
545 int have_regset_last_break
547 int have_regset_system_call
556 if (have_regset_system_call)
558 else if (have_regset_last_break)
579 if (have_regset_vxrs)
587 tdesc = tdesc_s390x_gs_linux64;
588 else if (have_regset_vxrs)
589 tdesc = (have_regset_tdb ? tdesc_s390x_tevx_linux64 :
590 tdesc_s390x_vx_linux64);
591 else if (have_regset_tdb)
592 tdesc = tdesc_s390x_te_linux64;
593 else if (have_regset_system_call)
594 tdesc = tdesc_s390x_linux64v2;
595 else if (have_regset_last_break)
596 tdesc = tdesc_s390x_linux64v1;
598 tdesc = tdesc_s390x_linux64;
610 if (have_regset_vxrs)
617 else if (have_regset_vxrs)
620 else if (have_regset_tdb)
622 else if (have_regset_system_call)
624 else if (have_regset_last_break)
634 for (regset =
s390_regsets; regset->size >= 0; regset++)
636 switch (regset->nt_type)
639 case NT_S390_HIGH_GPRS:
643 case NT_S390_LAST_BREAK:
644 regset->size = have_regset_last_break ? 8 : 0;
646 case NT_S390_SYSTEM_CALL:
647 regset->size = have_regset_system_call ? 4 : 0;
650 regset->size = have_regset_tdb ? 256 : 0;
652 case NT_S390_VXRS_LOW:
653 regset->size = have_regset_vxrs ? 128 : 0;
655 case NT_S390_VXRS_HIGH:
656 regset->size = have_regset_vxrs ? 256 : 0;
660 regset->size = have_regset_gs ? 32 : 0;
771 CORE_ADDR res =
ptrace (PTRACE_PEEKUSER, lwpid, (
long) PT_ACR0, (
long) 0);
776 res &= 0xffffffffull;
808 0xa7, 0x14, 0x00, 0x1e,
809 0xa7, 0x24, 0x00, 0x14,
810 0xa7, 0x44, 0x00, 0x0a,
812 0xa7, 0xfa, 0xfd, 0x00,
813 0x50, 0x00, 0xf2, 0x04,
814 0xa7, 0x08, 0x00, 0x00,
815 0xa7, 0xf4, 0x00, 0x18,
817 0xa7, 0xfa, 0xfd, 0x00,
818 0x50, 0x00, 0xf2, 0x04,
819 0xa7, 0x08, 0x10, 0x00,
820 0xa7, 0xf4, 0x00, 0x10,
822 0xa7, 0xfa, 0xfd, 0x00,
823 0x50, 0x00, 0xf2, 0x04,
824 0xa7, 0x08, 0x20, 0x00,
825 0xa7, 0xf4, 0x00, 0x08,
827 0xa7, 0xfa, 0xfd, 0x00,
828 0x50, 0x00, 0xf2, 0x04,
829 0xa7, 0x08, 0x30, 0x00,
831 0x50, 0x10, 0xf2, 0x0c,
832 0x50, 0x20, 0xf2, 0x14,
833 0x50, 0x30, 0xf2, 0x1c,
834 0x50, 0x40, 0xf2, 0x24,
835 0x50, 0x50, 0xf2, 0x2c,
836 0x50, 0x60, 0xf2, 0x34,
837 0x50, 0x70, 0xf2, 0x3c,
838 0x50, 0x80, 0xf2, 0x44,
839 0x50, 0x90, 0xf2, 0x4c,
840 0x50, 0xa0, 0xf2, 0x54,
841 0x50, 0xb0, 0xf2, 0x5c,
842 0x50, 0xc0, 0xf2, 0x64,
843 0x50, 0xd0, 0xf2, 0x6c,
844 0x50, 0xe0, 0xf2, 0x74,
851 0xa7, 0x1a, 0x03, 0x00,
852 0x50, 0x10, 0xf2, 0x7c,
860 0xa7, 0x14, 0x00, 0x21,
861 0xa7, 0x24, 0x00, 0x16,
862 0xa7, 0x44, 0x00, 0x0b,
864 0xa7, 0xfb, 0xfd, 0x00,
865 0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
866 0xa7, 0x08, 0x00, 0x00,
867 0xa7, 0xf4, 0x00, 0x1b,
869 0xa7, 0xfb, 0xfd, 0x00,
870 0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
871 0xa7, 0x08, 0x10, 0x00,
872 0xa7, 0xf4, 0x00, 0x12,
874 0xa7, 0xfb, 0xfd, 0x00,
875 0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
876 0xa7, 0x08, 0x20, 0x00,
877 0xa7, 0xf4, 0x00, 0x09,
879 0xa7, 0xfb, 0xfd, 0x00,
880 0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
881 0xa7, 0x08, 0x30, 0x00,
883 0xb9, 0x04, 0x00, 0x1f,
884 0xa7, 0x1b, 0x03, 0x00,
885 0xe3, 0x10, 0xf2, 0x78, 0x00, 0x24,
892 0x9b, 0x0f, 0xf2, 0x80,
893 0xb9, 0x8d, 0x00, 0x23,
894 0xa7, 0x18, 0xcf, 0xff,
897 0x50, 0x20, 0xf2, 0xc0,
898 0x50, 0x30, 0xf2, 0xc4,
899 0xb2, 0x9c, 0xf2, 0xd0,
905 0x60, 0x00, 0xf0, 0x00,
906 0x60, 0x10, 0xf0, 0x10,
907 0x60, 0x20, 0xf0, 0x20,
908 0x60, 0x30, 0xf0, 0x30,
909 0x60, 0x40, 0xf0, 0x40,
910 0x60, 0x50, 0xf0, 0x50,
911 0x60, 0x60, 0xf0, 0x60,
912 0x60, 0x70, 0xf0, 0x70,
913 0x60, 0x80, 0xf0, 0x80,
914 0x60, 0x90, 0xf0, 0x90,
915 0x60, 0xa0, 0xf0, 0xa0,
916 0x60, 0xb0, 0xf0, 0xb0,
917 0x60, 0xc0, 0xf0, 0xc0,
918 0x60, 0xd0, 0xf0, 0xd0,
919 0x60, 0xe0, 0xf0, 0xe0,
920 0x60, 0xf0, 0xf0, 0xf0,
926 0xe7, 0x0f, 0xf0, 0x00, 0x00, 0x3e,
927 0xe7, 0x0f, 0xf1, 0x00, 0x0c, 0x3e,
935 0x58, 0x50, 0x10, 0x00,
936 0x58, 0x20, 0x10, 0x04,
937 0x58, 0x40, 0x10, 0x08,
938 0x58, 0x60, 0x10, 0x0c,
940 0x50, 0x50, 0xf2, 0xcc,
942 0x50, 0x20, 0xf2, 0xe0,
943 0x9b, 0x00, 0xf2, 0xe4,
945 0x41, 0x00, 0xf2, 0xe0,
948 0xa7, 0x18, 0x00, 0x00,
949 0xba, 0x10, 0x60, 0x00,
950 0xa7, 0x74, 0xff, 0xfc,
954 0xa7, 0xfa, 0xff, 0xa0,
958 0x41, 0xf0, 0xf0, 0x60,
961 0xa7, 0x18, 0x00, 0x00,
962 0x50, 0x10, 0x60, 0x00,
970 0xe3, 0x50, 0x10, 0x00, 0x00, 0x04,
971 0xe3, 0x20, 0x10, 0x08, 0x00, 0x04,
972 0xe3, 0x40, 0x10, 0x10, 0x00, 0x04,
973 0xe3, 0x60, 0x10, 0x18, 0x00, 0x04,
975 0xe3, 0x50, 0xf2, 0xc8, 0x00, 0x24,
977 0xe3, 0x20, 0xf2, 0xe0, 0x00, 0x24,
978 0x9b, 0x01, 0xf2, 0xe8,
980 0x41, 0x00, 0xf2, 0xe0,
983 0xa7, 0x19, 0x00, 0x00,
984 0xeb, 0x10, 0x60, 0x00, 0x00, 0x30,
985 0xa7, 0x74, 0xff, 0xfb,
987 0xb9, 0x04, 0x00, 0x3f,
989 0xa7, 0xfb, 0xff, 0x60,
993 0x41, 0xf0, 0xf0, 0xa0,
996 0xa7, 0x19, 0x00, 0x00,
997 0xe3, 0x10, 0x60, 0x00, 0x00, 0x24,
1003 0x68, 0x00, 0xf0, 0x00,
1004 0x68, 0x10, 0xf0, 0x10,
1005 0x68, 0x20, 0xf0, 0x20,
1006 0x68, 0x30, 0xf0, 0x30,
1007 0x68, 0x40, 0xf0, 0x40,
1008 0x68, 0x50, 0xf0, 0x50,
1009 0x68, 0x60, 0xf0, 0x60,
1010 0x68, 0x70, 0xf0, 0x70,
1011 0x68, 0x80, 0xf0, 0x80,
1012 0x68, 0x90, 0xf0, 0x90,
1013 0x68, 0xa0, 0xf0, 0xa0,
1014 0x68, 0xb0, 0xf0, 0xb0,
1015 0x68, 0xc0, 0xf0, 0xc0,
1016 0x68, 0xd0, 0xf0, 0xd0,
1017 0x68, 0xe0, 0xf0, 0xe0,
1018 0x68, 0xf0, 0xf0, 0xf0,
1024 0xe7, 0x0f, 0xf0, 0x00, 0x00, 0x36,
1025 0xe7, 0x0f, 0xf1, 0x00, 0x0c, 0x36,
1033 0xb2, 0x9d, 0xf2, 0xd0,
1034 0x58, 0x00, 0xf2, 0xc0,
1036 0x88, 0x00, 0x00, 0x0c,
1037 0x89, 0x00, 0x00, 0x1e,
1042 0x9a, 0x0f, 0xf2, 0x80,
1048 0x58, 0x00, 0xf2, 0x04,
1049 0x58, 0x10, 0xf2, 0x0c,
1050 0x58, 0x20, 0xf2, 0x14,
1051 0x58, 0x30, 0xf2, 0x1c,
1052 0x58, 0x40, 0xf2, 0x24,
1053 0x58, 0x50, 0xf2, 0x2c,
1054 0x58, 0x60, 0xf2, 0x34,
1055 0x58, 0x70, 0xf2, 0x3c,
1056 0x58, 0x80, 0xf2, 0x44,
1057 0x58, 0x90, 0xf2, 0x4c,
1058 0x58, 0xa0, 0xf2, 0x54,
1059 0x58, 0xb0, 0xf2, 0x5c,
1060 0x58, 0xc0, 0xf2, 0x64,
1061 0x58, 0xd0, 0xf2, 0x6c,
1062 0x58, 0xe0, 0xf2, 0x74,
1063 0x58, 0xf0, 0xf2, 0x7c,
1070 0xeb, 0x0f, 0xf2, 0x00, 0x00, 0x04,
1096 else if (buf[0] < 0xc0)
1117 if (op2 >= 4 && op2 <= 7)
1126 if (op2 == 0 || op2 == 4 || op2 == 5)
1167 int64_t loffset = 0;
1171 int16_t soffset = 0;
1172 memcpy (&soffset, buf + 2, 2);
1177 int32_t soffset = 0;
1178 memcpy (&soffset, buf + 2, 4);
1181 target = oldloc + loffset * 2;
1183 target &= 0x7fffffff;
1195 loffset = oldloc + ilen - *to;
1198 if (soffset != loffset && is_64)
1200 memcpy (buf + 2, &soffset, 4);
1217 loffset = target - *to;
1222 int16_t soffset = loffset;
1223 if (soffset != loffset)
1225 memcpy (buf + 2, &soffset, 2);
1229 int32_t soffset = loffset;
1230 if (soffset != loffset && is_64)
1232 memcpy (buf + 2, &soffset, 4);
1251 unsigned char *jjump_pad_insn,
1260 unsigned char jbuf[6] = { 0xc0, 0xf4, 0, 0, 0, 0 };
1268 int is_64 = 0, is_zarch = 0, has_vx = 0;
1297 unsigned char buf[] = {
1301 0xa7, 0x15, 0x00, 0x12,
1302 0, 0, 0, 0, 0, 0, 0, 0,
1303 0, 0, 0, 0, 0, 0, 0, 0,
1304 0, 0, 0, 0, 0, 0, 0, 0,
1305 0, 0, 0, 0, 0, 0, 0, 0,
1310 int bufpos = (buildaddr + 2) & 7;
1312 for (i = 0; i < 4; i++) {
1313 uint64_t lit = literals[i];
1314 memcpy (&buf[
sizeof buf - 32 + i * 8], &lit, 8);
1316 append_insns (&buildaddr,
sizeof buf - bufpos, buf + bufpos);
1319 unsigned char buf[] = {
1321 0xa7, 0x15, 0x00, 0x0a,
1330 int bufpos = (buildaddr + 2) & 3;
1333 literals[0] |= 0x80000000;
1335 for (i = 0; i < 4; i++) {
1336 uint32_t lit = literals[i];
1337 memcpy (&buf[
sizeof buf - 16 + i * 4], &lit, 4);
1339 append_insns (&buildaddr,
sizeof buf - bufpos, buf + bufpos);
1362 *adjusted_insn_addr = buildaddr;
1365 sprintf (err,
"E.Could not relocate instruction for tracepoint.");
1368 *adjusted_insn_addr_end = buildaddr;
1372 loffset = (tpaddr + orig_size) - buildaddr;
1375 if (is_64 &&
offset != loffset)
1378 "E.Jump back from jump pad too far from tracepoint " 1379 "(offset 0x%" PRIx64
" > int33).", loffset);
1382 memcpy (jbuf + 2, &
offset, 4);
1389 loffset = *jump_entry - tpaddr;
1392 if (is_64 &&
offset != loffset)
1395 "E.Jump back from jump pad too far from tracepoint " 1396 "(offset 0x%" PRIx64
" > int33).", loffset);
1399 memcpy (jbuf + 2, &
offset, 4);
1400 memcpy (jjump_pad_insn, jbuf,
sizeof jbuf);
1401 *jjump_pad_insn_size =
sizeof jbuf;
1404 *jump_entry = buildaddr;
1432 if (tdesc == tdesc_s390x_linux64)
1434 if (tdesc == tdesc_s390x_linux64v1)
1436 if (tdesc == tdesc_s390x_linux64v2)
1438 if (tdesc == tdesc_s390x_te_linux64)
1440 if (tdesc == tdesc_s390x_vx_linux64)
1442 if (tdesc == tdesc_s390x_tevx_linux64)
1505 static const unsigned char buf[] = {
1506 0x90, 0x9f, 0xf0, 0x24,
1519 static const unsigned char buf[] = {
1520 0x90, 0x23, 0xa0, 0x00,
1521 0xa7, 0x28, 0x00, 0x00,
1522 0x98, 0x9f, 0xb0, 0x24,
1533 static const unsigned char buf[] = {
1534 0x5e, 0x30, 0xf0, 0x04,
1535 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x98,
1536 0x41, 0xf0, 0xf0, 0x08,
1546 static const unsigned char buf[] = {
1547 0x98, 0x45, 0xf0, 0x00,
1549 0xb9, 0x99, 0x00, 0x42,
1550 0x41, 0xf0, 0xf0, 0x08,
1570 static const unsigned char buf[] = {
1572 0x98, 0x23, 0xf0, 0x00,
1573 0x8d, 0x20, 0x40, 0x00,
1574 0x41, 0xf0, 0xf0, 0x08,
1584 static const unsigned char buf[] = {
1586 0x98, 0x23, 0xf0, 0x00,
1587 0x8e, 0x20, 0x40, 0x00,
1588 0x41, 0xf0, 0xf0, 0x08,
1598 static const unsigned char buf[] = {
1600 0x98, 0x23, 0xf0, 0x00,
1601 0x8c, 0x20, 0x40, 0x00,
1602 0x41, 0xf0, 0xf0, 0x08,
1612 unsigned char buf[] = {
1613 0x8d, 0x20, 0x00, 64 - arg,
1614 0x8e, 0x20, 0x00, 64 - arg,
1624 static const unsigned char buf[] = {
1626 0xa7, 0x28, 0x00, 0x00,
1627 0xa7, 0x38, 0x00, 0x00,
1628 0xa7, 0x74, 0x00, 0x04,
1629 0xa7, 0x38, 0x00, 0x01,
1640 static const unsigned char buf[] = {
1641 0x54, 0x20, 0xf0, 0x00,
1642 0x54, 0x30, 0xf0, 0x04,
1643 0x41, 0xf0, 0xf0, 0x08,
1653 static const unsigned char buf[] = {
1654 0x56, 0x20, 0xf0, 0x00,
1655 0x56, 0x30, 0xf0, 0x04,
1656 0x41, 0xf0, 0xf0, 0x08,
1666 static const unsigned char buf[] = {
1667 0x57, 0x20, 0xf0, 0x00,
1668 0x57, 0x30, 0xf0, 0x04,
1669 0x41, 0xf0, 0xf0, 0x08,
1679 static const unsigned char buf[] = {
1680 0xa7, 0x48, 0xff, 0xff,
1701 static const unsigned char buf[] = {
1702 0x59, 0x20, 0xf0, 0x00,
1703 0xa7, 0x24, 0x00, 0x0c,
1704 0xa7, 0x44, 0x00, 0x06,
1705 0x55, 0x30, 0xf0, 0x04,
1706 0xa7, 0x24, 0x00, 0x06,
1708 0xa7, 0x38, 0x00, 0x00,
1709 0xa7, 0xf4, 0x00, 0x04,
1711 0xa7, 0x38, 0x00, 0x01,
1713 0xa7, 0x28, 0x00, 0x00,
1714 0x41, 0xf0, 0xf0, 0x08,
1724 static const unsigned char buf[] = {
1725 0x55, 0x20, 0xf0, 0x00,
1726 0xa7, 0x24, 0x00, 0x0c,
1727 0xa7, 0x44, 0x00, 0x06,
1728 0x55, 0x30, 0xf0, 0x04,
1729 0xa7, 0x24, 0x00, 0x06,
1731 0xa7, 0x38, 0x00, 0x00,
1732 0xa7, 0xf4, 0x00, 0x04,
1734 0xa7, 0x38, 0x00, 0x01,
1736 0xa7, 0x28, 0x00, 0x00,
1737 0x41, 0xf0, 0xf0, 0x08,
1747 static const unsigned char buf1[] = {
1748 0xa7, 0x28, 0x00, 0x00,
1749 0x43, 0x30, 0x30, 0x00,
1751 static const unsigned char buf2[] = {
1752 0xa7, 0x28, 0x00, 0x00,
1753 0x48, 0x30, 0x30, 0x00,
1755 static const unsigned char buf4[] = {
1756 0xa7, 0x28, 0x00, 0x00,
1757 0x58, 0x30, 0x30, 0x00,
1759 static const unsigned char buf8[] = {
1760 0x98, 0x23, 0x30, 0x00,
1786 static const unsigned char buf[] = {
1788 0x98, 0x23, 0xf0, 0x00,
1789 0x41, 0xf0, 0xf0, 0x08,
1790 0xc0, 0x74, 0x00, 0x00, 0x00, 0x00
1804 static const unsigned char buf[] = {
1805 0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,
1819 long diff = ((long) (to - (from - 2))) / 2;
1821 unsigned char buf[
sizeof sdiff];
1824 if (size !=
sizeof sdiff || sdiff != diff)
1830 memcpy (buf, &sdiff,
sizeof sdiff);
1841 static const unsigned char nop[] = {
1844 unsigned char buf[] = {
1845 0xa7, 0x15, 0x00, (size + 4) / 2,
1867 unsigned long long n = num;
1868 unsigned char buf_s[] = {
1869 0xa7, 0x38, num >> 8, num,
1872 static const unsigned char buf_l[] = {
1873 0x98, 0x23, 0x10, 0x00,
1875 if (num < 0x8000 && num >= 0)
1882 add_insns ((
unsigned char *) &n,
sizeof n);
1892 unsigned int n = fn;
1893 static const unsigned char buf[] = {
1894 0x58, 0x10, 0x10, 0x00,
1895 0xa7, 0xfa, 0xff, 0xa0,
1897 0xa7, 0xfa, 0x00, 0x60,
1900 add_insns ((
unsigned char *) &n,
sizeof n);
1909 unsigned char bufpre[] = {
1911 0xa7, 0x38, reg >> 8, reg,
1922 static const unsigned char buf[] = {
1923 0x98, 0x23, 0xf0, 0x00,
1924 0x41, 0xf0, 0xf0, 0x08,
1934 static const unsigned char buf[] = {
1935 0xa7, 0xfa, 0xff, 0xf8,
1936 0x90, 0x23, 0xf0, 0x00,
1946 unsigned char buf[] = {
1947 0x8d, 0x20, 0x00, 64 - arg,
1948 0x8c, 0x20, 0x00, 64 - arg,
1958 static const unsigned char buf[] = {
1959 0x98, 0x45, 0xf0, 0x00,
1960 0x90, 0x23, 0xf0, 0x00,
1972 unsigned char buf[] = {
1973 0xa7, 0xfa, n * 8 >> 8, n * 8,
1983 unsigned char buf_s[] = {
1984 0xa7, 0x28, arg1 >> 8, arg1,
1986 static const unsigned char buf_l[] = {
1987 0x58, 0x20, 0x10, 0x00,
1989 if (arg1 < 0x8000 && arg1 >= -0x8000)
1996 add_insns ((
unsigned char *) &arg1,
sizeof arg1);
2017 static const unsigned char buf[] = {
2023 static const unsigned char buf2[] = {
2038 static const unsigned char buf[] = {
2039 0x57, 0x20, 0xf0, 0x00,
2040 0x57, 0x30, 0xf0, 0x04,
2042 0x98, 0x23, 0xf0, 0x08,
2043 0x41, 0xf0, 0xf0, 0x10,
2044 0xc0, 0x84, 0x00, 0x00, 0x00, 0x00,
2058 static const unsigned char buf[] = {
2059 0x57, 0x20, 0xf0, 0x00,
2060 0x57, 0x30, 0xf0, 0x04,
2062 0x98, 0x23, 0xf0, 0x08,
2063 0x41, 0xf0, 0xf0, 0x10,
2064 0xc0, 0x74, 0x00, 0x00, 0x00, 0x00,
2078 static const unsigned char buf[] = {
2079 0x59, 0x20, 0xf0, 0x00,
2080 0xa7, 0x24, 0x00, 0x0e,
2081 0xa7, 0x44, 0x00, 0x06,
2082 0x55, 0x30, 0xf0, 0x04,
2083 0xa7, 0x24, 0x00, 0x08,
2085 0x98, 0x23, 0xf0, 0x08,
2086 0x41, 0xf0, 0xf0, 0x10,
2087 0xa7, 0xf4, 0x00, 0x09,
2089 0x98, 0x23, 0xf0, 0x08,
2090 0x41, 0xf0, 0xf0, 0x10,
2091 0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,
2106 static const unsigned char buf[] = {
2107 0x59, 0x20, 0xf0, 0x00,
2108 0xa7, 0x24, 0x00, 0x0e,
2109 0xa7, 0x44, 0x00, 0x06,
2110 0x55, 0x30, 0xf0, 0x04,
2111 0xa7, 0xa4, 0x00, 0x08,
2113 0x98, 0x23, 0xf0, 0x08,
2114 0x41, 0xf0, 0xf0, 0x10,
2115 0xa7, 0xf4, 0x00, 0x09,
2117 0x98, 0x23, 0xf0, 0x08,
2118 0x41, 0xf0, 0xf0, 0x10,
2119 0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,
2134 static const unsigned char buf[] = {
2135 0x59, 0x20, 0xf0, 0x00,
2136 0xa7, 0x44, 0x00, 0x0e,
2137 0xa7, 0x24, 0x00, 0x06,
2138 0x55, 0x30, 0xf0, 0x04,
2139 0xa7, 0x44, 0x00, 0x08,
2141 0x98, 0x23, 0xf0, 0x08,
2142 0x41, 0xf0, 0xf0, 0x10,
2143 0xa7, 0xf4, 0x00, 0x09,
2145 0x98, 0x23, 0xf0, 0x08,
2146 0x41, 0xf0, 0xf0, 0x10,
2147 0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,
2162 static const unsigned char buf[] = {
2163 0x59, 0x20, 0xf0, 0x00,
2164 0xa7, 0x44, 0x00, 0x0e,
2165 0xa7, 0x24, 0x00, 0x06,
2166 0x55, 0x30, 0xf0, 0x04,
2167 0xa7, 0xc4, 0x00, 0x08,
2169 0x98, 0x23, 0xf0, 0x08,
2170 0x41, 0xf0, 0xf0, 0x10,
2171 0xa7, 0xf4, 0x00, 0x09,
2173 0x98, 0x23, 0xf0, 0x08,
2174 0x41, 0xf0, 0xf0, 0x10,
2175 0xc0, 0xf4, 0x00, 0x00, 0x00, 0x00,
2234 s390x_emit_prologue (
void)
2236 static const unsigned char buf[] = {
2237 0xeb, 0x9f, 0xf0, 0x48, 0x00, 0x24,
2238 0xb9, 0x04, 0x00, 0x92,
2239 0xb9, 0x04, 0x00, 0xa3,
2240 0xb9, 0x04, 0x00, 0xbf,
2248 s390x_emit_epilogue (
void)
2250 static const unsigned char buf[] = {
2251 0xe3, 0x20, 0xa0, 0x00, 0x00, 0x24,
2252 0xa7, 0x29, 0x00, 0x00,
2253 0xeb, 0x9f, 0xf0, 0x48, 0x00, 0x04,
2262 s390x_emit_add (
void)
2264 static const unsigned char buf[] = {
2265 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x0a,
2266 0x41, 0xf0, 0xf0, 0x08,
2274 s390x_emit_sub (
void)
2276 static const unsigned char buf[] = {
2277 0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,
2278 0xb9, 0x0b, 0x00, 0x32,
2279 0xb9, 0x04, 0x00, 0x23,
2280 0x41, 0xf0, 0xf0, 0x08,
2288 s390x_emit_mul (
void)
2296 s390x_emit_lsh (
void)
2298 static const unsigned char buf[] = {
2299 0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,
2300 0xeb, 0x23, 0x20, 0x00, 0x00, 0x0d,
2301 0x41, 0xf0, 0xf0, 0x08,
2309 s390x_emit_rsh_signed (
void)
2311 static const unsigned char buf[] = {
2312 0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,
2313 0xeb, 0x23, 0x20, 0x00, 0x00, 0x0a,
2314 0x41, 0xf0, 0xf0, 0x08,
2322 s390x_emit_rsh_unsigned (
void)
2324 static const unsigned char buf[] = {
2325 0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,
2326 0xeb, 0x23, 0x20, 0x00, 0x00, 0x0c,
2327 0x41, 0xf0, 0xf0, 0x08,
2335 s390x_emit_ext (
int arg)
2337 unsigned char buf[] = {
2338 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0d,
2339 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0a,
2347 s390x_emit_log_not (
void)
2349 static const unsigned char buf[] = {
2350 0xb9, 0x00, 0x00, 0x22,
2351 0xa7, 0x2b, 0xff, 0xff,
2352 0xeb, 0x22, 0x00, 0x3f, 0x00, 0x0c,
2360 s390x_emit_bit_and (
void)
2362 static const unsigned char buf[] = {
2363 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x80,
2364 0x41, 0xf0, 0xf0, 0x08,
2372 s390x_emit_bit_or (
void)
2374 static const unsigned char buf[] = {
2375 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x81,
2376 0x41, 0xf0, 0xf0, 0x08,
2384 s390x_emit_bit_xor (
void)
2386 static const unsigned char buf[] = {
2387 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x82,
2388 0x41, 0xf0, 0xf0, 0x08,
2396 s390x_emit_bit_not (
void)
2398 static const unsigned char buf[] = {
2399 0xa7, 0x39, 0xff, 0xff,
2400 0xb9, 0x82, 0x00, 0x23,
2408 s390x_emit_equal (
void)
2410 s390x_emit_bit_xor ();
2411 s390x_emit_log_not ();
2417 s390x_emit_less_signed (
void)
2419 static const unsigned char buf[] = {
2420 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,
2421 0xa7, 0x29, 0x00, 0x01,
2422 0xa7, 0x24, 0x00, 0x04,
2423 0xa7, 0x29, 0x00, 0x00,
2425 0x41, 0xf0, 0xf0, 0x08,
2433 s390x_emit_less_unsigned (
void)
2435 static const unsigned char buf[] = {
2436 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x21,
2437 0xa7, 0x29, 0x00, 0x01,
2438 0xa7, 0x24, 0x00, 0x04,
2439 0xa7, 0x29, 0x00, 0x00,
2441 0x41, 0xf0, 0xf0, 0x08,
2449 s390x_emit_ref (
int size)
2451 static const unsigned char buf1[] = {
2452 0xe3, 0x20, 0x20, 0x00, 0x00, 0x90,
2454 static const unsigned char buf2[] = {
2455 0xe3, 0x20, 0x20, 0x00, 0x00, 0x91
2457 static const unsigned char buf4[] = {
2458 0xe3, 0x20, 0x20, 0x00, 0x00, 0x16,
2460 static const unsigned char buf8[] = {
2461 0xe3, 0x20, 0x20, 0x00, 0x00, 0x04,
2485 s390x_emit_if_goto (
int *offset_p,
int *size_p)
2487 static const unsigned char buf[] = {
2488 0xb9, 0x02, 0x00, 0x22,
2489 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x04,
2490 0x41, 0xf0, 0xf0, 0x08,
2491 0xc0, 0x74, 0x00, 0x00, 0x00, 0x00,
2503 s390x_emit_const (
LONGEST num)
2505 unsigned long long n = num;
2506 unsigned char buf_s[] = {
2507 0xa7, 0x29, num >> 8, num,
2509 static const unsigned char buf_l[] = {
2510 0xe3, 0x20, 0x10, 0x00, 0x00, 0x04,
2512 if (num < 0x8000 && num >= -0x8000)
2519 add_insns ((
unsigned char *) &n,
sizeof n);
2529 unsigned long n = fn;
2530 static const unsigned char buf[] = {
2531 0xe3, 0x10, 0x10, 0x00, 0x00, 0x04,
2532 0xa7, 0xfb, 0xff, 0x60,
2534 0xa7, 0xfb, 0x00, 0xa0,
2537 add_insns ((
unsigned char *) &n,
sizeof n);
2544 s390x_emit_reg (
int reg)
2546 unsigned char buf[] = {
2547 0xb9, 0x04, 0x00, 0x29,
2548 0xa7, 0x39, reg >> 8, reg,
2557 s390x_emit_pop (
void)
2559 static const unsigned char buf[] = {
2560 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x04,
2561 0x41, 0xf0, 0xf0, 0x08,
2569 s390x_emit_stack_flush (
void)
2571 static const unsigned char buf[] = {
2572 0xa7, 0xfb, 0xff, 0xf8,
2573 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x24,
2581 s390x_emit_zero_ext (
int arg)
2583 unsigned char buf[] = {
2584 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0d,
2585 0xeb, 0x22, 0x00, 64 - arg, 0x00, 0x0c,
2593 s390x_emit_swap (
void)
2595 static const unsigned char buf[] = {
2596 0xe3, 0x30, 0xf0, 0x00, 0x00, 0x04,
2597 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x24,
2598 0xb9, 0x04, 0x00, 0x23,
2606 s390x_emit_stack_adjust (
int n)
2608 unsigned char buf[] = {
2609 0xa7, 0xfb, n * 8 >> 8, n * 8,
2617 s390x_emit_int_call_1 (
CORE_ADDR fn,
int arg1)
2620 s390x_emit_const (arg1);
2621 s390x_emit_call (fn);
2627 s390x_emit_void_call_2 (
CORE_ADDR fn,
int arg1)
2630 static const unsigned char buf[] = {
2631 0xb9, 0x04, 0x00, 0x32,
2632 0xb9, 0x04, 0x00, 0xc2,
2634 static const unsigned char buf2[] = {
2635 0xb9, 0x04, 0x00, 0x2c,
2638 s390x_emit_const (arg1);
2639 s390x_emit_call (fn);
2646 s390x_emit_eq_goto (
int *offset_p,
int *size_p)
2648 static const unsigned char buf[] = {
2649 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,
2650 0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04,
2651 0x41, 0xf0, 0xf0, 0x10,
2652 0xc0, 0x84, 0x00, 0x00, 0x00, 0x00,
2664 s390x_emit_ne_goto (
int *offset_p,
int *size_p)
2666 static const unsigned char buf[] = {
2667 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,
2668 0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04,
2669 0x41, 0xf0, 0xf0, 0x10,
2670 0xc0, 0x74, 0x00, 0x00, 0x00, 0x00,
2682 s390x_emit_lt_goto (
int *offset_p,
int *size_p)
2684 static const unsigned char buf[] = {
2685 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,
2686 0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04,
2687 0x41, 0xf0, 0xf0, 0x10,
2688 0xc0, 0x24, 0x00, 0x00, 0x00, 0x00,
2700 s390x_emit_le_goto (
int *offset_p,
int *size_p)
2702 static const unsigned char buf[] = {
2703 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,
2704 0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04,
2705 0x41, 0xf0, 0xf0, 0x10,
2706 0xc0, 0xa4, 0x00, 0x00, 0x00, 0x00,
2718 s390x_emit_gt_goto (
int *offset_p,
int *size_p)
2720 static const unsigned char buf[] = {
2721 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,
2722 0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04,
2723 0x41, 0xf0, 0xf0, 0x10,
2724 0xc0, 0x44, 0x00, 0x00, 0x00, 0x00,
2736 s390x_emit_ge_goto (
int *offset_p,
int *size_p)
2738 static const unsigned char buf[] = {
2739 0xe3, 0x20, 0xf0, 0x00, 0x00, 0x20,
2740 0xe3, 0x20, 0xf0, 0x08, 0x00, 0x04,
2741 0x41, 0xf0, 0xf0, 0x10,
2742 0xc0, 0xc4, 0x00, 0x00, 0x00, 0x00,
2753 static struct emit_ops s390x_emit_ops =
2755 s390x_emit_prologue,
2756 s390x_emit_epilogue,
2761 s390x_emit_rsh_signed,
2762 s390x_emit_rsh_unsigned,
2770 s390x_emit_less_signed,
2771 s390x_emit_less_unsigned,
2780 s390x_emit_stack_flush,
2781 s390x_emit_zero_ext,
2783 s390x_emit_stack_adjust,
2784 s390x_emit_int_call_1,
2785 s390x_emit_void_call_2,
2804 return &s390x_emit_ops;
2866 init_registers_s390x_linux64 ();
2867 init_registers_s390x_linux64v1 ();
2868 init_registers_s390x_linux64v2 ();
2869 init_registers_s390x_te_linux64 ();
2870 init_registers_s390x_vx_linux64 ();
2871 init_registers_s390x_tevx_linux64 ();
2872 init_registers_s390x_gs_linux64 ();
void init_registers_s390_linux32(void)
const struct target_desc * tdesc
static void s390_emit_zero_ext(int arg)
static void s390_emit_rsh_unsigned(void)
struct thread_info * current_thread
static int s390_supports_hardware_single_step(void)
void collect_register(struct regcache *regcache, int n, void *buf)
static void s390_emit_swap(void)
const struct target_desc * tdesc_s390_linux64v1
static void s390_emit_int_call_1(CORE_ADDR fn, int arg1)
void init_registers_s390_tevx_linux64(void)
static void s390_store_system_call(struct regcache *regcache, const void *buf)
struct usrregs_info * usrregs
void init_registers_s390_te_linux64(void)
static struct regsets_info s390_regsets_info
struct regcache * new_register_cache(const struct target_desc *tdesc)
void supply_register_by_name(struct regcache *regcache, const char *name, const void *buf)
void init_registers_s390_linux64(void)
static void s390_store_gsbc(struct regcache *regcache, const void *buf)
static void s390_emit_ne_goto(int *offset_p, int *size_p)
static void s390_emit_stack_adjust(int n)
static const unsigned char s390_ft_main_31[]
static void s390_emit_stack_flush(void)
static void s390_emit_litpool(int size)
static void s390_fill_gprs_high(struct regcache *regcache, void *buf)
static const unsigned char s390_ft_entry_gpr_zarch[]
const struct target_desc * tdesc_s390_linux32
void init_registers_s390_gs_linux64(void)
static CORE_ADDR s390_get_pc(struct regcache *regcache)
static int s390_supports_tracepoints(void)
void * memset(T *s, int c, size_t n)=delete
static void s390_emit_sub(void)
static const unsigned char s390_ft_exit_misc[]
static int s390_check_regset(int pid, int regset, int regsize)
const struct target_desc * tdesc_s390_te_linux64
static const unsigned char s390_ft_exit_fr[]
static void s390_store_tdb(struct regcache *regcache, const void *buf)
char * paddress(CORE_ADDR addr)
static void s390_fill_vxrs_high(struct regcache *regcache, void *buf)
const struct regs_info *(* regs_info)(void)
static int s390_supports_z_point_type(char z_type)
static int s390_install_fast_tracepoint_jump_pad(CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err)
static void s390_fill_system_call(struct regcache *regcache, void *buf)
static int pid_of(const thread_info *thread)
struct target_ops * the_target
const struct target_desc * tdesc
static void s390_emit_epilogue(void)
static void s390_emit_bit_not(void)
static void s390_emit_add(void)
static void add_insns(const unsigned char *start, int len)
static void s390_write_goto_address(CORE_ADDR from, CORE_ADDR to, int size)
static const unsigned char s390_ft_exit_vr[]
static void s390_emit_bit_and(void)
void init_registers_s390_vx_linux64(void)
static struct regs_info regs_info_3264
void collect_register_by_name(struct regcache *regcache, const char *name, void *buf)
static void s390_arch_setup(void)
static const unsigned char s390_ft_entry_gpr_esa[]
void init_registers_s390_linux32v1(void)
static void s390_emit_ref(int size)
static void s390_store_gprs_high(struct regcache *regcache, const void *buf)
static void s390_emit_reg(int reg)
CORE_ADDR current_insn_ptr
static const unsigned char s390_ft_entry_vr[]
static void s390_emit_set_r2(int arg1)
int read_inferior_memory(CORE_ADDR memaddr, unsigned char *myaddr, int len)
void init_registers_s390_linux64v1(void)
static void s390_store_vxrs_high(struct regcache *regcache, const void *buf)
void initialize_low_arch(void)
const struct target_desc * tdesc_s390_vx_linux64
int register_size(const struct target_desc *tdesc, int n)
static void s390_emit_mul(void)
const struct target_desc * tdesc_s390_gs_linux64
static int have_hwcap_s390_high_gprs
static void s390_emit_call(CORE_ADDR fn)
static struct usrregs_info s390_usrregs_info_3264
struct linux_target_ops the_low_target
static int s390_cannot_fetch_register(int regno)
static void s390_emit_log_not(void)
struct process_info * current_process(void)
static void s390_emit_prologue(void)
static const unsigned char s390_ft_exit_gpr_zarch[]
static void s390_emit_less_signed(void)
static int s390_get_thread_area(int lwpid, CORE_ADDR *addrp)
static void s390_emit_bit_xor(void)
#define s390_num_regs_3264
static void s390_supply_ptrace_register(struct regcache *regcache, int regno, const char *buf)
static struct regs_info regs_info
static int s390_regmap_3264[]
static void s390_fill_gsbc(struct regcache *regcache, void *buf)
int write_inferior_memory(CORE_ADDR memaddr, const unsigned char *myaddr, int len)
static void s390_store_last_break(struct regcache *regcache, const void *buf)
static void s390_emit_lt_goto(int *offset_p, int *size_p)
static struct usrregs_info s390_usrregs_info
static void s390_set_pc(struct regcache *regcache, CORE_ADDR newpc)
static void append_insns(CORE_ADDR *to, size_t len, const unsigned char *buf)
static void s390_emit_pop(void)
static const unsigned char s390_ft_entry_misc[]
static void s390_emit_eq_goto(int *offset_p, int *size_p)
const struct target_desc * tdesc_s390_linux32v1
static void s390_emit_ge_goto(int *offset_p, int *size_p)
static int s390_breakpoint_at(CORE_ADDR pc)
static int have_hwcap_s390_vx
int find_regno(const struct target_desc *tdesc, const char *name)
static const unsigned char s390_ft_entry_fr[]
static void s390_emit_gt_goto(int *offset_p, int *size_p)
static void s390_emit_le_goto(int *offset_p, int *size_p)
#define fetch_inferior_registers(regcache, regno)
CORE_ADDR get_raw_reg_func_addr(void)
int(* read_auxv)(CORE_ADDR offset, unsigned char *myaddr, unsigned int len)
static void s390_emit_lsh(void)
static void s390_store_vxrs_low(struct regcache *regcache, const void *buf)
static void s390_emit_rsh_signed(void)
const struct target_desc * tdesc_s390_tevx_linux64
static struct regset_info s390_regsets[]
const struct target_desc * tdesc_s390_linux32v2
static void s390_emit_if_goto(int *offset_p, int *size_p)
struct regcache * get_thread_regcache(struct thread_info *thread, int fetch)
static void s390_emit_equal(void)
static void s390_fill_vxrs_low(struct regcache *regcache, void *buf)
static struct emit_ops * s390_emit_ops(void)
void free_register_cache(struct regcache *regcache)
static void s390_fill_gs(struct regcache *regcache, void *buf)
static int s390_get_ipa_tdesc_idx(void)
unsigned long long ULONGEST
static const unsigned char s390_ft_exit_gpr_esa[]
static void s390_fill_gregset(struct regcache *regcache, void *buf)
static void s390_emit_bit_or(void)
#define HWCAP_S390_HIGH_GPRS
static int s390_get_min_fast_tracepoint_insn_len(void)
static struct emit_ops s390_emit_ops_impl
static const unsigned char s390_ft_main_64[]
static void s390_emit_less_unsigned(void)
static const struct regs_info * s390_regs_info(void)
static void s390_emit_ext(int arg)
static int s390_relocate_instruction(CORE_ADDR *to, CORE_ADDR oldloc, int is_64)
const struct target_desc * tdesc_s390_linux64
#define s390_breakpoint_len
static unsigned long s390_get_hwcap(const struct target_desc *tdesc)
void debug_printf(const char *fmt,...)
static void s390_emit_goto(int *offset_p, int *size_p)
static void s390_store_gs(struct regcache *regcache, const void *buf)
void supply_register(struct regcache *regcache, int n, const void *buf)
static void s390_emit_void_call_2(CORE_ADDR fn, int arg1)
void init_registers_s390_linux64v2(void)
static struct regsets_info s390_regsets_info_3264
void init_registers_s390_linux32v2(void)
static void s390_collect_ptrace_register(struct regcache *regcache, int regno, char *buf)
static const gdb_byte s390_breakpoint[]
static const gdb_byte * s390_sw_breakpoint_from_kind(int kind, int *size)
static void s390_emit_const(LONGEST num)
static int s390_cannot_store_register(int regno)
const struct target_desc * tdesc_s390_linux64v2