51 #include "elf/aarch64.h" 59 #include "opcode/aarch64.h" 62 #define submask(x) ((1L << ((x) + 1)) - 1) 63 #define bit(obj,st) (((obj) >> (st)) & 1) 64 #define bits(obj,st,fn) (((obj) >> (st)) & submask ((fn) - (st))) 67 #define AARCH64_Q0_REGNUM 0 68 #define AARCH64_D0_REGNUM (AARCH64_Q0_REGNUM + AARCH64_D_REGISTER_COUNT) 69 #define AARCH64_S0_REGNUM (AARCH64_D0_REGNUM + 32) 70 #define AARCH64_H0_REGNUM (AARCH64_S0_REGNUM + 32) 71 #define AARCH64_B0_REGNUM (AARCH64_H0_REGNUM + 32) 128 "x0",
"x1",
"x2",
"x3",
129 "x4",
"x5",
"x6",
"x7",
130 "x8",
"x9",
"x10",
"x11",
131 "x12",
"x13",
"x14",
"x15",
132 "x16",
"x17",
"x18",
"x19",
133 "x20",
"x21",
"x22",
"x23",
134 "x24",
"x25",
"x26",
"x27",
135 "x28",
"x29",
"x30",
"sp",
144 "v0",
"v1",
"v2",
"v3",
145 "v4",
"v5",
"v6",
"v7",
146 "v8",
"v9",
"v10",
"v11",
147 "v12",
"v13",
"v14",
"v15",
148 "v16",
"v17",
"v18",
"v19",
149 "v20",
"v21",
"v22",
"v23",
150 "v24",
"v25",
"v26",
"v27",
151 "v28",
"v29",
"v30",
"v31",
199 class abstract_instruction_reader
204 enum bfd_endian byte_order) = 0;
209 class instruction_reader :
public abstract_instruction_reader
228 abstract_instruction_reader& reader)
239 for (; start < limit; start += 4)
244 insn = reader.read (start, 4, byte_order_for_code);
246 if (aarch64_decode_insn (insn, &inst, 1) != 0)
249 if (inst.opcode->iclass == addsub_imm
250 && (inst.opcode->op == OP_ADD
251 || strcmp (
"sub", inst.opcode->name) == 0))
253 unsigned rd = inst.operands[0].reg.regno;
254 unsigned rn = inst.operands[1].reg.regno;
256 gdb_assert (aarch64_num_of_operands (inst.opcode) == 3);
257 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd_SP);
258 gdb_assert (inst.operands[1].type == AARCH64_OPND_Rn_SP);
259 gdb_assert (inst.operands[2].type == AARCH64_OPND_AIMM);
261 if (inst.opcode->op == OP_ADD)
264 inst.operands[2].imm.value);
269 -inst.operands[2].imm.value);
272 else if (inst.opcode->iclass == pcreladdr
273 && inst.operands[1].type == AARCH64_OPND_ADDR_ADRP)
275 gdb_assert (aarch64_num_of_operands (inst.opcode) == 2);
276 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
278 regs[inst.operands[0].reg.regno] =
pv_unknown ();
280 else if (inst.opcode->iclass == branch_imm)
285 else if (inst.opcode->iclass == condbranch)
290 else if (inst.opcode->iclass == branch_reg)
295 else if (inst.opcode->iclass == compbranch)
300 else if (inst.opcode->op == OP_MOVZ)
302 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
303 regs[inst.operands[0].reg.regno] =
pv_unknown ();
305 else if (inst.opcode->iclass == log_shift
306 && strcmp (inst.opcode->name,
"orr") == 0)
308 unsigned rd = inst.operands[0].reg.regno;
309 unsigned rn = inst.operands[1].reg.regno;
310 unsigned rm = inst.operands[2].reg.regno;
312 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rd);
313 gdb_assert (inst.operands[1].type == AARCH64_OPND_Rn);
314 gdb_assert (inst.operands[2].type == AARCH64_OPND_Rm_SFT);
316 if (inst.operands[2].shifter.amount == 0
324 "addr=%s opcode=0x%x (orr x register)\n",
330 else if (inst.opcode->op == OP_STUR)
332 unsigned rt = inst.operands[0].reg.regno;
333 unsigned rn = inst.operands[1].addr.base_regno;
335 = (aarch64_get_qualifier_esize (inst.operands[0].qualifier) == 8);
337 gdb_assert (aarch64_num_of_operands (inst.opcode) == 2);
338 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt);
339 gdb_assert (inst.operands[1].type == AARCH64_OPND_ADDR_SIMM9);
340 gdb_assert (!inst.operands[1].addr.offset.is_reg);
343 inst.operands[1].addr.offset.imm),
344 is64 ? 8 : 4, regs[rt]);
346 else if ((inst.opcode->iclass == ldstpair_off
347 || (inst.opcode->iclass == ldstpair_indexed
348 && inst.operands[2].addr.preind))
349 && strcmp (
"stp", inst.opcode->name) == 0)
354 unsigned rn = inst.operands[2].addr.base_regno;
355 int32_t imm = inst.operands[2].addr.offset.imm;
357 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt
358 || inst.operands[0].type == AARCH64_OPND_Ft);
359 gdb_assert (inst.operands[1].type == AARCH64_OPND_Rt2
360 || inst.operands[1].type == AARCH64_OPND_Ft2);
361 gdb_assert (inst.operands[2].type == AARCH64_OPND_ADDR_SIMM7);
362 gdb_assert (!inst.operands[2].addr.offset.is_reg);
373 rt1 = inst.operands[0].reg.regno;
374 rt2 = inst.operands[1].reg.regno;
375 if (inst.operands[0].type == AARCH64_OPND_Ft)
379 gdb_assert (inst.operands[0].qualifier == AARCH64_OPND_QLF_S_D);
389 if (inst.operands[2].addr.writeback)
393 else if ((inst.opcode->iclass == ldst_imm9
394 || (inst.opcode->iclass == ldst_pos
395 && (inst.opcode->op == OP_STR_POS
396 || inst.opcode->op == OP_STRF_POS)))
398 && strcmp (
"str", inst.opcode->name) == 0)
401 unsigned int rt = inst.operands[0].reg.regno;
402 int32_t imm = inst.operands[1].addr.offset.imm;
403 unsigned int rn = inst.operands[1].addr.base_regno;
405 = (aarch64_get_qualifier_esize (inst.operands[0].qualifier) == 8);
406 gdb_assert (inst.operands[0].type == AARCH64_OPND_Rt
407 || inst.operands[0].type == AARCH64_OPND_Ft);
409 if (inst.operands[0].type == AARCH64_OPND_Ft)
413 gdb_assert (inst.operands[0].qualifier == AARCH64_OPND_QLF_S_D);
418 is64 ? 8 : 4, regs[rt]);
419 if (inst.operands[1].addr.writeback)
422 else if (inst.opcode->iclass == testbranch)
431 debug_printf (
"aarch64: prologue analysis gave up addr=%s" 487 instruction_reader reader;
499 class instruction_reader_test :
public abstract_instruction_reader
502 template<
size_t SIZE>
503 explicit instruction_reader_test (
const uint32_t (&insns)[
SIZE])
504 : m_insns (insns), m_insns_size (
SIZE)
513 return m_insns[memaddr / 4];
517 const uint32_t *m_insns;
522 aarch64_analyze_prologue_test (
void)
527 info.bfd_arch_info = bfd_scan_arch (
"aarch64");
537 static const uint32_t insns[] = {
542 instruction_reader_test reader (insns);
553 SELF_CHECK (cache.saved_regs[i].addr == -272);
555 SELF_CHECK (cache.saved_regs[i].addr == -264);
575 static const uint32_t insns[] = {
583 instruction_reader_test reader (insns);
633 if (post_prologue_pc != 0)
634 return std::max (pc, post_prologue_pc);
679 prologue_end = prev_pc;
681 else if (sal.
end < prologue_end)
684 prologue_end = sal.
end;
687 prologue_end = std::min (prologue_end, prev_pc);
748 if (*this_cache != NULL)
779 return UNWIND_UNAVAILABLE;
783 return UNWIND_OUTERMOST;
787 return UNWIND_OUTERMOST;
789 return UNWIND_NO_REASON;
797 void **this_cache,
struct frame_id *this_id)
810 static struct value *
812 void **this_cache,
int prev_regnum)
872 if (*this_cache != NULL)
906 return UNWIND_UNAVAILABLE;
908 return UNWIND_NO_REASON;
915 void **this_cache,
struct frame_id *this_id)
931 void **this_prologue_cache)
1013 static struct value *
1015 void **this_cache,
int regnum)
1027 _(
"Unexpected register %d"),
regnum);
1153 struct type *member0_type;
1164 struct type *member1_type;
1231 if (byte_order == BFD_ENDIAN_BIG
1258 int len,
const bfd_byte *buf)
1271 memcpy (
reg, buf, len);
1319 if (info->
nsaa & (align - 1))
1322 int pad = align - (info->
nsaa & (align - 1));
1345 if (info->
ngrn + nregs <= 8)
1348 info->
ngrn += nregs;
1384 struct type *return_type;
1385 int lang_struct_return;
1387 memset (&info, 0,
sizeof (info));
1435 if (lang_struct_return)
1455 for (argnum = 0; argnum < nargs; argnum++)
1457 struct value *arg = args[argnum];
1458 struct type *arg_type;
1487 struct type *target_type =
1514 if (info.
nsrn + elements < 8)
1518 for (i = 0; i < elements; i++)
1525 struct type *field_type =
1539 &&
TYPE_VECTOR (arg_type) && (len == 16 || len == 8))
1573 sp -= 16 - (info.
nsaa & 15);
1580 if (si->
data != NULL)
1604 static struct type *
1631 static struct type *
1661 static struct type *
1691 static struct type *
1718 static struct type *
1766 info->symbols = NULL;
1794 memcpy (valbuf, buf, len);
1830 memcpy (valbuf, buf, len);
1833 memcpy (valbuf, buf, len);
1843 for (i = 0; i < elements; i++)
1850 debug_printf (
"read HFA or HVA return value element %d from %s\n",
1856 memcpy (valbuf, buf, len);
1974 for (i = 0; i < elements; i++)
1981 debug_printf (
"write HFA or HVA return value element %d to %s\n",
1986 memcpy (tmpbuf, valbuf, len);
2011 memcpy (tmpbuf, valbuf,
2044 aarch64_extract_return_value (valtype,
regcache, readbuf);
2091 static const char *
const q_name[] =
2093 "q0",
"q1",
"q2",
"q3",
2094 "q4",
"q5",
"q6",
"q7",
2095 "q8",
"q9",
"q10",
"q11",
2096 "q12",
"q13",
"q14",
"q15",
2097 "q16",
"q17",
"q18",
"q19",
2098 "q20",
"q21",
"q22",
"q23",
2099 "q24",
"q25",
"q26",
"q27",
2100 "q28",
"q29",
"q30",
"q31",
2103 static const char *
const d_name[] =
2105 "d0",
"d1",
"d2",
"d3",
2106 "d4",
"d5",
"d6",
"d7",
2107 "d8",
"d9",
"d10",
"d11",
2108 "d12",
"d13",
"d14",
"d15",
2109 "d16",
"d17",
"d18",
"d19",
2110 "d20",
"d21",
"d22",
"d23",
2111 "d24",
"d25",
"d26",
"d27",
2112 "d28",
"d29",
"d30",
"d31",
2115 static const char *
const s_name[] =
2117 "s0",
"s1",
"s2",
"s3",
2118 "s4",
"s5",
"s6",
"s7",
2119 "s8",
"s9",
"s10",
"s11",
2120 "s12",
"s13",
"s14",
"s15",
2121 "s16",
"s17",
"s18",
"s19",
2122 "s20",
"s21",
"s22",
"s23",
2123 "s24",
"s25",
"s26",
"s27",
2124 "s28",
"s29",
"s30",
"s31",
2127 static const char *
const h_name[] =
2129 "h0",
"h1",
"h2",
"h3",
2130 "h4",
"h5",
"h6",
"h7",
2131 "h8",
"h9",
"h10",
"h11",
2132 "h12",
"h13",
"h14",
"h15",
2133 "h16",
"h17",
"h18",
"h19",
2134 "h20",
"h21",
"h22",
"h23",
2135 "h24",
"h25",
"h26",
"h27",
2136 "h28",
"h29",
"h30",
"h31",
2139 static const char *
const b_name[] =
2141 "b0",
"b1",
"b2",
"b3",
2142 "b4",
"b5",
"b6",
"b7",
2143 "b8",
"b9",
"b10",
"b11",
2144 "b12",
"b13",
"b14",
"b15",
2145 "b16",
"b17",
"b18",
"b19",
2146 "b20",
"b21",
"b22",
"b23",
2147 "b24",
"b25",
"b26",
"b27",
2148 "b28",
"b29",
"b30",
"b31",
2169 _(
"aarch64_pseudo_register_name: bad register number %d"),
2175 static struct type *
2196 _(
"aarch64_pseudo_register_type: bad register number %d"),
2226 static struct value *
2232 struct value *result_value;
2254 return result_value;
2269 return result_value;
2284 return result_value;
2299 return result_value;
2314 return result_value;
2332 memset (reg_buf, 0,
sizeof (reg_buf));
2395 static struct value *
2398 const int *reg_p = (
const int *) baton;
2407 static std::vector<CORE_ADDR>
2412 const int insn_size = 4;
2413 const int atomic_sequence_length = 16;
2422 int bc_insn_count = 0;
2423 int last_breakpoint = 0;
2426 if (aarch64_decode_insn (insn, &inst, 1) != 0)
2430 if (inst.opcode->iclass != ldstexcl ||
bit (insn, 22) == 0)
2433 for (insn_count = 0; insn_count < atomic_sequence_length; ++insn_count)
2439 if (aarch64_decode_insn (insn, &inst, 1) != 0)
2442 if (inst.opcode->iclass == condbranch)
2444 gdb_assert (inst.operands[0].type == AARCH64_OPND_ADDR_PCREL19);
2446 if (bc_insn_count >= 1)
2450 breaks[1] =
loc + inst.operands[0].imm.value;
2457 if (inst.opcode->iclass == ldstexcl &&
bit (insn, 22) == 0)
2469 breaks[0] =
loc + insn_size;
2474 && (breaks[1] == breaks[0]
2475 || (breaks[1] >= pc && breaks[1] <= closing_insn)))
2476 last_breakpoint = 0;
2478 std::vector<CORE_ADDR> next_pcs;
2482 for (index = 0; index <= last_breakpoint; index++)
2483 next_pcs.push_back (breaks[index]);
2591 const unsigned rn,
int is64,
2615 const unsigned rt,
unsigned bit,
2667 const unsigned rt,
const int is64,
2700 if ((insn & 0xfffffc1f) == 0xd65f0000)
2732 if (aarch64_decode_insn (insn, &inst, 1) != 0)
2736 if (inst.opcode->iclass == ldstexcl &&
bit (insn, 22))
2742 std::unique_ptr<aarch64_displaced_step_closure>
dsc 2753 if (dsd.insn_count != 0)
2759 for (i = 0; i < dsd.insn_count; i++)
2776 return dsc.release ();
2798 else if (pc - to == 4)
2861 int num_pseudo_regs = 0;
2871 if (feature == NULL)
2898 num_pseudo_regs += 32;
2899 num_pseudo_regs += 32;
2900 num_pseudo_regs += 32;
2901 num_pseudo_regs += 32;
2902 num_pseudo_regs += 32;
2923 if (best_arch != NULL)
2954 aarch64_breakpoint::kind_from_pc);
2956 aarch64_breakpoint::bp_from_kind);
3022 if (tdep->
jb_pc >= 0)
3053 static void aarch64_process_record_test (
void);
3065 Set AArch64 debugging."),
_(
"\ 3066 Show AArch64 debugging."),
_(
"\ 3067 When on, AArch64 specific debugging is enabled."),
3074 selftests::aarch64_analyze_prologue_test);
3076 selftests::aarch64_process_record_test);
3077 selftests::record_xml_tdesc (
"aarch64.xml",
3084 #define REG_ALLOC(REGS, LENGTH, RECORD_BUF) \ 3087 unsigned int reg_len = LENGTH; \ 3090 REGS = XNEWVEC (uint32_t, reg_len); \ 3091 memcpy(®S[0], &RECORD_BUF[0], sizeof(uint32_t)*LENGTH); \ 3096 #define MEM_ALLOC(MEMS, LENGTH, RECORD_BUF) \ 3099 unsigned int mem_len = LENGTH; \ 3102 MEMS = XNEWVEC (struct aarch64_mem_r, mem_len); \ 3103 memcpy(&MEMS->len, &RECORD_BUF[0], \ 3104 sizeof(struct aarch64_mem_r) * LENGTH); \ 3141 uint8_t reg_rd, insn_bits24_27, insn_bits21_23;
3142 uint32_t record_buf[4];
3153 if (insn_bits24_27 == 0x0a)
3156 else if (insn_bits24_27 == 0x0b)
3161 record_buf[0] = reg_rd;
3168 if (insn_bits24_27 == 0x0b)
3171 record_buf[0] = reg_rd;
3174 else if (insn_bits24_27 == 0x0a)
3176 if (insn_bits21_23 == 0x00)
3179 record_buf[0] = reg_rd;
3187 else if (insn_bits21_23 == 0x02)
3194 else if (insn_bits21_23 == 0x04 || insn_bits21_23 == 0x06)
3199 record_buf[0] = reg_rd;
3217 uint8_t reg_rd, insn_bit23, insn_bits24_27, setflags;
3218 uint32_t record_buf[4];
3224 if (insn_bits24_27 == 0x00
3225 || insn_bits24_27 == 0x03
3226 || (insn_bits24_27 == 0x02 && insn_bit23))
3228 record_buf[0] = reg_rd;
3231 else if (insn_bits24_27 == 0x01)
3235 record_buf[0] = reg_rd;
3240 else if (insn_bits24_27 == 0x02 && !insn_bit23)
3244 record_buf[0] = reg_rd;
3263 uint8_t insn_bits24_27, insn_bits28_31, insn_bits22_23;
3264 uint32_t record_buf[4];
3270 if (insn_bits28_31 == 0x0d)
3273 if (insn_bits24_27 == 0x04)
3290 else if (insn_bits24_27 == 0x05 && insn_bits22_23 == 0x00)
3292 uint32_t reg_rt, reg_crn;
3300 record_buf[0] = reg_rt;
3304 else if (reg_crn == 0x02 || reg_crn == 0x04)
3311 else if((insn_bits24_27 & 0x0e) == 0x06)
3321 else if ((insn_bits28_31 & 0x07) == 0x01 && (insn_bits24_27 & 0x0c) == 0x04)
3343 uint64_t addr_offset = 0;
3344 uint32_t record_buf[24];
3345 uint64_t record_buf_mem[24];
3346 uint32_t reg_rn, reg_rt;
3347 uint32_t reg_index = 0, mem_index = 0;
3348 uint8_t opcode_bits, size_bits;
3357 debug_printf (
"Process record: Advanced SIMD load/store\n");
3362 uint8_t sindex, scale, selem, esize, replicate = 0;
3363 scale = opcode_bits >> 2;
3364 selem = ((opcode_bits & 0x02) |
3369 if (size_bits & 0x01)
3373 if ((size_bits >> 1) & 0x01)
3375 if (size_bits & 0x01)
3377 if (!((opcode_bits >> 1) & 0x01))
3397 for (sindex = 0; sindex < selem; sindex++)
3400 reg_rt = (reg_rt + 1) % 32;
3404 for (sindex = 0; sindex < selem; sindex++)
3410 record_buf_mem[mem_index++] = esize / 8;
3411 record_buf_mem[mem_index++] = address + addr_offset;
3413 addr_offset = addr_offset + (esize / 8);
3414 reg_rt = (reg_rt + 1) % 32;
3421 uint8_t selem, esize, rpt, elements;
3422 uint8_t eindex, rindex;
3424 esize = 8 << size_bits;
3426 elements = 128 / esize;
3428 elements = 64 / esize;
3430 switch (opcode_bits)
3471 for (rindex = 0; rindex < rpt; rindex++)
3472 for (eindex = 0; eindex < elements; eindex++)
3474 uint8_t reg_tt, sindex;
3475 reg_tt = (reg_rt + rindex) % 32;
3476 for (sindex = 0; sindex < selem; sindex++)
3482 record_buf_mem[mem_index++] = esize / 8;
3483 record_buf_mem[mem_index++] = address + addr_offset;
3485 addr_offset = addr_offset + (esize / 8);
3486 reg_tt = (reg_tt + 1) % 32;
3492 record_buf[reg_index++] = reg_rn;
3508 uint8_t insn_bits24_27, insn_bits28_29, insn_bits10_11;
3509 uint8_t insn_bit23, insn_bit21;
3510 uint8_t opc, size_bits, ld_flag, vector_flag;
3511 uint32_t reg_rn, reg_rt, reg_rt2;
3512 uint64_t datasize,
offset;
3513 uint32_t record_buf[8];
3514 uint64_t record_buf_mem[8];
3530 if (insn_bits24_27 == 0x08 && insn_bits28_29 == 0x00)
3533 debug_printf (
"Process record: load/store exclusive\n");
3537 record_buf[0] = reg_rt;
3541 record_buf[1] = reg_rt2;
3548 datasize = (8 << size_bits) * 2;
3550 datasize = (8 << size_bits);
3553 record_buf_mem[0] = datasize / 8;
3554 record_buf_mem[1] = address;
3565 else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x01)
3568 debug_printf (
"Process record: load register (literal)\n");
3572 record_buf[0] = reg_rt;
3576 else if ((insn_bits24_27 & 0x0a) == 0x08 && insn_bits28_29 == 0x02)
3590 record_buf[0] = reg_rt;
3591 record_buf[1] = reg_rt2;
3600 size_bits = size_bits >> 1;
3601 datasize = 8 << (2 + size_bits);
3602 offset = (imm7_off & 0x40) ? (~imm7_off & 0x007f) + 1 : imm7_off;
3606 if (!((insn_bits24_27 & 0x0b) == 0x08 && insn_bit23))
3608 if (imm7_off & 0x40)
3609 address = address -
offset;
3611 address = address +
offset;
3614 record_buf_mem[0] = datasize / 8;
3615 record_buf_mem[1] = address;
3616 record_buf_mem[2] = datasize / 8;
3617 record_buf_mem[3] = address + (datasize / 8);
3624 else if ((insn_bits24_27 & 0x0b) == 0x09 && insn_bits28_29 == 0x03)
3636 if (size_bits == 0x3 && vector_flag == 0x0 && opc == 0x2)
3641 else if (size_bits == 0x2 && vector_flag == 0x0 && opc == 0x2)
3657 debug_printf (
"Process record: load/store (unsigned immediate):" 3658 " size %x V %d opc %x\n", size_bits, vector_flag,
3665 datasize = 8 << size_bits;
3669 address = address +
offset;
3671 record_buf_mem[0] = datasize >> 3;
3672 record_buf_mem[1] = address;
3680 record_buf[0] = reg_rt;
3685 else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03
3686 && insn_bits10_11 == 0x02 && insn_bit21)
3689 debug_printf (
"Process record: load/store (register offset)\n");
3697 if (size_bits != 0x03)
3709 offset = reg_rm_val << size_bits;
3712 datasize = 8 << size_bits;
3715 address = address +
offset;
3716 record_buf_mem[0] = datasize >> 3;
3717 record_buf_mem[1] = address;
3725 record_buf[0] = reg_rt;
3730 else if ((insn_bits24_27 & 0x0b) == 0x08 && insn_bits28_29 == 0x03
3736 "(immediate and unprivileged)\n");
3745 if (size_bits != 0x03)
3754 offset = (imm9_off & 0x0100) ? (((~imm9_off) & 0x01ff) + 1) : imm9_off;
3755 datasize = 8 << size_bits;
3758 if (insn_bits10_11 != 0x01)
3760 if (imm9_off & 0x0100)
3761 address = address -
offset;
3763 address = address +
offset;
3765 record_buf_mem[0] = datasize >> 3;
3766 record_buf_mem[1] = address;
3774 record_buf[0] = reg_rt;
3777 if (insn_bits10_11 == 0x01 || insn_bits10_11 == 0x03)
3796 uint8_t insn_bit21, opcode, rmode, reg_rd;
3797 uint8_t insn_bits24_27, insn_bits28_31, insn_bits10_11, insn_bits12_15;
3798 uint8_t insn_bits11_14;
3799 uint32_t record_buf[2];
3812 debug_printf (
"Process record: data processing SIMD/FP: ");
3814 if ((insn_bits28_31 & 0x05) == 0x01 && insn_bits24_27 == 0x0e)
3822 if ((opcode >> 1) == 0x0 && rmode == 0x03)
3823 record_buf[0] = reg_rd;
3828 else if (insn_bits10_11 == 0x01)
3837 else if (insn_bits10_11 == 0x02 || insn_bits10_11 == 0x03)
3844 else if (insn_bits10_11 == 0x00)
3847 if ((insn_bits12_15 & 0x01) == 0x01
3848 || (insn_bits12_15 & 0x07) == 0x04)
3855 else if ((insn_bits12_15 & 0x03) == 0x02)
3862 else if (insn_bits12_15 == 0x00)
3865 if (!(opcode >> 1) || ((opcode >> 1) == 0x02 && !rmode))
3873 else if ((opcode >> 1) == 0x01 && !rmode)
3881 else if ((opcode >> 1) == 0x03)
3886 if (!(opcode & 0x01))
3900 else if ((insn_bits28_31 & 0x09) == 0x00 && insn_bits24_27 == 0x0e)
3910 if (insn_bits11_14 == 0x05 || insn_bits11_14 == 0x07)
3942 uint32_t ins_bit25, ins_bit26, ins_bit27, ins_bit28;
3950 if (!ins_bit26 && !ins_bit27 && ins_bit28)
3954 if (ins_bit26 && !ins_bit27 && ins_bit28)
3958 if (!ins_bit25 && ins_bit27)
3962 if (ins_bit25 && !ins_bit26 && ins_bit27)
3966 if (ins_bit25 && ins_bit26 && ins_bit27)
3985 aarch64_process_record_test (
void)
3991 info.bfd_arch_info = bfd_scan_arch (
"aarch64");
4024 uint32_t rec_no = 0;
4025 uint8_t insn_size = 4;
4030 memset (&buf[0], 0, insn_size);
4045 "0x%0x at address %s.\n"),
4060 for (rec_no = 0; rec_no < aarch64_record.
reg_rec_count; rec_no++)
4067 for (rec_no = 0; rec_no < aarch64_record.
mem_rec_count; rec_no++)
void set_gdbarch_num_regs(struct gdbarch *gdbarch, int num_regs)
void _initialize_aarch64_tdep(void)
void set_gdbarch_double_bit(struct gdbarch *gdbarch, int double_bit)
static const struct @0 aarch64_register_aliases[]
void set_gdbarch_frame_align(struct gdbarch *gdbarch, gdbarch_frame_align_ftype frame_align)
void set_gdbarch_have_nonsteppable_watchpoint(struct gdbarch *gdbarch, int have_nonsteppable_watchpoint)
static int is_hfa_or_hva(struct type *ty)
bool store_would_trash(pv_t addr)
void set_gdbarch_float_format(struct gdbarch *gdbarch, const struct floatformat **float_format)
ssize_t read(int fd, void *buf, size_t count)
static void aarch64_dump_tdep(struct gdbarch *gdbarch, struct ui_file *file)
static void pass_on_stack(struct aarch64_call_info *info, struct type *type, struct value *arg)
struct frame_id frame_id_build(CORE_ADDR stack_addr, CORE_ADDR code_addr)
void set_gdbarch_get_longjmp_target(struct gdbarch *gdbarch, gdbarch_get_longjmp_target_ftype get_longjmp_target)
CORE_ADDR get_frame_address_in_block(struct frame_info *this_frame)
aarch64_displaced_step_closure * dsc
static int aarch64_get_longjmp_target(struct frame_info *frame, CORE_ADDR *pc)
#define AARCH64_D_REGISTER_COUNT
void set_tdesc_pseudo_register_name(struct gdbarch *gdbarch, gdbarch_register_name_ftype *pseudo_name)
void set_gdbarch_float_bit(struct gdbarch *gdbarch, int float_bit)
#define AARCH64_X_REGISTER_COUNT
CORE_ADDR get_frame_pc(struct frame_info *frame)
static const struct aarch64_insn_visitor visitor
void gdbarch_init_osabi(struct gdbarch_info info, struct gdbarch *gdbarch)
const target_desc * aarch64_read_description()
static void aarch64_scan_prologue(struct frame_info *this_frame, struct aarch64_prologue_cache *cache)
pv_t pv_add_constant(pv_t v, CORE_ADDR k)
struct frame_unwind aarch64_prologue_unwind
struct value * trad_frame_get_prev_register(struct frame_info *this_frame, struct trad_frame_saved_reg this_saved_regs[], int regnum)
static const char * aarch64_pseudo_register_name(struct gdbarch *gdbarch, int regnum)
const struct floatformat * floatformats_ieee_double[BFD_ENDIAN_UNKNOWN]
static void aarch64_prologue_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
int trad_frame_addr_p(struct trad_frame_saved_reg this_saved_regs[], int regnum)
int record_full_arch_list_add_reg(struct regcache *regcache, int regnum)
void write_memory_unsigned_integer(CORE_ADDR addr, int len, enum bfd_endian byte_order, ULONGEST value)
static struct type * aarch64_vnq_type(struct gdbarch *gdbarch)
void set_tdesc_pseudo_register_type(struct gdbarch *gdbarch, gdbarch_register_type_ftype *pseudo_type)
static struct type * aarch64_pseudo_register_type(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_gen_return_address(struct gdbarch *gdbarch, gdbarch_gen_return_address_ftype gen_return_address)
void aarch64_relocate_instruction(uint32_t insn, const struct aarch64_insn_visitor *visitor, struct aarch64_insn_data *data)
static void aarch64_displaced_step_b_cond(const unsigned cond, const int32_t offset, struct aarch64_insn_data *data)
ULONGEST align_down(ULONGEST v, int n)
ULONGEST frame_unwind_register_unsigned(struct frame_info *frame, int regnum)
target_desc * aarch64_create_target_description()
def record(name, number, comment=None)
void set_gdbarch_short_bit(struct gdbarch *gdbarch, int short_bit)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void mark_value_bytes_unavailable(struct value *value, LONGEST offset, LONGEST length)
char * phex(ULONGEST l, int sizeof_l)
struct frame_id frame_id_build_unavailable_stack(CORE_ADDR code_addr)
struct gdbarch * gdbarch_find_by_info(struct gdbarch_info info)
int pv_is_register(pv_t a, int r)
void * memset(T *s, int c, size_t n)=delete
void internal_error(const char *file, int line, const char *fmt,...)
int(* aarch64_syscall_record)(struct regcache *regcache, unsigned long svc_number)
unsigned int record_debug
static CORE_ADDR aarch64_push_dummy_call(struct gdbarch *gdbarch, struct value *function, struct regcache *regcache, CORE_ADDR bp_addr, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)
static void aarch64_dwarf2_frame_init_reg(struct gdbarch *gdbarch, int regnum, struct dwarf2_frame_state_reg *reg, struct frame_info *this_frame)
struct type * builtin_uint8
static unsigned int aarch64_record_load_store(insn_decode_record *aarch64_insn_r)
static const char *const aarch64_r_register_names[]
struct type * builtin_uint16
#define emit_cb(buf, is_cbnz, rt, offset)
static struct value * aarch64_dwarf2_prev_register(struct frame_info *this_frame, void **this_cache, int regnum)
const struct floatformat * floatformats_ia64_quad[BFD_ENDIAN_UNKNOWN]
static unsigned int aarch64_record_data_proc_simd_fp(insn_decode_record *aarch64_insn_r)
struct gdbarch_list * gdbarch_list_lookup_by_info(struct gdbarch_list *arches, const struct gdbarch_info *info)
static struct value * aarch64_pseudo_read_value(struct gdbarch *gdbarch, struct regcache *regcache, int regnum)
CORE_ADDR skip_prologue_using_sal(struct gdbarch *gdbarch, CORE_ADDR func_addr)
#define VEC_safe_push(T, V, O)
struct gdbarch_list * next
int gdbarch_num_regs(struct gdbarch *gdbarch)
struct reggroup *const all_reggroup
static struct frame_id aarch64_dummy_id(struct gdbarch *gdbarch, struct frame_info *this_frame)
static int aarch64_stub_unwind_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static void deallocate_reg_mem(insn_decode_record *record)
void set_gdbarch_dwarf2_reg_to_regnum(struct gdbarch *gdbarch, gdbarch_dwarf2_reg_to_regnum_ftype dwarf2_reg_to_regnum)
static void aarch64_displaced_step_tb(const int32_t offset, int is_tbnz, const unsigned rt, unsigned bit, struct aarch64_insn_data *data)
static enum unwind_stop_reason aarch64_prologue_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
#define bits(obj, st, fn)
struct gdbarch_tdep * gdbarch_tdep(struct gdbarch *gdbarch)
static void show_aarch64_debug(struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void tdesc_data_cleanup(void *data_untyped)
#define TYPE_FIELD_TYPE(thistype, n)
struct value * allocate_value(struct type *type)
void frame_unwind_append_unwinder(struct gdbarch *gdbarch, const struct frame_unwind *unwinder)
void set_gdbarch_significant_addr_bit(struct gdbarch *gdbarch, int significant_addr_bit)
static struct gdbarch * aarch64_gdbarch_init(struct gdbarch_info info, struct gdbarch_list *arches)
struct type * builtin_int32
#define emit_ldrsw(buf, rt, rn, operand)
static unsigned int aarch64_record_data_proc_reg(insn_decode_record *aarch64_insn_r)
void set_gdbarch_wchar_signed(struct gdbarch *gdbarch, int wchar_signed)
#define FRAME_OBSTACK_ZALLOC(TYPE)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
struct value * frame_unwind_got_constant(struct frame_info *frame, int regnum, ULONGEST val)
#define TYPE_IS_REFERENCE(t)
static CORE_ADDR aarch64_skip_prologue(struct gdbarch *gdbarch, CORE_ADDR pc)
ULONGEST read_code_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
void gdbarch_register(enum bfd_architecture bfd_architecture, gdbarch_init_ftype *init, gdbarch_dump_tdep_ftype *dump_tdep)
struct reggroup *const float_reggroup
int tdesc_numbered_register(const struct tdesc_feature *feature, struct tdesc_arch_data *data, int regno, const char *name)
void frame_base_set_default(struct gdbarch *gdbarch, const struct frame_base *default_base)
struct type * builtin_int128
void set_gdbarch_pseudo_register_write(struct gdbarch *gdbarch, gdbarch_pseudo_register_write_ftype pseudo_register_write)
static void aarch64_displaced_step_ldr_literal(const int32_t offset, const int is_sw, const unsigned rt, const int is64, struct aarch64_insn_data *data)
void append_composite_type_field(struct type *t, const char *name, struct type *field)
void set_gdbarch_pseudo_register_read_value(struct gdbarch *gdbarch, gdbarch_pseudo_register_read_value_ftype pseudo_register_read_value)
struct type * check_typedef(struct type *type)
const gdb_byte * value_contents(struct value *value)
#define CATCH(EXCEPTION, MASK)
constexpr gdb_byte aarch64_default_breakpoint[]
int aarch64_emit_insn(uint32_t *buf, uint32_t insn)
static unsigned int aarch64_record_asimd_load_store(insn_decode_record *aarch64_insn_r)
static int aarch64_pseudo_register_reggroup_p(struct gdbarch *gdbarch, int regnum, struct reggroup *group)
static void aarch64_store_return_value(struct type *type, struct regcache *regs, const gdb_byte *valbuf)
static struct type * aarch64_vns_type(struct gdbarch *gdbarch)
struct symtab_and_line find_pc_line(CORE_ADDR pc, int notcurrent)
uint32_t insn_buf[DISPLACED_MODIFIED_INSNS]
struct value::@186::@187 reg
void fprintf_filtered(struct ui_file *stream, const char *format,...)
#define can_encode_int32(val, bits)
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
enum register_status regcache_cooked_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
struct aarch64_insn_data base
static unsigned int aarch64_record_data_proc_imm(insn_decode_record *aarch64_insn_r)
void set_gdbarch_sp_regnum(struct gdbarch *gdbarch, int sp_regnum)
struct type * register_type(struct gdbarch *gdbarch, int regnum)
void set_gdbarch_dummy_id(struct gdbarch *gdbarch, gdbarch_dummy_id_ftype dummy_id)
void fprintf_unfiltered(struct ui_file *stream, const char *format,...)
static CORE_ADDR aarch64_unwind_sp(struct gdbarch *gdbarch, struct frame_info *this_frame)
#define gdb_assert_not_reached(message)
struct type * builtin_int16
int default_print_insn(bfd_vma memaddr, disassemble_info *info)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
int find_pc_partial_function(CORE_ADDR pc, const char **name, CORE_ADDR *address, CORE_ADDR *endaddr)
#define VALUE_REGNUM(val)
void set_gdbarch_unwind_pc(struct gdbarch *gdbarch, gdbarch_unwind_pc_ftype unwind_pc)
struct type * builtin_uint32
int default_frame_sniffer(const struct frame_unwind *self, struct frame_info *this_frame, void **this_prologue_cache)
static unsigned int aarch64_record_branch_except_sys(insn_decode_record *aarch64_insn_r)
static struct type * aarch64_vnb_type(struct gdbarch *gdbarch)
void store(pv_t addr, CORE_ADDR size, pv_t value)
const char * gdbarch_register_name(struct gdbarch *gdbarch, int regnr)
static std::vector< CORE_ADDR > aarch64_software_single_step(struct regcache *regcache)
mach_port_t mach_port_t name mach_port_t mach_port_t name kern_return_t int status
struct value * value_cast(struct type *type, struct value *arg2)
void aarch64_displaced_step_fixup(struct gdbarch *gdbarch, struct displaced_step_closure *dsc_, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
static int pass_in_v(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, int len, const bfd_byte *buf)
static void pass_in_x_or_stack(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, struct type *type, struct value *arg)
int gdbarch_addr_bit(struct gdbarch *gdbarch)
void set_gdbarch_unwind_sp(struct gdbarch *gdbarch, gdbarch_unwind_sp_ftype unwind_sp)
static int aarch64_return_in_memory(struct gdbarch *gdbarch, struct type *type)
struct frame_unwind aarch64_stub_unwind
void printf_unfiltered(const char *format,...)
struct cmd_list_element * setdebuglist
struct reggroup *const vector_reggroup
ULONGEST get_frame_register_unsigned(struct frame_info *frame, int regnum)
static void aarch64_make_prologue_cache_1(struct frame_info *this_frame, struct aarch64_prologue_cache *cache)
#define emit_tb(buf, is_tbnz, bit, rt, offset)
static struct value * value_of_aarch64_user_reg(struct frame_info *frame, const void *baton)
struct type * builtin_uint128
void set_gdbarch_breakpoint_kind_from_pc(struct gdbarch *gdbarch, gdbarch_breakpoint_kind_from_pc_ftype breakpoint_kind_from_pc)
struct trad_frame_saved_reg * trad_frame_alloc_saved_regs(struct gdbarch *gdbarch)
void set_gdbarch_long_long_bit(struct gdbarch *gdbarch, int long_long_bit)
LONGEST unpack_long(struct type *type, const gdb_byte *valaddr)
#define emit_b(buf, is_bl, offset)
#define REG_ALLOC(REGS, LENGTH, RECORD_BUF)
static void aarch64_pseudo_write(struct gdbarch *gdbarch, struct regcache *regcache, int regnum, const gdb_byte *buf)
struct aarch64_mem_r * aarch64_mems
int record_full_arch_list_add_mem(CORE_ADDR addr, int len)
int aarch64_displaced_step_hw_singlestep(struct gdbarch *gdbarch, struct displaced_step_closure *closure)
const struct target_desc * target_desc
void set_gdbarch_software_single_step(struct gdbarch *gdbarch, gdbarch_software_single_step_ftype software_single_step)
const struct floatformat * floatformats_ieee_single[BFD_ENDIAN_UNKNOWN]
static const char *const aarch64_v_register_names[]
#define AARCH64_S0_REGNUM
static int aarch64_type_align(struct type *t)
void throw_exception(struct gdb_exception exception)
void tdesc_use_registers(struct gdbarch *gdbarch, const struct target_desc *target_desc, struct tdesc_arch_data *early_data)
int core_addr_lessthan(CORE_ADDR lhs, CORE_ADDR rhs)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
static struct type * aarch64_vnd_type(struct gdbarch *gdbarch)
ULONGEST align_up(ULONGEST v, int n)
static void pass_in_x(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, struct type *type, struct value *arg)
void set_gdbarch_char_signed(struct gdbarch *gdbarch, int char_signed)
#define TYPE_TARGET_TYPE(thistype)
struct type * builtin_double
struct trad_frame_saved_reg * saved_regs
static CORE_ADDR aarch64_unwind_pc(struct gdbarch *gdbarch, struct frame_info *this_frame)
static CORE_ADDR aarch64_normal_frame_base(struct frame_info *this_frame, void **this_cache)
#define TYPE_CODE(thistype)
struct value * value_of_register(int regnum, struct frame_info *frame)
enum register_status regcache_raw_read(struct regcache *regcache, int regnum, gdb_byte *buf)
void regcache_cooked_write_unsigned(struct regcache *regcache, int regnum, ULONGEST val)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct regcache * regcache
void gdbarch_info_init(struct gdbarch_info *info)
CORE_ADDR regcache_read_pc(struct regcache *regcache)
static int in_plt_section(CORE_ADDR pc)
void set_gdbarch_int_bit(struct gdbarch *gdbarch, int int_bit)
static struct type * aarch64_vnh_type(struct gdbarch *gdbarch)
static void aarch64_displaced_step_cb(const int32_t offset, const int is_cbnz, const unsigned rn, int is64, struct aarch64_insn_data *data)
void add_setshow_boolean_cmd(const char *name, enum command_class theclass, int *var, const char *set_doc, const char *show_doc, const char *help_doc, cmd_const_sfunc_ftype *set_func, show_value_ftype *show_func, struct cmd_list_element **set_list, struct cmd_list_element **show_list)
#define TYPE_NFIELDS(thistype)
static CORE_ADDR aarch64_analyze_prologue(struct gdbarch *gdbarch, CORE_ADDR start, CORE_ADDR limit, struct aarch64_prologue_cache *cache, abstract_instruction_reader &reader)
void set_gdbarch_num_pseudo_regs(struct gdbarch *gdbarch, int num_pseudo_regs)
#define emit_ldr(buf, rt, rn, operand)
int aarch64_process_record(struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR insn_addr)
void dwarf2_append_unwinders(struct gdbarch *gdbarch)
enum register_status regcache_cooked_read(struct regcache *regcache, int regnum, gdb_byte *buf)
static void aarch64_gen_return_address(struct gdbarch *gdbarch, struct agent_expr *ax, struct axs_value *value, CORE_ADDR scope)
static CORE_ADDR aarch64_frame_align(struct gdbarch *gdbarch, CORE_ADDR sp)
static enum unwind_stop_reason aarch64_stub_frame_unwind_stop_reason(struct frame_info *this_frame, void **this_cache)
static struct aarch64_prologue_cache * aarch64_make_prologue_cache(struct frame_info *this_frame, void **this_cache)
static void aarch64_displaced_step_adr(const int32_t offset, const unsigned rd, const int is_adrp, struct aarch64_insn_data *data)
enum bfd_endian byte_order_for_code
void set_gdbarch_double_format(struct gdbarch *gdbarch, const struct floatformat **double_format)
struct tdesc_arch_data * tdesc_data_alloc(void)
static enum return_value_convention aarch64_return_value(struct gdbarch *gdbarch, struct value *func_value, struct type *valtype, struct regcache *regcache, gdb_byte *readbuf, const gdb_byte *writebuf)
#define DISPLACED_MODIFIED_INSNS
unsigned long long ULONGEST
const struct tdesc_feature * tdesc_find_feature(const struct target_desc *target_desc, const char *name)
static void pass_in_v_or_stack(struct gdbarch *gdbarch, struct regcache *regcache, struct aarch64_call_info *info, struct type *type, struct value *arg)
struct value * value_primitive_field(struct value *arg1, LONGEST offset, int fieldno, struct type *arg_type)
void user_reg_add(struct gdbarch *gdbarch, const char *name, user_reg_read_ftype *read, const void *baton)
void set_gdbarch_long_double_bit(struct gdbarch *gdbarch, int long_double_bit)
struct type * value_type(const struct value *value)
struct type * builtin_int64
enum bfd_endian byte_order_for_code
#define emit_bcond(buf, cond, offset)
static int aarch64_dwarf_reg_to_regnum(struct gdbarch *gdbarch, int reg)
void set_gdbarch_long_bit(struct gdbarch *gdbarch, int long_bit)
void set_gdbarch_return_value(struct gdbarch *gdbarch, gdbarch_return_value_ftype return_value)
void dwarf2_frame_set_init_reg(struct gdbarch *gdbarch, void(*init_reg)(struct gdbarch *, int, struct dwarf2_frame_state_reg *, struct frame_info *))
struct cmd_list_element * showdebuglist
#define MEM_ALLOC(MEMS, LENGTH, RECORD_BUF)
bool find_reg(struct gdbarch *gdbarch, int reg, CORE_ADDR *offset_p)
void set_tdesc_pseudo_register_reggroup_p(struct gdbarch *gdbarch, gdbarch_register_reggroup_p_ftype *pseudo_reggroup_p)
void set_gdbarch_long_double_format(struct gdbarch *gdbarch, const struct floatformat **long_double_format)
static void aarch64_displaced_step_others(const uint32_t insn, struct aarch64_insn_data *data)
gdb_byte * value_contents_raw(struct value *value)
#define TYPE_LENGTH(thistype)
void set_gdbarch_ptr_bit(struct gdbarch *gdbarch, int ptr_bit)
typedef BP_MANIPULATION(aarch64_default_breakpoint)
enum register_status regcache_raw_read_unsigned(struct regcache *regcache, int regnum, ULONGEST *val)
void set_gdbarch_push_dummy_call(struct gdbarch *gdbarch, gdbarch_push_dummy_call_ftype push_dummy_call)
void debug_printf(const char *fmt,...)
static void aarch64_displaced_step_b(const int is_bl, const int32_t offset, struct aarch64_insn_data *data)
ULONGEST read_memory_unsigned_integer(CORE_ADDR memaddr, int len, enum bfd_endian byte_order)
struct type * builtin_uint64
void set_gdbarch_sw_breakpoint_from_kind(struct gdbarch *gdbarch, gdbarch_sw_breakpoint_from_kind_ftype sw_breakpoint_from_kind)
void write_memory(CORE_ADDR memaddr, const bfd_byte *myaddr, ssize_t len)
void set_gdbarch_skip_prologue(struct gdbarch *gdbarch, gdbarch_skip_prologue_ftype skip_prologue)
struct displaced_step_closure * aarch64_displaced_step_copy_insn(struct gdbarch *gdbarch, CORE_ADDR from, CORE_ADDR to, struct regcache *regs)
struct type * builtin_int8
static struct gdbarch_data * tdesc_data
static unsigned int aarch64_record_decode_insn_handler(insn_decode_record *aarch64_insn_r)
struct tdesc_arch_data * tdesc_data
const char * core_addr_to_string_nz(const CORE_ADDR addr)
enum bfd_endian byte_order
enum bfd_endian gdbarch_byte_order_for_code(struct gdbarch *gdbarch)
void set_gdbarch_pc_regnum(struct gdbarch *gdbarch, int pc_regnum)
int record_full_arch_list_add_end(void)
int tdesc_has_registers(const struct target_desc *target_desc)
#define AARCH64_D0_REGNUM
void register_test(const std::string &name, selftest *test)
CORE_ADDR get_frame_func(struct frame_info *this_frame)
static void store_signed_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, LONGEST val)
pv_t pv_register(int reg, CORE_ADDR k)
static void aarch64_stub_this_id(struct frame_info *this_frame, void **this_cache, struct frame_id *this_id)
struct gdbarch * gdbarch_alloc(const struct gdbarch_info *info, struct gdbarch_tdep *tdep)
void set_gdbarch_inner_than(struct gdbarch *gdbarch, gdbarch_inner_than_ftype inner_than)
#define AARCH64_H0_REGNUM
#define AARCH64_Q0_REGNUM
struct type * lookup_pointer_type(struct type *type)
struct gdbarch * get_frame_arch(struct frame_info *this_frame)
struct type * arch_composite_type(struct gdbarch *gdbarch, const char *name, enum type_code code)
static struct aarch64_prologue_cache * aarch64_make_stub_cache(struct frame_info *this_frame, void **this_cache)
struct frame_base aarch64_normal_base
void regcache_cooked_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
int language_pass_by_reference(struct type *type)
#define SELF_CHECK(VALUE)
void set_gdbarch_print_insn(struct gdbarch *gdbarch, gdbarch_print_insn_ftype print_insn)
#define AARCH64_B0_REGNUM
struct type * builtin_float
static void store_unsigned_integer(gdb_byte *addr, int len, enum bfd_endian byte_order, ULONGEST val)
static struct value * aarch64_prologue_prev_register(struct frame_info *this_frame, void **this_cache, int prev_regnum)
static int aarch64_gdb_print_insn(bfd_vma memaddr, disassemble_info *info)
struct insn_decode_record_t insn_decode_record
void regcache_raw_write(struct regcache *regcache, int regnum, const gdb_byte *buf)
void set_gdbarch_vbit_in_delta(struct gdbarch *gdbarch, int vbit_in_delta)