/* GNU/Linux/PowerPC specific low level interface, for the remote server for
GDB.
- Copyright (C) 1995-2020 Free Software Foundation, Inc.
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
This file is part of GDB.
struct emit_ops *emit_ops () override;
+ int get_ipa_tdesc_idx () override;
+
protected:
void low_arch_setup () override;
else if (__BYTE_ORDER == __BIG_ENDIAN)
{
/* Big-endian values sit at the right end of the buffer. In case of
- registers whose sizes are smaller than sizeof (long), we must use a
- padding to access them correctly. */
+ registers whose sizes are smaller than sizeof (long), we must use a
+ padding to access them correctly. */
int size = register_size (regcache->tdesc, regno);
if (size < sizeof (long))
else if (__BYTE_ORDER == __BIG_ENDIAN)
{
/* Big-endian values sit at the right end of the buffer. In case of
- registers whose sizes are smaller than sizeof (long), we must use a
- padding to access them correctly. */
+ registers whose sizes are smaller than sizeof (long), we must use a
+ padding to access them correctly. */
int size = register_size (regcache->tdesc, regno);
if (size < sizeof (long))
ori reg, reg, <imm[15:0]> */
p += GEN_LIS (p, reg, ((imm >> 48) & 0xffff));
if (((imm >> 32) & 0xffff) != 0)
- p += GEN_ORI (p, reg, reg, ((imm >> 32) & 0xffff));
+ p += GEN_ORI (p, reg, reg, ((imm >> 32) & 0xffff));
p += GEN_RLDICR (p, reg, reg, 32, 31);
if (((imm >> 16) & 0xffff) != 0)
- p += GEN_ORIS (p, reg, reg, ((imm >> 16) & 0xffff));
+ p += GEN_ORIS (p, reg, reg, ((imm >> 16) & 0xffff));
if ((imm & 0xffff) != 0)
- p += GEN_ORI (p, reg, reg, (imm & 0xffff));
+ p += GEN_ORI (p, reg, reg, (imm & 0xffff));
}
return p - buf;
| Expand stack as needed.
|
+-
- | Some padding for minimum stack frame and 16-byte alignment.
- | 16 bytes.
+ | Some padding for minimum stack frame and 16-byte alignment.
+ | 16 bytes.
SP +- Back-chain (SP')
initial frame size
| Expand stack as needed.
|
+-
- | Some padding for minimum stack frame.
- | 112 for ELFv1.
+ | Some padding for minimum stack frame.
+ | 112 for ELFv1.
SP +- Back-chain (SP')
initial frame size
/* Restore registers. */
"ld 31, -8(1) \n"
"ld 30, -16(1) \n"
- /* Restore LR. */
+ /* Restore LR. */
"ld 0, 16(1) \n"
/* Return 0 for no-error. */
"li 3, 0 \n"
if (register_size (regcache->tdesc, 0) == 8)
{
if (is_elfv2_inferior ())
- return &ppc64v2_emit_ops_impl;
+ return &ppc64v2_emit_ops_impl;
else
- return &ppc64v1_emit_ops_impl;
+ return &ppc64v1_emit_ops_impl;
}
#endif
return &ppc_emit_ops_impl;
}
-/* Implementation of linux_target_ops method "get_ipa_tdesc_idx". */
+/* Implementation of target ops method "get_ipa_tdesc_idx". */
-static int
-ppc_get_ipa_tdesc_idx (void)
+int
+ppc_target::get_ipa_tdesc_idx ()
{
struct regcache *regcache = get_thread_regcache (current_thread, 0);
const struct target_desc *tdesc = regcache->tdesc;
return 0;
}
-struct linux_target_ops the_low_target = {
- NULL, /* get_syscall_trapinfo */
- ppc_get_ipa_tdesc_idx,
-};
-
/* The linux target ops object. */
linux_process_target *the_linux_target = &the_ppc_target;