mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-21 01:12:32 +08:00
[gdb/tdep] Use raw_supply_zeroed for NIOS r0 reg
Use reg_buffer::raw_supply_zeroed for NIOS register r0. Tested by rebuilding on x86_64-linux. Approved-By: Tom Tromey <tom@tromey.com>
This commit is contained in:
parent
221d3ac93d
commit
a452ed5b5c
@ -61,7 +61,6 @@ nios2_supply_gregset (const struct regset *regset,
|
||||
{
|
||||
const gdb_byte *gregs = (const gdb_byte *) gregs_buf;
|
||||
int regno;
|
||||
static const gdb_byte zero_buf[4] = {0, 0, 0, 0};
|
||||
|
||||
for (regno = NIOS2_Z_REGNUM; regno <= NIOS2_MPUACC_REGNUM; regno++)
|
||||
if (regnum == -1 || regnum == regno)
|
||||
@ -69,7 +68,7 @@ nios2_supply_gregset (const struct regset *regset,
|
||||
if (reg_offsets[regno] != -1)
|
||||
regcache->raw_supply (regno, gregs + 4 * reg_offsets[regno]);
|
||||
else
|
||||
regcache->raw_supply (regno, zero_buf);
|
||||
regcache->raw_supply_zeroed (regno);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user