Allow integer immediates for AArch64 fmov instructions.
[deliverable/binutils-gdb.git] / gdb / sparc-nat.h
index 6960d3dda87bbed7d1d1e0105c0646800b4f224a..b564c01fedee24688e9e15b4e3ba6d83ca014ccb 100644 (file)
@@ -39,14 +39,43 @@ extern int (*sparc_fpregset_supplies_p) (struct gdbarch *gdbarch, int);
 extern int sparc32_gregset_supplies_p (struct gdbarch *gdbarch, int regnum);
 extern int sparc32_fpregset_supplies_p (struct gdbarch *gdbarch, int regnum);
 
-/* Create a prototype generic SPARC target.  The client can override
+extern void sparc_fetch_inferior_registers (struct regcache *, int);
+extern void sparc_store_inferior_registers (struct regcache *, int);
+
+extern target_xfer_status sparc_xfer_wcookie (enum target_object object,
+                                             const char *annex,
+                                             gdb_byte *readbuf,
+                                             const gdb_byte *writebuf,
+                                             ULONGEST offset,
+                                             ULONGEST len,
+                                             ULONGEST *xfered_len);
+
+/* A prototype generic SPARC target.  The client can override
    it with local methods.  */
 
-extern struct target_ops *sparc_target (void);
+template<typename BaseTarget>
+struct sparc_target : public BaseTarget
+{
+  void fetch_registers (struct regcache *regcache, int regnum) override
+  { sparc_fetch_inferior_registers (regcache, regnum); }
+
+  void store_registers (struct regcache *regcache, int regnum) override
+  { sparc_store_inferior_registers (regcache, regnum); }
+
+  enum target_xfer_status xfer_partial (enum target_object object,
+                                       const char *annex,
+                                       gdb_byte *readbuf,
+                                       const gdb_byte *writebuf,
+                                       ULONGEST offset, ULONGEST len,
+                                       ULONGEST *xfered_len) override
+  {
+    if (object == TARGET_OBJECT_WCOOKIE)
+      return sparc_xfer_wcookie (object, annex, readbuf, writebuf,
+                                offset, len, xfered_len);
 
-extern void sparc_fetch_inferior_registers (struct target_ops *,
-                                           struct regcache *, int);
-extern void sparc_store_inferior_registers (struct target_ops *,
-                                           struct regcache *, int);
+    return BaseTarget (object, annex, readbuf, writebuf,
+                      offset, len, xfered_len);
+  }
+};
 
 #endif /* sparc-nat.h */
This page took 0.023802 seconds and 4 git commands to generate.