mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
[gdb/tdep] Use raw_supply_zeroed for SPARC g0 reg
Use reg_buffer::raw_supply_zeroed for SPARC register g0. Tested by rebuilding on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
7ea50bf94f
commit
1873768e44
@ -154,9 +154,7 @@ sparc_fetch_inferior_registers (process_stratum_target *proc_target,
|
||||
|
||||
if (regnum == SPARC_G0_REGNUM)
|
||||
{
|
||||
gdb_byte zero[8] = { 0 };
|
||||
|
||||
regcache->raw_supply (SPARC_G0_REGNUM, &zero);
|
||||
regcache->raw_supply_zeroed (SPARC_G0_REGNUM);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2092,7 +2092,6 @@ sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
|
||||
int regnum, const void *gregs)
|
||||
{
|
||||
const gdb_byte *regs = (const gdb_byte *) gregs;
|
||||
gdb_byte zero[4] = { 0 };
|
||||
int i;
|
||||
|
||||
if (regnum == SPARC32_PSR_REGNUM || regnum == -1)
|
||||
@ -2108,7 +2107,7 @@ sparc32_supply_gregset (const struct sparc_gregmap *gregmap,
|
||||
regcache->raw_supply (SPARC32_Y_REGNUM, regs + gregmap->r_y_offset);
|
||||
|
||||
if (regnum == SPARC_G0_REGNUM || regnum == -1)
|
||||
regcache->raw_supply (SPARC_G0_REGNUM, &zero);
|
||||
regcache->raw_supply_zeroed (SPARC_G0_REGNUM);
|
||||
|
||||
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
|
||||
{
|
||||
|
@ -1884,7 +1884,6 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
|
||||
enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
|
||||
int sparc32 = (gdbarch_ptr_bit (gdbarch) == 32);
|
||||
const gdb_byte *regs = (const gdb_byte *) gregs;
|
||||
gdb_byte zero[8] = { 0 };
|
||||
int i;
|
||||
|
||||
if (sparc32)
|
||||
@ -1947,7 +1946,7 @@ sparc64_supply_gregset (const struct sparc_gregmap *gregmap,
|
||||
}
|
||||
|
||||
if (regnum == SPARC_G0_REGNUM || regnum == -1)
|
||||
regcache->raw_supply (SPARC_G0_REGNUM, &zero);
|
||||
regcache->raw_supply_zeroed (SPARC_G0_REGNUM);
|
||||
|
||||
if ((regnum >= SPARC_G1_REGNUM && regnum <= SPARC_O7_REGNUM) || regnum == -1)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user