diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-01-03 23:53:48 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-01-03 23:53:48 +0000 |
commit | b2fb46766e90d9753db4f8db3138f69be34f8e3b (patch) | |
tree | f74501ef789c4c6995604eb66fc4de8e90620870 /gdb/mn10300-tdep.c | |
parent | 8dcde88743b22fab1f0d9c16b39ef4a892d88c36 (diff) | |
download | gdb-b2fb46766e90d9753db4f8db3138f69be34f8e3b.zip gdb-b2fb46766e90d9753db4f8db3138f69be34f8e3b.tar.gz gdb-b2fb46766e90d9753db4f8db3138f69be34f8e3b.tar.bz2 |
2003-01-03 Andrew Cagney <ac131313@redhat.com>
* alpha-tdep.c: Use get_frame_saved_regs.
* arm-tdep.c, avr-tdep.c, cris-tdep.c, d10v-tdep.c: Ditto.
* h8300-tdep.c, i386-tdep.c, ia64-tdep.c, m68hc11-tdep.c: Ditto.
* m68k-tdep.c, mcore-tdep.c, mips-tdep.c, mn10300-tdep.c: Ditto.
* ns32k-tdep.c, s390-tdep.c, sh-tdep.c, v850-tdep.c: Ditto.
* vax-tdep.c, xstormy16-tdep.c: Ditto.
Diffstat (limited to 'gdb/mn10300-tdep.c')
-rw-r--r-- | gdb/mn10300-tdep.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c index 75b7932..582e965 100644 --- a/gdb/mn10300-tdep.c +++ b/gdb/mn10300-tdep.c @@ -163,7 +163,7 @@ analyze_dummy_frame (CORE_ADDR pc, CORE_ADDR frame) dummy->frame = frame; dummy->extra_info->status = 0; dummy->extra_info->stack_size = 0; - memset (dummy->saved_regs, '\000', SIZEOF_FRAME_SAVED_REGS); + memset (get_frame_saved_regs (dummy), '\000', SIZEOF_FRAME_SAVED_REGS); mn10300_analyze_prologue (dummy, 0); return dummy; } @@ -231,59 +231,59 @@ set_movm_offsets (struct frame_info *fi, int movm_args) /* The `other' bit leaves a blank area of four bytes at the beginning of its block of saved registers, making it 32 bytes long in total. */ - fi->saved_regs[LAR_REGNUM] = fi->frame + offset + 4; - fi->saved_regs[LIR_REGNUM] = fi->frame + offset + 8; - fi->saved_regs[MDR_REGNUM] = fi->frame + offset + 12; - fi->saved_regs[A0_REGNUM + 1] = fi->frame + offset + 16; - fi->saved_regs[A0_REGNUM] = fi->frame + offset + 20; - fi->saved_regs[D0_REGNUM + 1] = fi->frame + offset + 24; - fi->saved_regs[D0_REGNUM] = fi->frame + offset + 28; + get_frame_saved_regs (fi)[LAR_REGNUM] = fi->frame + offset + 4; + get_frame_saved_regs (fi)[LIR_REGNUM] = fi->frame + offset + 8; + get_frame_saved_regs (fi)[MDR_REGNUM] = fi->frame + offset + 12; + get_frame_saved_regs (fi)[A0_REGNUM + 1] = fi->frame + offset + 16; + get_frame_saved_regs (fi)[A0_REGNUM] = fi->frame + offset + 20; + get_frame_saved_regs (fi)[D0_REGNUM + 1] = fi->frame + offset + 24; + get_frame_saved_regs (fi)[D0_REGNUM] = fi->frame + offset + 28; offset += 32; } if (movm_args & movm_a3_bit) { - fi->saved_regs[A3_REGNUM] = fi->frame + offset; + get_frame_saved_regs (fi)[A3_REGNUM] = fi->frame + offset; offset += 4; } if (movm_args & movm_a2_bit) { - fi->saved_regs[A2_REGNUM] = fi->frame + offset; + get_frame_saved_regs (fi)[A2_REGNUM] = fi->frame + offset; offset += 4; } if (movm_args & movm_d3_bit) { - fi->saved_regs[D3_REGNUM] = fi->frame + offset; + get_frame_saved_regs (fi)[D3_REGNUM] = fi->frame + offset; offset += 4; } if (movm_args & movm_d2_bit) { - fi->saved_regs[D2_REGNUM] = fi->frame + offset; + get_frame_saved_regs (fi)[D2_REGNUM] = fi->frame + offset; offset += 4; } if (AM33_MODE) { if (movm_args & movm_exother_bit) { - fi->saved_regs[MCVF_REGNUM] = fi->frame + offset; - fi->saved_regs[MCRL_REGNUM] = fi->frame + offset + 4; - fi->saved_regs[MCRH_REGNUM] = fi->frame + offset + 8; - fi->saved_regs[MDRQ_REGNUM] = fi->frame + offset + 12; - fi->saved_regs[E0_REGNUM + 1] = fi->frame + offset + 16; - fi->saved_regs[E0_REGNUM + 0] = fi->frame + offset + 20; + get_frame_saved_regs (fi)[MCVF_REGNUM] = fi->frame + offset; + get_frame_saved_regs (fi)[MCRL_REGNUM] = fi->frame + offset + 4; + get_frame_saved_regs (fi)[MCRH_REGNUM] = fi->frame + offset + 8; + get_frame_saved_regs (fi)[MDRQ_REGNUM] = fi->frame + offset + 12; + get_frame_saved_regs (fi)[E0_REGNUM + 1] = fi->frame + offset + 16; + get_frame_saved_regs (fi)[E0_REGNUM + 0] = fi->frame + offset + 20; offset += 24; } if (movm_args & movm_exreg1_bit) { - fi->saved_regs[E0_REGNUM + 7] = fi->frame + offset; - fi->saved_regs[E0_REGNUM + 6] = fi->frame + offset + 4; - fi->saved_regs[E0_REGNUM + 5] = fi->frame + offset + 8; - fi->saved_regs[E0_REGNUM + 4] = fi->frame + offset + 12; + get_frame_saved_regs (fi)[E0_REGNUM + 7] = fi->frame + offset; + get_frame_saved_regs (fi)[E0_REGNUM + 6] = fi->frame + offset + 4; + get_frame_saved_regs (fi)[E0_REGNUM + 5] = fi->frame + offset + 8; + get_frame_saved_regs (fi)[E0_REGNUM + 4] = fi->frame + offset + 12; offset += 16; } if (movm_args & movm_exreg0_bit) { - fi->saved_regs[E0_REGNUM + 3] = fi->frame + offset; - fi->saved_regs[E0_REGNUM + 2] = fi->frame + offset + 4; + get_frame_saved_regs (fi)[E0_REGNUM + 3] = fi->frame + offset; + get_frame_saved_regs (fi)[E0_REGNUM + 2] = fi->frame + offset + 4; offset += 8; } } @@ -633,14 +633,14 @@ saved_regs_size (struct frame_info *fi) /* Reserve four bytes for every register saved. */ for (i = 0; i < NUM_REGS; i++) - if (fi->saved_regs[i]) + if (get_frame_saved_regs (fi)[i]) adjust += 4; /* If we saved LIR, then it's most likely we used a `movm' instruction with the `other' bit set, in which case the SP is decremented by an extra four bytes, "to simplify calculation of the transfer area", according to the processor manual. */ - if (fi->saved_regs[LIR_REGNUM]) + if (get_frame_saved_regs (fi)[LIR_REGNUM]) adjust += 4; return adjust; @@ -690,8 +690,8 @@ mn10300_frame_chain (struct frame_info *fi) { /* Our caller has a frame pointer. So find the frame in $a3 or in the stack. */ - if (fi->saved_regs[A3_REGNUM]) - return (read_memory_integer (fi->saved_regs[A3_REGNUM], REGISTER_SIZE)); + if (get_frame_saved_regs (fi)[A3_REGNUM]) + return (read_memory_integer (get_frame_saved_regs (fi)[A3_REGNUM], REGISTER_SIZE)); else return read_register (A3_REGNUM); } @@ -728,11 +728,11 @@ mn10300_pop_frame_regular (struct frame_info *frame) /* Restore any saved registers. */ for (regnum = 0; regnum < NUM_REGS; regnum++) - if (frame->saved_regs[regnum] != 0) + if (get_frame_saved_regs (frame)[regnum] != 0) { ULONGEST value; - value = read_memory_unsigned_integer (frame->saved_regs[regnum], + value = read_memory_unsigned_integer (get_frame_saved_regs (frame)[regnum], REGISTER_RAW_SIZE (regnum)); write_register (regnum, value); } |