+2002-05-13 Richard Earnshaw <rearnsha@arm.com>
+
+ * builtin-regs.c (value_of_builtin_reg): Correctly calculate the
+ builtin reg number.
+
2002-05-13 Daniel Jacobowitz <drow@mvista.com>
* ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary)
struct value *
value_of_builtin_reg (int regnum, struct frame_info *frame)
{
- int reg = regnum - NUM_REGS + NUM_PSEUDO_REGS;
+ int reg = regnum - (NUM_REGS + NUM_PSEUDO_REGS);
gdb_assert (reg >= 0 && reg < nr_builtin_regs);
return builtin_regs[reg].value (frame);
}