From: Kevin Buettner Date: Wed, 6 Sep 2000 07:43:37 +0000 (+0000) Subject: Add rotating register rename support. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3a854e237b647f886a525dd8f121859d843451f3;p=binutils-gdb.git Add rotating register rename support. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e0b7021ae8f..4b28f5b580a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2000-09-06 Kevin Buettner + + * ia64-tdep.c (examine_prologue): Add rotating register rename + support for the general registers. + (ia64_get_saved_register): Add rotating register rename support + for the predicate registers and the floating-point registers. + 2000-09-05 Kevin Buettner * config/arm/tm-linux.h (arm_linux_sigcontext_register_address, diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c index eac25702871..0a3aad84188 100644 --- a/gdb/ia64-tdep.c +++ b/gdb/ia64-tdep.c @@ -984,6 +984,13 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame) if (do_fsr_stuff) { int i; CORE_ADDR addr; + int sor, rrb_gr; + + /* Extract the size of the rotating portion of the stack + frame and the register rename base from the current + frame marker. */ + sor = ((frame->extra_info->cfm >> 14) & 0xf) * 8; + rrb_gr = (frame->extra_info->cfm >> 18) & 0x7f; for (i = 0, addr = frame->extra_info->bsp; i < frame->extra_info->sof; @@ -993,7 +1000,11 @@ examine_prologue (CORE_ADDR pc, CORE_ADDR lim_pc, struct frame_info *frame) { addr += 8; } - frame->saved_regs[IA64_GR32_REGNUM + i] = addr; + if (i < sor) + frame->saved_regs[IA64_GR32_REGNUM + ((i + (sor - rrb_gr)) % sor)] + = addr; + else + frame->saved_regs[IA64_GR32_REGNUM + i] = addr; if (i+32 == cfm_reg) frame->saved_regs[IA64_CFM_REGNUM] = addr; @@ -1125,6 +1136,16 @@ ia64_get_saved_register (char *raw_buffer, int prN_val; ia64_get_saved_register (pr_raw_buffer, &pr_optim, &pr_addr, frame, IA64_PR_REGNUM, &pr_lval); + if (IA64_PR16_REGNUM <= regnum && regnum <= IA64_PR63_REGNUM) + { + /* Fetch predicate register rename base from current frame + marker for this frame. */ + int rrb_pr = (frame->extra_info->cfm >> 32) & 0x3f; + + /* Adjust the register number to account for register rotation. */ + regnum = IA64_PR16_REGNUM + + ((regnum - IA64_PR16_REGNUM) + rrb_pr) % 48; + } prN_val = extract_bit_field ((unsigned char *) pr_raw_buffer, regnum - IA64_PR0_REGNUM, 1); store_unsigned_integer (raw_buffer, REGISTER_RAW_SIZE (regnum), prN_val); @@ -1215,6 +1236,18 @@ ia64_get_saved_register (char *raw_buffer, } else { + if (IA64_FR32_REGNUM <= regnum && regnum <= IA64_FR127_REGNUM) + { + /* Fetch floating point register rename base from current + frame marker for this frame. */ + int rrb_fr = (frame->extra_info->cfm >> 25) & 0x7f; + + /* Adjust the floating point register number to account for + register rotation. */ + regnum = IA64_FR32_REGNUM + + ((regnum - IA64_FR32_REGNUM) + rrb_fr) % 96; + } + generic_get_saved_register (raw_buffer, optimized, addrp, frame, regnum, lval); }