32#define insn_d(opcd, rts, ra, d) \
33 ((((unsigned (opcd)) & 0x3f) << 26) \
34 | (((unsigned (rts)) & 0x1f) << 21) \
35 | (((unsigned (ra)) & 0x1f) << 16) \
36 | ((unsigned (d)) & 0xffff))
38#define insn_ds(opcd, rts, ra, d, xo) \
39 ((((unsigned (opcd)) & 0x3f) << 26) \
40 | (((unsigned (rts)) & 0x1f) << 21) \
41 | (((unsigned (ra)) & 0x1f) << 16) \
42 | ((unsigned (d)) & 0xfffc) \
43 | ((unsigned (xo)) & 0x3))
45#define insn_xfx(opcd, rts, spr, xo) \
46 ((((unsigned (opcd)) & 0x3f) << 26) \
47 | (((unsigned (rts)) & 0x1f) << 21) \
48 | (((unsigned (spr)) & 0x1f) << 16) \
49 | (((unsigned (spr)) & 0x3e0) << 6) \
50 | (((unsigned (xo)) & 0x3ff) << 1))
52#define prefix(a, b, R, do) \
54 | (((unsigned (a)) & 0x3) << 24) \
55 | (((unsigned (b)) & 0x1) << 23) \
56 | (((unsigned (R)) & 0x1) << 20) \
57 | ((unsigned (do)) & 0x3ffff))
59#define insn_md(opcd, ra, rs, sh, me, rc) \
60 ((((unsigned (opcd)) & 0x3f) << 26) \
61 | (((unsigned (rs)) & 0x1f) << 21) \
62 | (((unsigned (ra)) & 0x1f) << 16) \
63 | (((unsigned (sh)) & 0x3e) << 11) \
64 | (((unsigned (me)) & 0x3f) << 25) \
65 | (((unsigned (sh)) & 0x1) << 1) \
66 | ((unsigned (rc)) & 0x1))
68#define insn_x(opcd, rt, ra, rb, opc2) \
69 ((((unsigned (opcd)) & 0x3f) << 26) \
70 | (((unsigned (rt)) & 0x1f) << 21) \
71 | (((unsigned (ra)) & 0x1f) << 16) \
72 | (((unsigned (rb)) & 0x3e) << 11) \
73 | (((unsigned (opc2)) & 0x3FF) << 1))
75#define insn_xo(opcd, rt, ra, rb, oe, rc, opc2) \
76 ((((unsigned (opcd)) & 0x3f) << 26) \
77 | (((unsigned (rt)) & 0x1f) << 21) \
78 | (((unsigned (ra)) & 0x1f) << 16) \
79 | (((unsigned (rb)) & 0x3e) << 11) \
80 | (((unsigned (oe)) & 0x1) << 10) \
81 | (((unsigned (opc2)) & 0x1FF) << 1) \
82 | (((unsigned (rc)))))
133 { (unsigned) -1,
insn_ds (62, 2, 1, 40, 0), 0 },
136 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 12, 0, 0), 0 },
142 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 2, 12, 0, 0), 0 },
151 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 12, 0, 0), 1 },
154 { (unsigned) -1, 0x4e800420, 0 },
169 { (unsigned) -1,
insn_ds (62, 2, 1, 40, 0), 1 },
175 { (unsigned) -1,
insn_ds (62, 2, 1, 40, 0), 1 },
178 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 12, 0, 0), 0 },
187 { (unsigned) -1, 0x7d6b5a78, 1 },
190 { (unsigned) -1, 0x7d8c5a14, 1 },
193 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 2, 12, 0, 0), 0 },
196 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 12, 0, 0), 1 },
199 { (unsigned) -1, 0x4e800420, 1 },
202 { (unsigned) -1, 0x28220000, 1 },
212 { (unsigned) -1,
insn_ds (62, 2, 1, 40, 0), 1 },
215 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 2, 0, 0), 0 },
224 { (unsigned) -1, 0x7d6b5a78, 1 },
227 { (unsigned) -1, 0x7c425a14, 1 },
230 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 2, 0, 0), 1 },
233 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 2, 2, 0, 0), 0 },
236 { (unsigned) -1, 0x4e800420, 1 },
239 { (unsigned) -1, 0x28220000, 1 },
251 { (unsigned) -1,
insn_ds (62, 2, 1, 40, 0), 1 },
257 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 12, 11, 0, 0), 0 },
266 { (unsigned) -1, 0x7d826278, 1 },
269 { (unsigned) -1, 0x7d6b1214, 1 },
272 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 2, 11, 0, 0), 0 },
275 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 11, 0, 0), 1 },
278 { (unsigned) -1, 0x4e800420, 1 },
281 { (unsigned) -1, 0x28220000, 1 },
293 { (unsigned) -1,
insn_ds (62, 2, 1, 40, 0), 1 },
296 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 12, 2, 0, 0), 0 },
305 { (unsigned) -1, 0x7d8b6278, 1 },
308 { (unsigned) -1, 0x7c425a14, 1 },
311 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 11, 2, 0, 0), 1 },
314 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 2, 2, 0, 0), 0 },
317 { (unsigned) -1, 0x4e800420, 1 },
320 { (unsigned) -1, 0x28220000, 1 },
330 { (unsigned) -1,
insn_ds (62, 2, 1, 24, 0), 1 },
336 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 12, 11, 0, 0), 0 },
342 { (unsigned) -1, 0x4e800420, 0 },
352 { (unsigned) -1,
insn_ds (62, 2, 1, 24, 0), 1 },
355 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 12, 2, 0, 0), 0 },
361 { (unsigned) -1, 0x4e800420, 0 },
372 { (unsigned) -1,
insn_ds (62, 2, 1, 24, 0), 1 },
378 {
insn_ds (-1, -1, -1, 0, -1),
insn_ds (58, 12, 12, 0, 0), 0 },
384 { (unsigned) -1, 0x4e800420, 0 },
393 {
insn_ds (-1, -1, -1, 0, 1),
insn_ds (62, 2, 1, 40, 0), 1 },
403 { (unsigned) -1, 0x4e800420, 0 },
411 {
insn_ds (-1, -1, -1, 0, 1),
insn_ds (62, 2, 1, 40, 0), 1 },
421 { (unsigned) -1, 0x4e800420, 0 },
429 {
insn_ds (-1, -1, -1, 0, 1),
insn_ds (62, 2, 1, 40, 0), 1 },
435 {
insn_md (-1, -1, -1, 0, 0, 1),
insn_md (30, 11, 11, 34, 63-34, 0), 1 },
442 { (unsigned) -1,
insn_x (31, 12, 11, 12, 21), 1 },
445 { (unsigned) -1,
insn_xo (31, 12, 11, 12, 0, 0, 40), 1 },
451 { (unsigned) -1, 0x4e800420, 0 },
459 {
insn_ds (-1, -1, -1, 0, 1),
insn_ds (62, 2, 1, 40, 0), 1 },
469 { (unsigned) -1,
insn_md (30, 11, 11, 34, 63-34, 0), 1 },
476 { (unsigned) -1,
insn_md (30, 11, 11, 34, 63-34, 0), 1 },
479 { (unsigned) -1,
insn_x (31, 12, 11, 12, 21), 1 },
482 { (unsigned) -1,
insn_xo (31, 12, 11, 12, 0, 0, 40), 1 },
488 { (unsigned) -1, 0x4e800420, 0 },
616#define MAX(a,b) ((a) > (b) ? (a) : (b))
638 scan_limit = ARRAY_SIZE (insns) - 1;
640 for (i = 0; i < scan_limit; i++)
668 && (insns[8] != 0 || insns[9] != 0))
673 && (insns[9] != 0 || insns[10] != 0))
678 && (insns[8] != 0 || insns[9] != 0))
683 && (insns[10] != 0 || insns[11] != 0))
700 return target ? target : pc;
798 if ((sym->flags & BSF_SYNTHETIC) != 0 && sym->udata.p != NULL)
800 elf_symbol_type *elf_sym = (elf_symbol_type *) sym->udata.p;
801 msym->
set_size (elf_sym->internal_elf_sym.st_size);
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
ULONGEST get_frame_register_unsigned(frame_info_ptr frame, int regnum)
struct gdbarch * get_frame_arch(frame_info_ptr this_frame)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
bool gdbarch_skip_entrypoint_p(struct gdbarch *gdbarch)
CORE_ADDR gdbarch_skip_entrypoint(struct gdbarch *gdbarch, CORE_ADDR ip)
enum exec_direction_kind execution_direction
CORE_ADDR find_solib_trampoline_target(frame_info_ptr frame, CORE_ADDR pc)
CORE_ADDR ppc_insn_d_field(unsigned int insn)
CORE_ADDR ppc_insn_prefix_dform(unsigned int insn1, unsigned int insn2)
int ppc_insns_match_pattern(frame_info_ptr frame, CORE_ADDR pc, const struct ppc_insn_pattern *pattern, unsigned int *insns)
CORE_ADDR ppc_insn_ds_field(unsigned int insn)
#define insn_d(opcd, rts, ra, d)
static const struct ppc_insn_pattern ppc64_standard_linkage11[]
CORE_ADDR ppc64_skip_trampoline_code(frame_info_ptr frame, CORE_ADDR pc)
static CORE_ADDR ppc64_standard_linkage2_target(frame_info_ptr frame, unsigned int *insn)
static const struct ppc_insn_pattern ppc64_standard_linkage3[]
static CORE_ADDR ppc64_pcrel_linkage1_target(frame_info_ptr frame, unsigned int *insn, CORE_ADDR pc)
void ppc64_elf_make_msymbol_special(asymbol *sym, struct minimal_symbol *msym)
#define insn_x(opcd, rt, ra, rb, opc2)
static const struct ppc_insn_pattern ppc64_standard_linkage4[]
#define insn_ds(opcd, rts, ra, d, xo)
static const struct ppc_insn_pattern ppc64_standard_linkage10[]
static const struct ppc_insn_pattern ppc64_standard_linkage6[]
CORE_ADDR ppc64_convert_from_func_ptr_addr(struct gdbarch *gdbarch, CORE_ADDR addr, struct target_ops *targ)
static const struct ppc_insn_pattern ppc64_standard_linkage2[]
static CORE_ADDR ppc64_plt_pcrel_entry_point(frame_info_ptr frame, CORE_ADDR plt_off, CORE_ADDR pc)
static CORE_ADDR ppc64_standard_linkage4_target(frame_info_ptr frame, unsigned int *insn)
#define insn_md(opcd, ra, rs, sh, me, rc)
static CORE_ADDR ppc64_skip_trampoline_code_1(frame_info_ptr frame, CORE_ADDR pc)
#define insn_xfx(opcd, rts, spr, xo)
#define prefix(a, b, R, do)
static CORE_ADDR ppc64_plt_entry_point(frame_info_ptr frame, CORE_ADDR plt_off)
static const struct ppc_insn_pattern ppc64_standard_linkage7[]
static const struct ppc_insn_pattern ppc64_standard_linkage1[]
static CORE_ADDR ppc64_standard_linkage1_target(frame_info_ptr frame, unsigned int *insn)
static const struct ppc_insn_pattern ppc64_standard_linkage8[]
static const struct ppc_insn_pattern ppc64_standard_linkage5[]
static CORE_ADDR ppc64_pcrel_linkage2_target(frame_info_ptr frame, unsigned int *insn, CORE_ADDR pc)
static const struct ppc_insn_pattern ppc64_standard_linkage9[]
static const struct ppc_insn_pattern ppc64_standard_linkage12[]
#define insn_xo(opcd, rt, ra, rb, oe, rc, opc2)
static CORE_ADDR ppc64_standard_linkage3_target(frame_info_ptr frame, unsigned int *insn)
void set_size(unsigned long size)
struct bfd_section * the_bfd_section
const struct target_section * target_section_by_addr(struct target_ops *target, CORE_ADDR addr)