+ avr_convert_iaddr_to_raw (val));
+}
+
+static enum register_status
+avr_pseudo_register_read (struct gdbarch *gdbarch, readable_regcache *regcache,
+ int regnum, gdb_byte *buf)
+{
+ ULONGEST val;
+ enum register_status status;
+
+ switch (regnum)
+ {
+ case AVR_PSEUDO_PC_REGNUM:
+ status = regcache->raw_read (AVR_PC_REGNUM, &val);
+ if (status != REG_VALID)
+ return status;
+ val >>= 1;
+ store_unsigned_integer (buf, 4, gdbarch_byte_order (gdbarch), val);
+ return status;
+ default:
+ internal_error (__FILE__, __LINE__, _("invalid regnum"));
+ }
+}
+
+static void
+avr_pseudo_register_write (struct gdbarch *gdbarch, struct regcache *regcache,
+ int regnum, const gdb_byte *buf)
+{
+ ULONGEST val;
+
+ switch (regnum)
+ {
+ case AVR_PSEUDO_PC_REGNUM:
+ val = extract_unsigned_integer (buf, 4, gdbarch_byte_order (gdbarch));
+ val <<= 1;
+ regcache_raw_write_unsigned (regcache, AVR_PC_REGNUM, val);
+ break;
+ default:
+ internal_error (__FILE__, __LINE__, _("invalid regnum"));
+ }