regcache->raw_supply (i, regp + i);
/* GDB stores PC in reg 32. Linux kernel stores it in reg 0. */
- regcache->raw_supply (32, regp + 0);
+ regcache->raw_supply (RISCV_PC_REGNUM, regp + 0);
/* Fill the inaccessible zero register with zero. */
- regcache->raw_supply_zeroed (0);
+ regcache->raw_supply_zeroed (RISCV_ZERO_REGNUM);
}
else if (regnum == RISCV_ZERO_REGNUM)
- regcache->raw_supply_zeroed (0);
+ regcache->raw_supply_zeroed (RISCV_ZERO_REGNUM);
else if (regnum > RISCV_ZERO_REGNUM && regnum < RISCV_PC_REGNUM)
regcache->raw_supply (regnum, regp + regnum);
else if (regnum == RISCV_PC_REGNUM)
- regcache->raw_supply (32, regp + 0);
+ regcache->raw_supply (RISCV_PC_REGNUM, regp + 0);
}
/* Copy all general purpose registers from regset GREGS into REGCACHE. */
for (int i = RISCV_ZERO_REGNUM + 1; i < RISCV_PC_REGNUM; i++)
regcache->raw_collect (i, regp + i);
- regcache->raw_collect (32, regp + 0);
+ regcache->raw_collect (RISCV_PC_REGNUM, regp + 0);
}
else if (regnum == RISCV_ZERO_REGNUM)
/* Nothing to do here. */
else if (regnum > RISCV_ZERO_REGNUM && regnum < RISCV_PC_REGNUM)
regcache->raw_collect (regnum, regp + regnum);
else if (regnum == RISCV_PC_REGNUM)
- regcache->raw_collect (32, regp + 0);
+ regcache->raw_collect (RISCV_PC_REGNUM, regp + 0);
}
/* Copy floating point register REGNUM (or all fp regs if REGNUM == -1)