+2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
+
+ * regcache.h (regcache_raw_write): Remove, update callers to use
+ regcache::raw_write instead.
+ * regcache.c (regcache_raw_write): Remove.
+
2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
* regcache.h (regcache_raw_read): Remove, update callers to use
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_Q0_REGNUM;
memcpy (reg_buf, buf, Q_REGISTER_SIZE);
- regcache_raw_write (regcache, v_regnum, reg_buf);
+ regcache->raw_write (v_regnum, reg_buf);
return;
}
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_D0_REGNUM;
memcpy (reg_buf, buf, D_REGISTER_SIZE);
- regcache_raw_write (regcache, v_regnum, reg_buf);
+ regcache->raw_write (v_regnum, reg_buf);
return;
}
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_S0_REGNUM;
memcpy (reg_buf, buf, S_REGISTER_SIZE);
- regcache_raw_write (regcache, v_regnum, reg_buf);
+ regcache->raw_write (v_regnum, reg_buf);
return;
}
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_H0_REGNUM;
memcpy (reg_buf, buf, H_REGISTER_SIZE);
- regcache_raw_write (regcache, v_regnum, reg_buf);
+ regcache->raw_write (v_regnum, reg_buf);
return;
}
v_regnum = AARCH64_V0_REGNUM + regnum - AARCH64_B0_REGNUM;
memcpy (reg_buf, buf, B_REGISTER_SIZE);
- regcache_raw_write (regcache, v_regnum, reg_buf);
+ regcache->raw_write (v_regnum, reg_buf);
return;
}
/* ... Modify ... (always little endian). */
memcpy (raw_buf + 1, buf, 1);
/* ... Write. */
- regcache_raw_write (regcache,
- gpnum - AMD64_NUM_LOWER_BYTE_REGS, raw_buf);
+ regcache->raw_write (gpnum - AMD64_NUM_LOWER_BYTE_REGS, raw_buf);
}
else
{
/* ... Modify ... (always little endian). */
memcpy (raw_buf, buf, 1);
/* ... Write. */
- regcache_raw_write (regcache, gpnum, raw_buf);
+ regcache->raw_write (gpnum, raw_buf);
}
}
else if (i386_dword_regnum_p (gdbarch, regnum))
/* ... Modify ... (always little endian). */
memcpy (raw_buf, buf, 4);
/* ... Write. */
- regcache_raw_write (regcache, gpnum, raw_buf);
+ regcache->raw_write (gpnum, raw_buf);
}
else
i386_pseudo_register_write (gdbarch, regcache, regnum, buf);
if (writebuf)
{
i387_return_value (gdbarch, regcache);
- regcache_raw_write (regcache, AMD64_ST0_REGNUM, writebuf);
- regcache_raw_write (regcache, AMD64_ST1_REGNUM, writebuf + 16);
+ regcache->raw_write (AMD64_ST0_REGNUM, writebuf);
+ regcache->raw_write (AMD64_ST1_REGNUM, writebuf + 16);
/* Fix up the tag word such that both %st(0) and %st(1) are
marked as valid. */
else
offset = 0;
- regcache_raw_write (regcache, double_regnum, buf + offset);
+ regcache->raw_write (double_regnum, buf + offset);
offset = 8 - offset;
- regcache_raw_write (regcache, double_regnum + 1, buf + offset);
+ regcache->raw_write (double_regnum + 1, buf + offset);
}
static void
regcache->raw_read (double_regnum, reg_buf);
memcpy (reg_buf + offset, buf, 4);
- regcache_raw_write (regcache, double_regnum, reg_buf);
+ regcache->raw_write (double_regnum, reg_buf);
}
}
/* Overlay the CC bit in the ASTAT register. */
regcache->raw_read (BFIN_ASTAT_REGNUM, buf);
buf[0] = (buf[0] & ~ASTAT_CC) | ((buffer[0] & 1) << ASTAT_CC_POS);
- regcache_raw_write (regcache, BFIN_ASTAT_REGNUM, buf);
+ regcache->raw_write (BFIN_ASTAT_REGNUM, buf);
}
static CORE_ADDR
{
if (reg == iacc0_regnum)
{
- regcache_raw_write (regcache, iacc0h_regnum, buffer);
- regcache_raw_write (regcache, iacc0l_regnum, (bfd_byte *) buffer + 4);
+ regcache->raw_write (iacc0h_regnum, buffer);
+ regcache->raw_write (iacc0l_regnum, (bfd_byte *) buffer + 4);
}
else if (accg0_regnum <= reg && reg <= accg7_regnum)
{
regcache->raw_read (raw_regnum, buf);
buf[byte_num] = ((bfd_byte *) buffer)[0];
- regcache_raw_write (regcache, raw_regnum, buf);
+ regcache->raw_write (raw_regnum, buf);
}
}
else if (regno == E_PSEUDO_EXR_REGNUM (gdbarch))
raw_from_pseudo_register (gdbarch, regcache, buf, E_EXR_REGNUM, regno);
else
- regcache_raw_write (regcache, regno, buf);
+ regcache->raw_write (regno, buf);
}
static int
if (write_pass)
{
const gdb_byte *val = value_contents_all (args[i]);
- regcache_raw_write
- (regcache, I387_MM0_REGNUM(tdep) + num_m128, val);
+ regcache->raw_write (I387_MM0_REGNUM(tdep) + num_m128, val);
}
num_m128++;
}
not exactly how it would happen on the target itself, but
it is the best we can do. */
target_float_convert (valbuf, type, buf, i387_ext_type (gdbarch));
- regcache_raw_write (regcache, I386_ST0_REGNUM, buf);
+ regcache->raw_write (I386_ST0_REGNUM, buf);
/* Set the top of the floating-point register stack to 7. The
actual value doesn't really matter, but 7 is what a normal
regcache_raw_write_part (regcache, LOW_RETURN_REGNUM, 0, len, valbuf);
else if (len <= (low_size + high_size))
{
- regcache_raw_write (regcache, LOW_RETURN_REGNUM, valbuf);
+ regcache->raw_write (LOW_RETURN_REGNUM, valbuf);
regcache_raw_write_part (regcache, HIGH_RETURN_REGNUM, 0,
len - low_size, valbuf + low_size);
}
/* ... Modify ... (always little endian). */
memcpy (raw_buf, buf, register_size (gdbarch, regnum));
/* ... Write. */
- regcache_raw_write (regcache, fpnum, raw_buf);
+ regcache->raw_write (fpnum, raw_buf);
}
else
{
memcpy (raw_buf, &lower, 8);
memcpy (raw_buf + 8, &upper, 8);
-
- regcache_raw_write (regcache,
- I387_BND0R_REGNUM (tdep) + regnum,
- raw_buf);
+ regcache->raw_write (I387_BND0R_REGNUM (tdep) + regnum, raw_buf);
}
else if (i386_k_regnum_p (gdbarch, regnum))
{
regnum -= tdep->k0_regnum;
- regcache_raw_write (regcache,
- tdep->k0_regnum + regnum,
- buf);
+ regcache->raw_write (tdep->k0_regnum + regnum, buf);
}
else if (i386_zmm_regnum_p (gdbarch, regnum))
{
if (regnum < num_lower_zmm_regs)
{
/* Write lower 128bits. */
- regcache_raw_write (regcache,
- I387_XMM0_REGNUM (tdep) + regnum,
- buf);
+ regcache->raw_write (I387_XMM0_REGNUM (tdep) + regnum, buf);
/* Write upper 128bits. */
- regcache_raw_write (regcache,
- I387_YMM0_REGNUM (tdep) + regnum,
- buf + 16);
+ regcache->raw_write (I387_YMM0_REGNUM (tdep) + regnum, buf + 16);
}
else
{
/* Write lower 128bits. */
- regcache_raw_write (regcache,
- I387_XMM16_REGNUM (tdep) + regnum
- - num_lower_zmm_regs,
- buf);
+ regcache->raw_write (I387_XMM16_REGNUM (tdep) + regnum
+ - num_lower_zmm_regs, buf);
/* Write upper 128bits. */
- regcache_raw_write (regcache,
- I387_YMM16H_REGNUM (tdep) + regnum
- - num_lower_zmm_regs,
- buf + 16);
+ regcache->raw_write (I387_YMM16H_REGNUM (tdep) + regnum
+ - num_lower_zmm_regs, buf + 16);
}
/* Write upper 256bits. */
- regcache_raw_write (regcache,
- tdep->zmm0h_regnum + regnum,
- buf + 32);
+ regcache->raw_write (tdep->zmm0h_regnum + regnum, buf + 32);
}
else if (i386_ymm_regnum_p (gdbarch, regnum))
{
regnum -= tdep->ymm0_regnum;
/* ... Write lower 128bits. */
- regcache_raw_write (regcache,
- I387_XMM0_REGNUM (tdep) + regnum,
- buf);
+ regcache->raw_write (I387_XMM0_REGNUM (tdep) + regnum, buf);
/* ... Write upper 128bits. */
- regcache_raw_write (regcache,
- tdep->ymm0h_regnum + regnum,
- buf + 16);
+ regcache->raw_write (tdep->ymm0h_regnum + regnum, buf + 16);
}
else if (i386_ymm_avx512_regnum_p (gdbarch, regnum))
{
regnum -= tdep->ymm16_regnum;
/* ... Write lower 128bits. */
- regcache_raw_write (regcache,
- I387_XMM16_REGNUM (tdep) + regnum,
- buf);
+ regcache->raw_write (I387_XMM16_REGNUM (tdep) + regnum, buf);
/* ... Write upper 128bits. */
- regcache_raw_write (regcache,
- tdep->ymm16h_regnum + regnum,
- buf + 16);
+ regcache->raw_write (tdep->ymm16h_regnum + regnum, buf + 16);
}
else if (i386_word_regnum_p (gdbarch, regnum))
{
/* ... Modify ... (always little endian). */
memcpy (raw_buf, buf, 2);
/* ... Write. */
- regcache_raw_write (regcache, gpnum, raw_buf);
+ regcache->raw_write (gpnum, raw_buf);
}
else if (i386_byte_regnum_p (gdbarch, regnum))
{
else
memcpy (raw_buf, buf, 1);
/* ... Write. */
- regcache_raw_write (regcache, gpnum % 4, raw_buf);
+ regcache->raw_write (gpnum % 4, raw_buf);
}
else
internal_error (__FILE__, __LINE__, _("invalid regnum"));
memset (bnd_buf, 0, 16);
for (int i = 0; i < I387_NUM_BND_REGS; i++)
- regcache_raw_write (regcache, I387_BND0R_REGNUM (tdep) + i, bnd_buf);
+ regcache->raw_write (I387_BND0R_REGNUM (tdep) + i, bnd_buf);
}
}
memset (buf, 0, 4);
memcpy (buf + 4 - size, valbuf, size);
- regcache_raw_write (regcache, regno++, buf);
+ regcache->raw_write (regno++, buf);
len -= size;
valbuf = ((char *) valbuf) + size;
}
if (argreg <= E_LAST_ARGREG)
{
/* Passed in a register. */
- regcache_raw_write (regcache, argreg++, buf);
+ regcache->raw_write (argreg++, buf);
}
else
{
(must start with an even-numbered reg). */
if (((argreg - E_1ST_ARGREG) % 2) != 0)
argreg++;
- regcache_raw_write (regcache, argreg++, val);
- regcache_raw_write (regcache, argreg++, val + 4);
+ regcache->raw_write (argreg++, val);
+ regcache->raw_write (argreg++, val + 4);
}
else
{
m32c_raw_write (struct m32c_reg *reg, struct regcache *cache,
const gdb_byte *buf)
{
- regcache_raw_write (cache, reg->num, buf);
+ cache->raw_write (reg->num, buf);
return REG_VALID;
}
const gdb_byte *buf)
{
struct m32c_reg *bank_reg = m32c_banked_register (reg, cache);
- regcache_raw_write (cache, bank_reg->num, buf);
+ cache->raw_write (bank_reg->num, buf);
return REG_VALID;
}
{
regcache_raw_write_part (regcache, HARD_X_REGNUM, 4 - len,
len - 2, valbuf);
- regcache_raw_write (regcache, HARD_D_REGNUM, valbuf + (len - 2));
+ regcache->raw_write (HARD_D_REGNUM, valbuf + (len - 2));
}
else
error (_("return of value > 4 is not supported."));
{
regcache_raw_write_part (regcache, M68K_D0_REGNUM, 8 - len,
len - 4, valbuf);
- regcache_raw_write (regcache, M68K_D1_REGNUM, valbuf + (len - 4));
+ regcache->raw_write (M68K_D1_REGNUM, valbuf + (len - 4));
}
else
internal_error (__FILE__, __LINE__,
struct type *fpreg_type = register_type (gdbarch, M68K_FP0_REGNUM);
gdb_byte buf[M68K_MAX_REGISTER_SIZE];
target_float_convert (valbuf, type, buf, fpreg_type);
- regcache_raw_write (regcache, M68K_FP0_REGNUM, buf);
+ regcache->raw_write (M68K_FP0_REGNUM, buf);
}
else if (TYPE_CODE (type) == TYPE_CODE_PTR && TYPE_LENGTH (type) == 4)
{
- regcache_raw_write (regcache, M68K_A0_REGNUM, valbuf);
- regcache_raw_write (regcache, M68K_D0_REGNUM, valbuf);
+ regcache->raw_write (M68K_A0_REGNUM, valbuf);
+ regcache->raw_write (M68K_D0_REGNUM, valbuf);
}
else
m68k_store_return_value (type, regcache, valbuf);
/* Slow, but legible. */
store_unsigned_integer (buf64, 8, byte_order,
extract_unsigned_integer (buf, 4, byte_order));
- regcache_raw_write (regcache, rawnum, buf64);
+ regcache->raw_write (rawnum, buf64);
}
int cookednum,
const gdb_byte *buf)
{
- regcache_raw_write (regcache, mep_pseudo_to_raw[cookednum], buf);
+ regcache->raw_write (mep_pseudo_to_raw[cookednum], buf);
}
|| IS_FP_CR64_REGNUM (cookednum))
mep_pseudo_cr64_write (gdbarch, regcache, cookednum, buf);
else if (IS_CCR_REGNUM (cookednum))
- regcache_raw_write (regcache, mep_pseudo_to_raw[cookednum], buf);
+ regcache->raw_write (mep_pseudo_to_raw[cookednum], buf);
else
gdb_assert_not_reached ("unexpected pseudo register");
}
gdb_assert (cookednum >= gdbarch_num_regs (gdbarch)
&& cookednum < 2 * gdbarch_num_regs (gdbarch));
if (register_size (gdbarch, rawnum) == register_size (gdbarch, cookednum))
- regcache_raw_write (regcache, rawnum, buf);
+ regcache->raw_write (rawnum, buf);
else if (register_size (gdbarch, rawnum) >
register_size (gdbarch, cookednum))
{
regcache_raw_write_part (regcache, reg, 0, len, valbuf);
else if (len <= 2 * regsz)
{
- regcache_raw_write (regcache, reg, valbuf);
+ regcache->raw_write (reg, valbuf);
gdb_assert (regsz == register_size (gdbarch, reg + 1));
regcache_raw_write_part (regcache, reg+1, 0,
len - regsz, valbuf + regsz);
fdr_regnum = NDS32_FD0_REGNUM + (regnum >> 1);
regcache->raw_read (fdr_regnum, reg_buf);
memcpy (reg_buf + offset, buf, 4);
- regcache_raw_write (regcache, fdr_regnum, reg_buf);
+ regcache->raw_write (fdr_regnum, reg_buf);
return;
}
regcache->cooked_write (regnum, val);
}
-void
-regcache_raw_write (struct regcache *regcache, int regnum,
- const gdb_byte *buf)
-{
- gdb_assert (regcache != NULL && buf != NULL);
- regcache->raw_write (regnum, buf);
-}
-
void
regcache::raw_write (int regnum, const gdb_byte *buf)
{
struct gdbarch *,
struct address_space *);
-/* Transfer a raw register [0..NUM_REGS) between core-gdb and the
- regcache. The read variants return the status of the register. */
-
-void regcache_raw_write (struct regcache *regcache, int rawnum,
- const gdb_byte *buf);
extern enum register_status
regcache_raw_read_signed (struct regcache *regcache,
int regnum, LONGEST *val);
void cooked_write (int regnum, const gdb_byte *buf);
+ /* Update the value of raw register REGNUM (in the range [0..NUM_REGS)) and
+ transfer its value to core-gdb. */
+
void raw_write (int regnum, const gdb_byte *buf);
template<typename T, typename = RequireLongest<T>>
int raw_regnum = RL78_RAW_BANK0_R0_REGNUM
+ (reg - RL78_BANK0_R0_REGNUM);
- regcache_raw_write (regcache, raw_regnum, buffer);
+ regcache->raw_write (raw_regnum, buffer);
}
else if (RL78_BANK0_RP0_REGNUM <= reg && reg <= RL78_BANK3_RP3_REGNUM)
{
int raw_regnum = 2 * (reg - RL78_BANK0_RP0_REGNUM)
+ RL78_RAW_BANK0_R0_REGNUM;
- regcache_raw_write (regcache, raw_regnum, buffer);
- regcache_raw_write (regcache, raw_regnum + 1, buffer + 1);
+ regcache->raw_write (raw_regnum, buffer);
+ regcache->raw_write (raw_regnum + 1, buffer + 1);
}
else if (RL78_BANK0_RP0_PTR_REGNUM <= reg && reg <= RL78_BANK3_RP3_PTR_REGNUM)
{
int raw_regnum = 2 * (reg - RL78_BANK0_RP0_PTR_REGNUM)
+ RL78_RAW_BANK0_R0_REGNUM;
- regcache_raw_write (regcache, raw_regnum, buffer);
- regcache_raw_write (regcache, raw_regnum + 1, buffer + 1);
+ regcache->raw_write (raw_regnum, buffer);
+ regcache->raw_write (raw_regnum + 1, buffer + 1);
}
else if (reg == RL78_SP_REGNUM)
{
- regcache_raw_write (regcache, RL78_SPL_REGNUM, buffer);
- regcache_raw_write (regcache, RL78_SPH_REGNUM, buffer + 1);
+ regcache->raw_write (RL78_SPL_REGNUM, buffer);
+ regcache->raw_write (RL78_SPH_REGNUM, buffer + 1);
}
else if (reg == RL78_PC_REGNUM)
{
memcpy (rawbuf, buffer, 3);
rawbuf[3] = 0;
- regcache_raw_write (regcache, RL78_RAW_PC_REGNUM, rawbuf);
+ regcache->raw_write (RL78_RAW_PC_REGNUM, rawbuf);
}
else if (RL78_X_REGNUM <= reg && reg <= RL78_H_REGNUM)
{
/* RSB0 is at bit 3; RSBS1 is at bit 5. */
raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK
+ (reg - RL78_X_REGNUM);
- regcache_raw_write (regcache, raw_regnum, buffer);
+ regcache->raw_write (raw_regnum, buffer);
}
else if (RL78_AX_REGNUM <= reg && reg <= RL78_HL_REGNUM)
{
/* RSB0 is at bit 3; RSBS1 is at bit 5. */
raw_regnum = RL78_RAW_BANK0_R0_REGNUM + bank * RL78_REGS_PER_BANK
+ 2 * (reg - RL78_AX_REGNUM);
- regcache_raw_write (regcache, raw_regnum, buffer);
- regcache_raw_write (regcache, raw_regnum + 1, buffer + 1);
+ regcache->raw_write (raw_regnum, buffer);
+ regcache->raw_write (raw_regnum + 1, buffer + 1);
}
else
gdb_assert_not_reached ("invalid pseudo register number");
static enum register_status
do_regcache_raw_write (struct regcache *regcache, int regnum, void *buffer)
{
- regcache_raw_write (regcache, regnum, (const gdb_byte *) buffer);
+ regcache->raw_write (regnum, (const gdb_byte *) buffer);
return REG_VALID;
}
{
/* Write each half of the dl register into a separate
FP register. */
- regcache_raw_write (regcache, tdep->ppc_fp0_regnum +
+ regcache->raw_write (tdep->ppc_fp0_regnum +
2 * reg_index, buffer);
- regcache_raw_write (regcache, tdep->ppc_fp0_regnum +
+ regcache->raw_write (tdep->ppc_fp0_regnum +
2 * reg_index + 1, buffer + 8);
}
else
{
- regcache_raw_write (regcache, tdep->ppc_fp0_regnum +
+ regcache->raw_write (tdep->ppc_fp0_regnum +
2 * reg_index + 1, buffer);
- regcache_raw_write (regcache, tdep->ppc_fp0_regnum +
+ regcache->raw_write (tdep->ppc_fp0_regnum +
2 * reg_index, buffer + 8);
}
}
/* Write the portion that overlaps the VMX registers. */
if (reg_index > 31)
- regcache_raw_write (regcache, tdep->ppc_vr0_regnum +
+ regcache->raw_write (tdep->ppc_vr0_regnum +
reg_index - 32, buffer);
else
/* Write the portion that overlaps the FPR registers. */
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
{
- regcache_raw_write (regcache, tdep->ppc_fp0_regnum +
+ regcache->raw_write (tdep->ppc_fp0_regnum +
reg_index, buffer);
- regcache_raw_write (regcache, tdep->ppc_vsr0_upper_regnum +
+ regcache->raw_write (tdep->ppc_vsr0_upper_regnum +
reg_index, buffer + 8);
}
else
{
- regcache_raw_write (regcache, tdep->ppc_fp0_regnum +
+ regcache->raw_write (tdep->ppc_fp0_regnum +
reg_index, buffer + 8);
- regcache_raw_write (regcache, tdep->ppc_vsr0_upper_regnum +
+ regcache->raw_write (tdep->ppc_vsr0_upper_regnum +
reg_index, buffer);
}
}
if (regnum_is_vxr_full (tdep, regnum))
{
regnum -= tdep->v0_full_regnum;
- regcache_raw_write (regcache, S390_F0_REGNUM + regnum, buf);
- regcache_raw_write (regcache, S390_V0_LOWER_REGNUM + regnum, buf + 8);
+ regcache->raw_write (S390_F0_REGNUM + regnum, buf);
+ regcache->raw_write (S390_V0_LOWER_REGNUM + regnum, buf + 8);
return;
}
{
int i, regnum = R0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache_raw_write (regcache, regnum++, valbuf + i);
+ regcache->raw_write (regnum++, valbuf + i);
}
}
int i, regnum = gdbarch_fp0_regnum (gdbarch);
for (i = 0; i < len; i += 4)
if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_LITTLE)
- regcache_raw_write (regcache, regnum++,
+ regcache->raw_write (regnum++,
valbuf + len - 4 - i);
else
- regcache_raw_write (regcache, regnum++, valbuf + i);
+ regcache->raw_write (regnum++, valbuf + i);
}
else
sh_store_return_value_nofpu (type, regcache, valbuf);
so that a re-read happens next time it's necessary. */
int bregnum;
- regcache_raw_write (regcache, BANK_REGNUM, buffer);
+ regcache->raw_write (BANK_REGNUM, buffer);
for (bregnum = R0_BANK0_REGNUM; bregnum < MACLB_REGNUM; ++bregnum)
regcache_invalidate (regcache, bregnum);
}
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_raw_write (regcache, base_regnum + portion,
+ regcache->raw_write (base_regnum + portion,
(temp_buffer
+ register_size (gdbarch,
base_regnum) * portion));
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_raw_write (regcache, base_regnum + portion,
+ regcache->raw_write (base_regnum + portion,
(buffer
+ register_size (gdbarch,
base_regnum) * portion));
gdb_assert (regnum >= SPARC32_D0_REGNUM && regnum <= SPARC32_D30_REGNUM);
regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC32_D0_REGNUM);
- regcache_raw_write (regcache, regnum, buf);
- regcache_raw_write (regcache, regnum + 1, buf + 4);
+ regcache->raw_write (regnum, buf);
+ regcache->raw_write (regnum + 1, buf + 4);
}
\f
/* Implement the stack_frame_destroyed_p gdbarch method. */
if (regnum >= SPARC64_D0_REGNUM && regnum <= SPARC64_D30_REGNUM)
{
regnum = SPARC_F0_REGNUM + 2 * (regnum - SPARC64_D0_REGNUM);
- regcache_raw_write (regcache, regnum, buf);
- regcache_raw_write (regcache, regnum + 1, buf + 4);
+ regcache->raw_write (regnum, buf);
+ regcache->raw_write (regnum + 1, buf + 4);
}
else if (regnum >= SPARC64_D32_REGNUM && regnum <= SPARC64_D62_REGNUM)
{
regnum = SPARC64_F32_REGNUM + (regnum - SPARC64_D32_REGNUM);
- regcache_raw_write (regcache, regnum, buf);
+ regcache->raw_write (regnum, buf);
}
else if (regnum >= SPARC64_Q0_REGNUM && regnum <= SPARC64_Q28_REGNUM)
{
regnum = SPARC_F0_REGNUM + 4 * (regnum - SPARC64_Q0_REGNUM);
- regcache_raw_write (regcache, regnum, buf);
- regcache_raw_write (regcache, regnum + 1, buf + 4);
- regcache_raw_write (regcache, regnum + 2, buf + 8);
- regcache_raw_write (regcache, regnum + 3, buf + 12);
+ regcache->raw_write (regnum, buf);
+ regcache->raw_write (regnum + 1, buf + 4);
+ regcache->raw_write (regnum + 2, buf + 8);
+ regcache->raw_write (regnum + 3, buf + 12);
}
else if (regnum >= SPARC64_Q32_REGNUM && regnum <= SPARC64_Q60_REGNUM)
{
regnum = SPARC64_F32_REGNUM + 2 * (regnum - SPARC64_Q32_REGNUM);
- regcache_raw_write (regcache, regnum, buf);
- regcache_raw_write (regcache, regnum + 1, buf + 8);
+ regcache->raw_write (regnum, buf);
+ regcache->raw_write (regnum + 1, buf + 8);
}
else if (regnum == SPARC64_CWP_REGNUM
|| regnum == SPARC64_PSTATE_REGNUM
case SPU_SP_REGNUM:
regcache->raw_read (SPU_RAW_SP_REGNUM, reg);
memcpy (reg, buf, 4);
- regcache_raw_write (regcache, SPU_RAW_SP_REGNUM, reg);
+ regcache->raw_write (SPU_RAW_SP_REGNUM, reg);
break;
case SPU_FPSCR_REGNUM:
gdb_byte buf[tilegx_reg_size] = { 0 };
memcpy (buf, valbuf, TYPE_LENGTH (type));
- regcache_raw_write (regcache, TILEGX_R0_REGNUM, buf);
+ regcache->raw_write (TILEGX_R0_REGNUM, buf);
}
else
{
int i, regnum = TILEGX_R0_REGNUM;
for (i = 0; i < len; i += tilegx_reg_size)
- regcache_raw_write (regcache, regnum++, (gdb_byte *) valbuf + i);
+ regcache->raw_write (regnum++, (gdb_byte *) valbuf + i);
}
}
{
int i, regnum = E_V0_REGNUM;
for (i = 0; i < len; i += 4)
- regcache_raw_write (regcache, regnum++, valbuf + i);
+ regcache->raw_write (regnum++, valbuf + i);
}
}
gdb_byte buf[xstormy16_reg_size];
memset (buf, 0, xstormy16_reg_size);
memcpy (buf, valbuf, 1);
- regcache_raw_write (regcache, E_1ST_ARG_REGNUM, buf);
+ regcache->raw_write (E_1ST_ARG_REGNUM, buf);
}
else
{
int i, regnum = E_1ST_ARG_REGNUM;
for (i = 0; i < len; i += xstormy16_reg_size)
- regcache_raw_write (regcache, regnum++, valbuf + i);
+ regcache->raw_write (regnum++, valbuf + i);
}
}
/* We can always write 'core' registers.
Note: We might have converted Ax->ARy. */
if (regnum >= 0 && regnum < gdbarch_num_regs (gdbarch))
- regcache_raw_write (regcache, regnum, buffer);
+ regcache->raw_write (regnum, buffer);
/* We have to find out how to deal with priveleged registers.
Let's treat them as pseudo-registers, but we cannot read/write them. */
}
/* Assume that we can write the register. */
- regcache_raw_write (regcache, regnum, buffer);
+ regcache->raw_write (regnum, buffer);
}
else
internal_error (__FILE__, __LINE__,
if (len < 4)
regcache_raw_write_part (regcache, areg, offset, len, valbuf);
else
- regcache_raw_write (regcache, areg, valbuf);
+ regcache->raw_write (areg, valbuf);
}
}