+ return (enum gdb_signal) sig;
+}
+
+/* Set the register designated by REGNO to the value designated by VALUE. */
+
+static void
+mips_set_register (int regno, ULONGEST value)
+{
+ gdb_byte buf[MAX_REGISTER_SIZE];
+ struct regcache *regcache = get_current_regcache ();
+ struct gdbarch *gdbarch = get_regcache_arch (regcache);
+ enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
+
+ /* We got the number the register holds, but gdb expects to see a
+ value in the target byte ordering. */
+
+ if (mips_monitor != MON_ROCKHOPPER
+ && (regno == mips_regnum (gdbarch)->pc || regno < 32))
+ /* Some 64-bit boards have monitors that only send the bottom 32 bits.
+ In such cases we can only really debug 32-bit code properly so,
+ when reading a GPR or the PC, assume that the full 64-bit
+ value is the sign extension of the lower 32 bits. */
+ store_signed_integer (buf, register_size (gdbarch, regno), byte_order,
+ value);
+ else
+ store_unsigned_integer (buf, register_size (gdbarch, regno), byte_order,
+ value);
+
+ regcache_raw_supply (regcache, regno, buf);