+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
+ * regcache.h (regcache_cooked_read_part): Remove, update callers
+ to use readable_regcache::cooked_read_part.
+ * regcache.c (regcache_cooked_read_part): Remove.
+
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
* regcache.h (regcache_cooked_read_value): Remove, update
if (part > 0)
{
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, reg, 4 - part,
- part, readbuf);
+ regcache->cooked_read_part (reg, 4 - part, part, readbuf);
if (writebuf != NULL)
regcache_cooked_write_part (regcache, reg, 4 - part,
part, writebuf);
{
while (len > 0)
{
- regcache_cooked_read_part (regcache, regnum, offset,
- std::min (len, 8), readbuf);
+ regcache->cooked_read_part (regnum, offset, std::min (len, 8),
+ readbuf);
readbuf += std::min (len, 8);
len -= std::min (len, 8);
regnum++;
offset = 0;
/* Return values that do fit in a single register are returned in R0. */
- regcache_cooked_read_part (regcache, MEP_R0_REGNUM,
- offset, TYPE_LENGTH (type),
- valbuf);
+ regcache->cooked_read_part (MEP_R0_REGNUM, offset, TYPE_LENGTH (type),
+ valbuf);
}
fprintf_unfiltered (gdb_stdlog, "%02x", out[buf_offset + i]);
}
if (in != NULL)
- regcache_cooked_read_part (regcache, reg_num, reg_offset, length,
- in + buf_offset);
+ 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 (regcache, regnum,
offset, TYPE_LENGTH (valtype), writebuf);
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), readbuf);
+ regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
+ readbuf);
return 1;
}
regcache_cooked_write_part (regcache, regnum,
offset, TYPE_LENGTH (valtype), writebuf);
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), readbuf);
+ regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
+ readbuf);
return 1;
}
regcache_cooked_write_part (regcache, regnum,
offset, TYPE_LENGTH (valtype), writebuf);
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum,
- offset, TYPE_LENGTH (valtype), readbuf);
+ regcache->cooked_read_part (regnum, offset, TYPE_LENGTH (valtype),
+ readbuf);
return RETURN_VALUE_REGISTER_CONVENTION;
}
write_part (regnum, offset, len, buf, true);
}
-enum register_status
-regcache_cooked_read_part (struct regcache *regcache, int regnum,
- int offset, int len, gdb_byte *buf)
-{
- return regcache->cooked_read_part (regnum, offset, len, buf);
-}
-
-
enum register_status
readable_regcache::cooked_read_part (int regnum, int offset, int len,
gdb_byte *buf)
/* Partial transfer of a cooked register. These perform read, modify,
write style operations. */
-enum register_status regcache_cooked_read_part (struct regcache *regcache,
- int regnum, int offset,
- int len, gdb_byte *buf);
void regcache_cooked_write_part (struct regcache *regcache, int regnum,
int offset, int len, const gdb_byte *buf);
template<typename T, typename = RequireLongest<T>>
enum register_status cooked_read (int regnum, T *val);
+ /* Partial transfer of a cooked register. */
enum register_status cooked_read_part (int regnum, int offset, int len,
gdb_byte *buf);
regcache_cooked_write_part (regcache, S390_F0_REGNUM,
0, length, in);
else
- regcache_cooked_read_part (regcache, S390_F0_REGNUM,
- 0, length, out);
+ regcache->cooked_read_part (S390_F0_REGNUM, 0, length, out);
}
else if (code == TYPE_CODE_ARRAY)
{
regcache_cooked_write_part (regcache, S390_V24_REGNUM,
0, length, in);
else
- regcache_cooked_read_part (regcache, S390_V24_REGNUM,
- 0, length, out);
+ regcache->cooked_read_part (S390_V24_REGNUM, 0, length, out);
}
else if (length <= word_size)
{
/* Integer: zero- or sign-extended in r2. */
if (out != NULL)
- regcache_cooked_read_part (regcache, S390_R2_REGNUM,
- word_size - length, length, out);
+ regcache->cooked_read_part (S390_R2_REGNUM, word_size - length, length,
+ out);
else if (TYPE_UNSIGNED (type))
regcache_cooked_write_unsigned
(regcache, S390_R2_REGNUM,
}
if (readbuf != NULL)
- regcache_cooked_read_part (regcache, regnum, reg_offset, length,
- readbuf + buf_offset);
+ 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);
if (spu_scalar_value_p (type))
{
int preferred_slot = len < 4 ? 4 - len : 0;
- regcache_cooked_read_part (regcache, regnum, preferred_slot, len, out);
+ regcache->cooked_read_part (regnum, preferred_slot, len, out);
}
else
{
}
if (len > 0)
- regcache_cooked_read_part (regcache, regnum, 0, len, out);
+ regcache->cooked_read_part (regnum, 0, len, out);
}
}
{
case RETURN_VALUE_REGISTER_CONVENTION:
if (opencl_vector && TYPE_LENGTH (type) == 2)
- regcache_cooked_read_part (regcache, SPU_ARG1_REGNUM, 2, 2, out);
+ regcache->cooked_read_part (SPU_ARG1_REGNUM, 2, 2, out);
else
spu_regcache_to_value (regcache, SPU_ARG1_REGNUM, type, out);
break;
register and the second byte occupies byte 0.
so, we read the contents in VAL from the LSBs of register. */
if (len < 3 && byte_order == BFD_ENDIAN_BIG)
- regcache_cooked_read_part (regcache, TIC6X_A4_REGNUM, 4 - len, len,
- valbuf);
+ regcache->cooked_read_part (TIC6X_A4_REGNUM, 4 - len, len, valbuf);
else
regcache->cooked_read (TIC6X_A4_REGNUM, valbuf);
}