}
#endif
/* Note: must use write_register_gen here instead
- of regcache_write, because regcache_write works
- only for real registers, not pseudo.
- write_register_gen will call the gdbarch
- function to do register writes, and that will
- properly know how to deal with pseudoregs. */
+ of regcache_raw_write, because
+ regcache_raw_write works only for real
+ registers, not pseudo. write_register_gen will
+ call the gdbarch function to do register
+ writes, and that will properly know how to deal
+ with pseudoregs. */
write_register_gen (regnum, val);
fp_args[double_arg_index] = 1;
fp_args[double_arg_index + 1] = 1;
/* Build the value in the provided buffer. */
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_read (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh4_register_convert_to_virtual (reg_nr,
REGISTER_VIRTUAL_TYPE (reg_nr),
/* Read the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (current_regcache, base_regnum + portion,
+ buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
}
}
{
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_read (current_regcache, reg_nr, buffer);
+ regcache_raw_read (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh_pseudo_register_read (reg_nr, buffer);
/* DR regs are double precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_read (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
/* FPP regs are pairs of single precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (current_regcache, base_regnum + portion,
+ (buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FV0_REGNUM
/* FV regs are vectors of single precision registers obtained by
concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (current_regcache, base_regnum + portion,
+ (buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
/* sh compact pseudo registers. 1-to-1 with a shmedia register */
base_regnum = sh64_compact_reg_base_num (reg_nr);
/* Build the value in the provided buffer. */
- regcache_read (current_regcache, base_regnum, temp_buffer);
+ regcache_raw_read (current_regcache, base_regnum, temp_buffer);
if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
offset = 4;
memcpy (buffer, temp_buffer + offset, 4); /* get LOWER 32 bits only????*/
/* Build the value in the provided buffer. */
/* Floating point registers map 1-1 to the media fp regs,
they have the same size and endienness. */
- regcache_read (current_regcache, base_regnum, buffer);
+ regcache_raw_read (current_regcache, base_regnum, buffer);
}
else if (reg_nr >= tdep->DR0_C_REGNUM
/* DR_C regs are double precision registers obtained by
concatenating 2 single precision floating point registers. */
for (portion = 0; portion < 2; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_read (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
/* We must pay attention to the endiannes. */
sh_sh64_register_convert_to_virtual (reg_nr, REGISTER_VIRTUAL_TYPE (reg_nr),
/* FV_C regs are vectors of single precision registers obtained by
concatenating 4 single precision floating point registers. */
for (portion = 0; portion < 4; portion++)
- regcache_read (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_read (current_regcache, base_regnum + portion,
+ (buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr == tdep->FPSCR_C_REGNUM)
*/
/* *INDENT-ON* */
/* Get FPSCR into a local buffer */
- regcache_read (current_regcache, fpscr_base_regnum, temp_buffer);
+ regcache_raw_read (current_regcache, fpscr_base_regnum, temp_buffer);
/* Get value as an int. */
fpscr_value = extract_unsigned_integer (temp_buffer, 4);
/* Get SR into a local buffer */
- regcache_read (current_regcache, sr_base_regnum, temp_buffer);
+ regcache_raw_read (current_regcache, sr_base_regnum, temp_buffer);
/* Get value as an int. */
sr_value = extract_unsigned_integer (temp_buffer, 4);
/* Build the new value. */
/* FPUL_C register is floating point register 32,
same size, same endianness. */
- regcache_read (current_regcache, base_regnum, buffer);
+ regcache_raw_read (current_regcache, base_regnum, buffer);
}
}
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_read (current_regcache, reg_nr, buffer);
+ regcache_raw_read (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh64_pseudo_register_read (reg_nr, buffer);
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_write (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FV0_REGNUM
&& reg_nr <= tdep->FV_LAST_REGNUM)
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (current_regcache, base_regnum + portion,
+ (buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
{
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_write (current_regcache, reg_nr, buffer);
+ regcache_raw_write (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh_pseudo_register_write (reg_nr, buffer);
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_write (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FPP0_REGNUM
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 2; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (current_regcache, base_regnum + portion,
+ (buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
else if (reg_nr >= tdep->FV0_REGNUM
/* Write the real regs for which this one is an alias. */
for (portion = 0; portion < 4; portion++)
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (current_regcache, base_regnum + portion,
+ (buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
/* sh compact general pseudo registers. 1-to-1 with a shmedia
/* Let's read the value of the base register into a temporary
buffer, so that overwriting the last four bytes with the new
value of the pseudo will leave the upper 4 bytes unchanged. */
- regcache_read (current_regcache, base_regnum, temp_buffer);
+ regcache_raw_read (current_regcache, base_regnum, temp_buffer);
/* Write as an 8 byte quantity */
memcpy (temp_buffer + offset, buffer, 4);
- regcache_write (current_regcache, base_regnum, temp_buffer);
+ regcache_raw_write (current_regcache, base_regnum, temp_buffer);
}
/* sh floating point compact pseudo registers. 1-to-1 with a shmedia
&& reg_nr <= tdep->FP_LAST_C_REGNUM)
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- regcache_write (current_regcache, base_regnum, buffer);
+ regcache_raw_write (current_regcache, base_regnum, buffer);
}
else if (reg_nr >= tdep->DR0_C_REGNUM
sh_sh64_register_convert_to_raw (REGISTER_VIRTUAL_TYPE (reg_nr), reg_nr,
buffer, temp_buffer);
- regcache_write (current_regcache, base_regnum + portion,
- (temp_buffer
- + REGISTER_RAW_SIZE (base_regnum) * portion));
+ regcache_raw_write (current_regcache, base_regnum + portion,
+ (temp_buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
for (portion = 0; portion < 4; portion++)
{
- regcache_write (current_regcache, base_regnum + portion,
- buffer + REGISTER_RAW_SIZE (base_regnum) * portion);
+ regcache_raw_write (current_regcache, base_regnum + portion,
+ (buffer
+ + REGISTER_RAW_SIZE (base_regnum) * portion));
}
}
fpscr_value = fpscr_c_value & fpscr_mask;
sr_value = (fpscr_value & sr_mask) >> 6;
- regcache_read (current_regcache, fpscr_base_regnum, temp_buffer);
+ regcache_raw_read (current_regcache, fpscr_base_regnum, temp_buffer);
old_fpscr_value = extract_unsigned_integer (temp_buffer, 4);
old_fpscr_value &= 0xfffc0002;
fpscr_value |= old_fpscr_value;
store_unsigned_integer (temp_buffer, 4, fpscr_value);
- regcache_write (current_regcache, fpscr_base_regnum, temp_buffer);
+ regcache_raw_write (current_regcache, fpscr_base_regnum, temp_buffer);
- regcache_read (current_regcache, sr_base_regnum, temp_buffer);
+ regcache_raw_read (current_regcache, sr_base_regnum, temp_buffer);
old_sr_value = extract_unsigned_integer (temp_buffer, 4);
old_sr_value &= 0xffff8fff;
sr_value |= old_sr_value;
store_unsigned_integer (temp_buffer, 4, sr_value);
- regcache_write (current_regcache, sr_base_regnum, temp_buffer);
+ regcache_raw_write (current_regcache, sr_base_regnum, temp_buffer);
}
else if (reg_nr == tdep->FPUL_C_REGNUM)
{
base_regnum = sh64_compact_reg_base_num (reg_nr);
- regcache_write (current_regcache, base_regnum, buffer);
+ regcache_raw_write (current_regcache, base_regnum, buffer);
}
}
{
if (reg_nr >= 0 && reg_nr < gdbarch_tdep (current_gdbarch)->DR0_REGNUM)
/* It is a regular register. */
- regcache_write (current_regcache, reg_nr, buffer);
+ regcache_raw_write (current_regcache, reg_nr, buffer);
else
/* It is a pseudo register and we need to construct its value */
sh64_pseudo_register_write (reg_nr, buffer);