+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
+ * regcache.h (regcache_cooked_write_part): Remove, update
+ callers to use regcache::cooked_write_part.
+ * regcache.c (regcache_cooked_write_part): Remove.
+
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
* regcache.h (regcache_cooked_read_part): Remove, update callers
passed in floating-point registers, are passed in
the right halves of the floating point registers;
the left halves are unused." */
- regcache_cooked_write_part (regcache, regnum, offset % 8,
- len, value_contents (arg));
+ regcache->cooked_write_part (regnum, offset % 8, len,
+ value_contents (arg));
}
}
}
regnum = HPPA_ARG0_REGNUM - offset / 8;
while (regnum > HPPA_ARG0_REGNUM - 8 && len > 0)
{
- regcache_cooked_write_part (regcache, regnum,
- offset % 8, std::min (len, 8), valbuf);
+ regcache->cooked_write_part (regnum, offset % 8, std::min (len, 8),
+ valbuf);
offset += std::min (len, 8);
valbuf += std::min (len, 8);
len -= std::min (len, 8);
if (readbuf != NULL)
regcache->cooked_read_part (reg, 4 - part, part, readbuf);
if (writebuf != NULL)
- regcache_cooked_write_part (regcache, reg, 4 - part,
- part, writebuf);
+ regcache->cooked_write_part (reg, 4 - part, part, writebuf);
reg++;
}
/* Now transfer the remaining register values. */
{
while (len > 0)
{
- regcache_cooked_write_part (regcache, regnum, offset,
- std::min (len, 8), writebuf);
+ regcache->cooked_write_part (regnum, offset, std::min (len, 8),
+ writebuf);
writebuf += std::min (len, 8);
len -= std::min (len, 8);
regnum++;
int offset, len;
m32c_find_part (reg, &offset, &len);
- regcache_cooked_write_part (cache, reg->rx->num, offset, len, buf);
+ cache->cooked_write_part (reg->rx->num, offset, len, buf);
return REG_VALID;
}
else
offset = 0;
- regcache_cooked_write_part (regcache, MEP_R0_REGNUM,
- offset, TYPE_LENGTH (type),
- valbuf);
+ regcache->cooked_write_part (MEP_R0_REGNUM, offset, TYPE_LENGTH (type),
+ valbuf);
}
/* Return values larger than a single register are returned in
if (in != NULL)
regcache->cooked_read_part (reg_num, reg_offset, length, in + buf_offset);
if (out != NULL)
- regcache_cooked_write_part (regcache, reg_num, reg_offset, length,
- out + buf_offset);
+ regcache->cooked_write_part (reg_num, reg_offset, length, out + buf_offset);
if (mips_debug && in != NULL)
{
int i;
if (len > 0)
{
if (argpos->regcache && argpos->greg <= 10)
- regcache_cooked_write_part (argpos->regcache,
- tdep->ppc_gp0_regnum + argpos->greg,
- offset, len, val);
+ argpos->regcache->cooked_write_part
+ (tdep->ppc_gp0_regnum + argpos->greg, offset, len, val);
argpos->greg++;
}
}
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
offset = 8 - TYPE_LENGTH (type);
- regcache_cooked_write_part (argpos->regcache, regnum,
- offset, TYPE_LENGTH (type), val);
+ argpos->regcache->cooked_write_part (regnum, offset,
+ TYPE_LENGTH (type), val);
}
argpos->freg++;
offset = 8 - TYPE_LENGTH (valtype);
if (writebuf != NULL)
- regcache_cooked_write_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), writebuf);
+ regcache->cooked_write_part (regnum, offset, TYPE_LENGTH (valtype),
+ writebuf);
if (readbuf != NULL)
regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
readbuf);
offset = 8 - TYPE_LENGTH (valtype);
if (writebuf != NULL)
- regcache_cooked_write_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), writebuf);
+ regcache->cooked_write_part (regnum, offset, TYPE_LENGTH (valtype),
+ writebuf);
if (readbuf != NULL)
regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
readbuf);
int offset = (register_size (gdbarch, regnum) - TYPE_LENGTH (valtype));
if (writebuf != NULL)
- regcache_cooked_write_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), writebuf);
+ regcache->cooked_write_part (regnum, offset, TYPE_LENGTH (valtype),
+ writebuf);
if (readbuf != NULL)
regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
readbuf);
return read_part (regnum, offset, len, buf, false);
}
-void
-regcache_cooked_write_part (struct regcache *regcache, int regnum,
- int offset, int len, const gdb_byte *buf)
-{
- regcache->cooked_write_part (regnum, offset, len, buf);
-}
-
void
regcache::cooked_write_part (int regnum, int offset, int len,
const gdb_byte *buf)
extern void regcache_cooked_write_unsigned (struct regcache *regcache,
int regnum, ULONGEST val);
-/* Partial transfer of a cooked register. These perform read, modify,
- write style operations. */
-
-void regcache_cooked_write_part (struct regcache *regcache, int regnum,
- int offset, int len, const gdb_byte *buf);
-
/* Special routines to read/write the PC. */
/* For regcache_read_pc see common/common-regcache.h. */
operations. */
void raw_write_part (int regnum, int offset, int len, const gdb_byte *buf);
+ /* Partial transfer of a cooked register. Perform read, modify, write style
+ operations. */
void cooked_write_part (int regnum, int offset, int len,
const gdb_byte *buf);
/* When we store a single-precision value in an FP register,
it occupies the leftmost bits. */
if (write_mode)
- regcache_cooked_write_part (as->regcache,
- S390_F0_REGNUM + as->fr,
- 0, length,
- value_contents (arg));
+ as->regcache->cooked_write_part (S390_F0_REGNUM + as->fr, 0, length,
+ value_contents (arg));
as->fr += 2;
}
else
int regnum = S390_V24_REGNUM + use_vr[as->vr] - 24;
if (write_mode)
- regcache_cooked_write_part (as->regcache, regnum,
- 0, length,
- value_contents (arg));
+ as->regcache->cooked_write_part (regnum, 0, length,
+ value_contents (arg));
as->vr++;
}
else
{
/* Float-like value: left-aligned in f0. */
if (in != NULL)
- regcache_cooked_write_part (regcache, S390_F0_REGNUM,
- 0, length, in);
+ regcache->cooked_write_part (S390_F0_REGNUM, 0, length, in);
else
regcache->cooked_read_part (S390_F0_REGNUM, 0, length, out);
}
{
/* Vector: left-aligned in v24. */
if (in != NULL)
- regcache_cooked_write_part (regcache, S390_V24_REGNUM,
- 0, length, in);
+ regcache->cooked_write_part (S390_V24_REGNUM, 0, length, in);
else
regcache->cooked_read_part (S390_V24_REGNUM, 0, length, out);
}
regcache->cooked_read_part (regnum, reg_offset, length,
readbuf + buf_offset);
if (writebuf != NULL)
- regcache_cooked_write_part (regcache, regnum, reg_offset, length,
- writebuf + buf_offset);
+ regcache->cooked_write_part (regnum, reg_offset, length,
+ writebuf + buf_offset);
}
static enum return_value_convention
if (spu_scalar_value_p (type))
{
int preferred_slot = len < 4 ? 4 - len : 0;
- regcache_cooked_write_part (regcache, regnum, preferred_slot, len, in);
+ regcache->cooked_write_part (regnum, preferred_slot, len, in);
}
else
{
}
if (len > 0)
- regcache_cooked_write_part (regcache, regnum, 0, len, in);
+ regcache->cooked_write_part (regnum, 0, len, in);
}
}
{
case RETURN_VALUE_REGISTER_CONVENTION:
if (opencl_vector && TYPE_LENGTH (type) == 2)
- regcache_cooked_write_part (regcache, SPU_ARG1_REGNUM, 2, 2, in);
+ regcache->cooked_write_part (SPU_ARG1_REGNUM, 2, 2, in);
else
spu_value_to_regcache (regcache, SPU_ARG1_REGNUM, type, in);
break;
if (len <= 4)
{
if (len < 3 && byte_order == BFD_ENDIAN_BIG)
- regcache_cooked_write_part (regcache, TIC6X_A4_REGNUM, 4 - len, len,
- valbuf);
+ regcache->cooked_write_part (TIC6X_A4_REGNUM, 4 - len, len, valbuf);
else
regcache->cooked_write (TIC6X_A4_REGNUM, valbuf);
}
so, we write the contents in VAL to the lsp of
register. */
if (len < 3 && byte_order == BFD_ENDIAN_BIG)
- regcache_cooked_write_part (regcache, arg_regs[argreg],
- 4 - len, len, val);
+ regcache->cooked_write_part (arg_regs[argreg], 4 - len, len,
+ val);
else
regcache->cooked_write (arg_regs[argreg], val);
}
if (byte_order == BFD_ENDIAN_BIG)
{
regcache->cooked_write (arg_regs[argreg] + 1, val);
- regcache_cooked_write_part (regcache,
- arg_regs[argreg], 0,
- len - 4, val + 4);
+ regcache->cooked_write_part (arg_regs[argreg], 0,
+ len - 4, val + 4);
}
else
{
regcache->cooked_write (arg_regs[argreg], val);
- regcache_cooked_write_part (regcache,
- arg_regs[argreg] + 1, 0,
- len - 4, val + 4);
+ regcache->cooked_write_part (arg_regs[argreg] + 1, 0,
+ len - 4, val + 4);
}
}
else