aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/linux-s390-ipa.c
diff options
context:
space:
mode:
authorMarcin Koƛcielnicki <koriakin@0x04.net>2016-01-17 22:59:06 +0100
committerMarcin Koƛcielnicki <koriakin@0x04.net>2016-03-29 23:39:00 +0200
commitabd9baf9c61a76537766c81e235a4a5a49b7dee3 (patch)
treead83925c1a5aff7617b7bfcbd9036db40be34c0e /gdb/gdbserver/linux-s390-ipa.c
parenta4105d04e19efdf89d0fa56b62675d7d7ee82a9b (diff)
downloadgdb-abd9baf9c61a76537766c81e235a4a5a49b7dee3.zip
gdb-abd9baf9c61a76537766c81e235a4a5a49b7dee3.tar.gz
gdb-abd9baf9c61a76537766c81e235a4a5a49b7dee3.tar.bz2
gdbserver/s390: Add fast tracepoint support.
Fast tracepoints will only work on 6-byte intructions, and assume at least a z900 CPU. s390 also has 4-byte jump instructions, which also work on pre-z900, but their range is limitted to +-64kiB, which is not very useful (and wouldn't work at all with current jump pad allocation). There's a little problem with s390_relocate_instruction function: it converts BRAS/BRASL instructions to LARL of the return address + JG to the target address. On 31-bit, this sets the high bit of the target register to 0, while BRAS/BRASL would set it to 1. While this is not a problem when the result is only used to address memory, it could possibly break something that expects to compare such addresses for equality without first masking the bit off. In particular, I'm not sure whether leaving the return address high bit unset is ABI-compliant (could confuse some unwinder?). If that's a problem, it could be fixed by handling it in the jump pad (since at that point we can just modify the GPRs in the save area without having to worry about preserving CCs and only having that one GPR to work with - I'm not sure if it's even possible to set the high bit with such constraints). gdb/gdbserver/ChangeLog: PR 18377 * Makefile.in: Add s390 IPA files. * configure.srv: Build IPA for s390. * linux-s390-ipa.c: New file. * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h. (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h. (tdesc_s390_linux32): Likewise. (init_registers_s390_linux32v1): Likewise. (tdesc_s390_linux32v1): Likewise. (init_registers_s390_linux32v2): Likewise. (tdesc_s390_linux32v2): Likewise. (init_registers_s390_linux64): Likewise. (tdesc_s390_linux64): Likewise. (init_registers_s390_linux64v1): Likewise. (tdesc_s390_linux64v1): Likewise. (init_registers_s390_linux64v2): Likewise. (tdesc_s390_linux64v2): Likewise. (init_registers_s390_te_linux64): Likewise. (tdesc_s390_te_linux64): Likewise. (init_registers_s390_vx_linux64): Likewise. (tdesc_s390_vx_linux64): Likewise. (init_registers_s390_tevx_linux64): Likewise. (tdesc_s390_tevx_linux64): Likewise. (init_registers_s390x_linux64): Likewise. (tdesc_s390x_linux64): Likewise. (init_registers_s390x_linux64v1): Likewise. (tdesc_s390x_linux64v1): Likewise. (init_registers_s390x_linux64v2): Likewise. (tdesc_s390x_linux64v2): Likewise. (init_registers_s390x_te_linux64): Likewise. (tdesc_s390x_te_linux64): Likewise. (init_registers_s390x_vx_linux64): Likewise. (tdesc_s390x_vx_linux64): Likewise. (init_registers_s390x_tevx_linux64): Likewise. (tdesc_s390x_tevx_linux64): Likewise. (have_hwcap_s390_vx): New static variable. (s390_arch_setup): Fill have_hwcap_s390_vx. (s390_get_thread_area): New function. (s390_ft_entry_gpr_esa): New const. (s390_ft_entry_gpr_zarch): New const. (s390_ft_entry_misc): New const. (s390_ft_entry_fr): New const. (s390_ft_entry_vr): New const. (s390_ft_main_31): New const. (s390_ft_main_64): New const. (s390_ft_exit_fr): New const. (s390_ft_exit_vr): New const. (s390_ft_exit_misc): New const. (s390_ft_exit_gpr_esa): New const. (s390_ft_exit_gpr_zarch): New const. (append_insns): New function. (s390_relocate_instruction): New function. (s390_install_fast_tracepoint_jump_pad): New function. (s390_get_min_fast_tracepoint_insn_len): New function. (s390_get_ipa_tdesc_idx): New function. (struct linux_target_ops): Wire in the above functions. (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs. * linux-s390-tdesc.h: New file.
Diffstat (limited to 'gdb/gdbserver/linux-s390-ipa.c')
-rw-r--r--gdb/gdbserver/linux-s390-ipa.c394
1 files changed, 394 insertions, 0 deletions
diff --git a/gdb/gdbserver/linux-s390-ipa.c b/gdb/gdbserver/linux-s390-ipa.c
new file mode 100644
index 0000000..d804188
--- /dev/null
+++ b/gdb/gdbserver/linux-s390-ipa.c
@@ -0,0 +1,394 @@
+/* GNU/Linux S/390 specific low level interface, for the in-process
+ agent library for GDB.
+
+ Copyright (C) 2016 Free Software Foundation, Inc.
+
+ This file is part of GDB.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "server.h"
+#include "tracepoint.h"
+#include "linux-s390-tdesc.h"
+
+#define FT_FPR(x) (0x000 + (x) * 0x10)
+#define FT_VR(x) (0x000 + (x) * 0x10)
+#define FT_VR_L(x) (0x008 + (x) * 0x10)
+#define FT_GPR(x) (0x200 + (x) * 8)
+#define FT_GPR_U(x) (0x200 + (x) * 8)
+#define FT_GPR_L(x) (0x204 + (x) * 8)
+#define FT_GPR(x) (0x200 + (x) * 8)
+#define FT_ACR(x) (0x280 + (x) * 4)
+#define FT_PSWM 0x2c0
+#define FT_PSWM_U 0x2c0
+#define FT_PSWA 0x2c8
+#define FT_PSWA_L 0x2cc
+#define FT_FPC 0x2d0
+
+/* Mappings between registers collected by the jump pad and GDB's register
+ array layout used by regcache.
+
+ See linux-s390-low.c (s390_install_fast_tracepoint_jump_pad) for more
+ details. */
+
+#ifndef __s390x__
+
+/* Used for s390-linux32, s390-linux32v1, s390-linux32v2. */
+
+static const int s390_linux32_ft_collect_regmap[] = {
+ /* 32-bit PSWA and PSWM. */
+ FT_PSWM_U, FT_PSWA_L,
+ /* 32-bit GPRs (mapped to lower halves of 64-bit slots). */
+ FT_GPR_L (0), FT_GPR_L (1), FT_GPR_L (2), FT_GPR_L (3),
+ FT_GPR_L (4), FT_GPR_L (5), FT_GPR_L (6), FT_GPR_L (7),
+ FT_GPR_L (8), FT_GPR_L (9), FT_GPR_L (10), FT_GPR_L (11),
+ FT_GPR_L (12), FT_GPR_L (13), FT_GPR_L (14), FT_GPR_L (15),
+ /* ACRs */
+ FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+ FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+ FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+ FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+ /* FPRs (mapped to upper halves of 128-bit VR slots). */
+ FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+ FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+ FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+ FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+ /* orig_r2, last_break, system_call */
+ -1, -1, -1,
+};
+
+/* Used for s390-linux64, s390-linux64v1, s390-linux64v2, s390-vx-linux64. */
+
+static const int s390_linux64_ft_collect_regmap[] = {
+ /* 32-bit PSWA and PSWM. */
+ FT_PSWM_U, FT_PSWA_L,
+ /* 32-bit halves of 64-bit GPRs. */
+ FT_GPR_U (0), FT_GPR_L (0),
+ FT_GPR_U (1), FT_GPR_L (1),
+ FT_GPR_U (2), FT_GPR_L (2),
+ FT_GPR_U (3), FT_GPR_L (3),
+ FT_GPR_U (4), FT_GPR_L (4),
+ FT_GPR_U (5), FT_GPR_L (5),
+ FT_GPR_U (6), FT_GPR_L (6),
+ FT_GPR_U (7), FT_GPR_L (7),
+ FT_GPR_U (8), FT_GPR_L (8),
+ FT_GPR_U (9), FT_GPR_L (9),
+ FT_GPR_U (10), FT_GPR_L (10),
+ FT_GPR_U (11), FT_GPR_L (11),
+ FT_GPR_U (12), FT_GPR_L (12),
+ FT_GPR_U (13), FT_GPR_L (13),
+ FT_GPR_U (14), FT_GPR_L (14),
+ FT_GPR_U (15), FT_GPR_L (15),
+ /* ACRs */
+ FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+ FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+ FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+ FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+ /* FPRs (mapped to upper halves of 128-bit VR slots). */
+ FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+ FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+ FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+ FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+ /* orig_r2, last_break, system_call */
+ -1, -1, -1,
+ /* Lower halves of 128-bit VRs. */
+ FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+ FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+ FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+ FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+ /* And the next 16 VRs. */
+ FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+ FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+ FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+ FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+/* Used for s390-te-linux64, s390-tevx-linux64. */
+
+static const int s390_te_linux64_ft_collect_regmap[] = {
+ /* 32-bit PSWA and PSWM. */
+ FT_PSWM_U, FT_PSWA_L,
+ /* 32-bit halves of 64-bit GPRs. */
+ FT_GPR_U (0), FT_GPR_L (0),
+ FT_GPR_U (1), FT_GPR_L (1),
+ FT_GPR_U (2), FT_GPR_L (2),
+ FT_GPR_U (3), FT_GPR_L (3),
+ FT_GPR_U (4), FT_GPR_L (4),
+ FT_GPR_U (5), FT_GPR_L (5),
+ FT_GPR_U (6), FT_GPR_L (6),
+ FT_GPR_U (7), FT_GPR_L (7),
+ FT_GPR_U (8), FT_GPR_L (8),
+ FT_GPR_U (9), FT_GPR_L (9),
+ FT_GPR_U (10), FT_GPR_L (10),
+ FT_GPR_U (11), FT_GPR_L (11),
+ FT_GPR_U (12), FT_GPR_L (12),
+ FT_GPR_U (13), FT_GPR_L (13),
+ FT_GPR_U (14), FT_GPR_L (14),
+ FT_GPR_U (15), FT_GPR_L (15),
+ /* ACRs */
+ FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+ FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+ FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+ FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+ /* FPRs (mapped to upper halves of 128-bit VR slots). */
+ FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+ FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+ FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+ FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+ /* orig_r2, last_break, system_call */
+ -1, -1, -1,
+ /* TDB */
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /* Lower halves of 128-bit VRs. */
+ FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+ FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+ FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+ FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+ /* And the next 16 VRs. */
+ FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+ FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+ FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+ FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+#else /* __s390x__ */
+
+/* Used for s390x-linux64, s390x-linux64v1, s390x-linux64v2, s390x-vx-linux64. */
+
+static const int s390x_ft_collect_regmap[] = {
+ /* 64-bit PSWA and PSWM. */
+ FT_PSWM, FT_PSWA,
+ /* 64-bit GPRs. */
+ FT_GPR (0), FT_GPR (1), FT_GPR (2), FT_GPR (3),
+ FT_GPR (4), FT_GPR (5), FT_GPR (6), FT_GPR (7),
+ FT_GPR (8), FT_GPR (9), FT_GPR (10), FT_GPR (11),
+ FT_GPR (12), FT_GPR (13), FT_GPR (14), FT_GPR (15),
+ /* ACRs */
+ FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+ FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+ FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+ FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+ /* FPRs (mapped to upper halves of 128-bit VR slots). */
+ FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+ FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+ FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+ FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+ /* orig_r2, last_break, system_call */
+ -1, -1, -1,
+ /* Lower halves of 128-bit VRs. */
+ FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+ FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+ FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+ FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+ /* And the next 16 VRs. */
+ FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+ FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+ FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+ FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+/* Used for s390x-te-linux64, s390x-tevx-linux64. */
+
+static const int s390x_te_ft_collect_regmap[] = {
+ /* 64-bit PSWA and PSWM. */
+ FT_PSWM, FT_PSWA,
+ /* 64-bit GPRs. */
+ FT_GPR (0), FT_GPR (1), FT_GPR (2), FT_GPR (3),
+ FT_GPR (4), FT_GPR (5), FT_GPR (6), FT_GPR (7),
+ FT_GPR (8), FT_GPR (9), FT_GPR (10), FT_GPR (11),
+ FT_GPR (12), FT_GPR (13), FT_GPR (14), FT_GPR (15),
+ /* ACRs */
+ FT_ACR (0), FT_ACR (1), FT_ACR (2), FT_ACR (3),
+ FT_ACR (4), FT_ACR (5), FT_ACR (6), FT_ACR (7),
+ FT_ACR (8), FT_ACR (9), FT_ACR (10), FT_ACR (11),
+ FT_ACR (12), FT_ACR (13), FT_ACR (14), FT_ACR (15),
+ /* FPRs (mapped to upper halves of 128-bit VR slots). */
+ FT_FPR (0), FT_FPR (1), FT_FPR (2), FT_FPR (3),
+ FT_FPR (4), FT_FPR (5), FT_FPR (6), FT_FPR (7),
+ FT_FPR (8), FT_FPR (9), FT_FPR (10), FT_FPR (11),
+ FT_FPR (12), FT_FPR (13), FT_FPR (14), FT_FPR (15),
+ /* orig_r2, last_break, system_call */
+ -1, -1, -1,
+ /* TDB */
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ -1, -1, -1, -1,
+ /* Lower halves of 128-bit VRs. */
+ FT_VR_L (0), FT_VR_L (1), FT_VR_L (2), FT_VR_L (3),
+ FT_VR_L (4), FT_VR_L (5), FT_VR_L (6), FT_VR_L (7),
+ FT_VR_L (8), FT_VR_L (9), FT_VR_L (10), FT_VR_L (11),
+ FT_VR_L (12), FT_VR_L (13), FT_VR_L (14), FT_VR_L (15),
+ /* And the next 16 VRs. */
+ FT_VR (16), FT_VR (17), FT_VR (18), FT_VR (19),
+ FT_VR (20), FT_VR (21), FT_VR (22), FT_VR (23),
+ FT_VR (24), FT_VR (25), FT_VR (26), FT_VR (27),
+ FT_VR (28), FT_VR (29), FT_VR (30), FT_VR (31),
+};
+
+#endif
+
+/* Initialized by get_ipa_tdesc according to the tdesc in use. */
+
+static const int *s390_regmap;
+static int s390_regnum;
+
+/* Fill in REGCACHE with registers saved by the jump pad in BUF. */
+
+void
+supply_fast_tracepoint_registers (struct regcache *regcache,
+ const unsigned char *buf)
+{
+ int i;
+ for (i = 0; i < s390_regnum; i++)
+ if (s390_regmap[i] != -1)
+ supply_register (regcache, i, ((char *) buf) + s390_regmap[i]);
+}
+
+IP_AGENT_EXPORT_FUNC ULONGEST
+gdb_agent_get_raw_reg (const unsigned char *raw_regs, int regnum)
+{
+ int offset;
+ if (regnum >= s390_regnum)
+ return 0;
+ offset = s390_regmap[regnum];
+ if (offset == -1)
+ return 0;
+
+ /* The regnums are variable, better to figure out size by FT offset. */
+
+ /* 64-bit ones. */
+ if (offset < FT_VR(16)
+#ifdef __s390x__
+ || (offset >= FT_GPR(0) && offset < FT_ACR(0))
+ || offset == FT_PSWM
+ || offset == FT_PSWA
+#endif
+ )
+ return *(uint64_t *) (raw_regs + offset);
+
+ if (offset >= FT_ACR(0 && offset < FT_PSWM)
+ || offset == FT_FPC
+#ifndef __s390x__
+ || (offset >= FT_GPR(0) && offset < FT_ACR(0))
+ || offset == FT_PSWM_U
+ || offset == FT_PSWA_L
+#endif
+ )
+ return *(uint32_t *) (raw_regs + offset);
+
+ /* This leaves 128-bit VX. No way to return them. */
+ return 0;
+}
+
+/* Return target_desc to use for IPA, given the tdesc index passed by
+ gdbserver. For s390, it also sets s390_regmap and s390_regnum. */
+
+const struct target_desc *
+get_ipa_tdesc (int idx)
+{
+#define SET_REGMAP(regmap, skip_last) \
+ do { \
+ s390_regmap = regmap; \
+ s390_regnum = (sizeof regmap / sizeof regmap[0]) - skip_last; \
+ } while(0)
+ switch (idx)
+ {
+#ifdef __s390x__
+ case S390_TDESC_64:
+ /* Subtract number of VX regs. */
+ SET_REGMAP(s390x_ft_collect_regmap, 32);
+ return tdesc_s390x_linux64;
+ case S390_TDESC_64V1:
+ SET_REGMAP(s390x_ft_collect_regmap, 32);
+ return tdesc_s390x_linux64v1;
+ case S390_TDESC_64V2:
+ SET_REGMAP(s390x_ft_collect_regmap, 32);
+ return tdesc_s390x_linux64v2;
+ case S390_TDESC_TE:
+ SET_REGMAP(s390x_te_ft_collect_regmap, 32);
+ return tdesc_s390x_te_linux64;
+ case S390_TDESC_VX:
+ SET_REGMAP(s390x_ft_collect_regmap, 0);
+ return tdesc_s390x_vx_linux64;
+ case S390_TDESC_TEVX:
+ SET_REGMAP(s390x_te_ft_collect_regmap, 0);
+ return tdesc_s390x_tevx_linux64;
+#else
+ case S390_TDESC_32:
+ SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
+ return tdesc_s390_linux32;
+ case S390_TDESC_32V1:
+ SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
+ return tdesc_s390_linux32v1;
+ case S390_TDESC_32V2:
+ SET_REGMAP(s390_linux32_ft_collect_regmap, 0);
+ return tdesc_s390_linux32v2;
+ case S390_TDESC_64:
+ SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
+ return tdesc_s390_linux64;
+ case S390_TDESC_64V1:
+ SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
+ return tdesc_s390_linux64v1;
+ case S390_TDESC_64V2:
+ SET_REGMAP(s390_linux64_ft_collect_regmap, 32);
+ return tdesc_s390_linux64v2;
+ case S390_TDESC_TE:
+ SET_REGMAP(s390_te_linux64_ft_collect_regmap, 32);
+ return tdesc_s390_te_linux64;
+ case S390_TDESC_VX:
+ SET_REGMAP(s390_linux64_ft_collect_regmap, 0);
+ return tdesc_s390_vx_linux64;
+ case S390_TDESC_TEVX:
+ SET_REGMAP(s390_te_linux64_ft_collect_regmap, 0);
+ return tdesc_s390_tevx_linux64;
+#endif
+ default:
+ internal_error (__FILE__, __LINE__,
+ "unknown ipa tdesc index: %d", idx);
+#ifdef __s390x__
+ return tdesc_s390x_linux64;
+#else
+ return tdesc_s390_linux32;
+#endif
+ }
+}
+
+void
+initialize_low_tracepoint (void)
+{
+#ifdef __s390x__
+ init_registers_s390x_linux64 ();
+ init_registers_s390x_linux64v1 ();
+ init_registers_s390x_linux64v2 ();
+ init_registers_s390x_te_linux64 ();
+ init_registers_s390x_vx_linux64 ();
+ init_registers_s390x_tevx_linux64 ();
+#else
+ init_registers_s390_linux32 ();
+ init_registers_s390_linux32v1 ();
+ init_registers_s390_linux32v2 ();
+ init_registers_s390_linux64 ();
+ init_registers_s390_linux64v1 ();
+ init_registers_s390_linux64v2 ();
+ init_registers_s390_te_linux64 ();
+ init_registers_s390_vx_linux64 ();
+ init_registers_s390_tevx_linux64 ();
+#endif
+}