]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/i387-tdep.h
core: Support fetching x86 XSAVE layout from architectures.
[thirdparty/binutils-gdb.git] / gdb / i387-tdep.h
index 2e890e71a2b10e6ab75c3de8e847788ec2bb3168..f7557b01899f45da302ddfc679d88b93b7a70299 100644 (file)
@@ -25,6 +25,7 @@ class frame_info_ptr;
 struct regcache;
 struct type;
 struct ui_file;
+struct x86_xsave_layout;
 
 /* Number of i387 floating point registers.  */
 #define I387_NUM_REGS  16
@@ -138,6 +139,13 @@ extern void i387_collect_fsave (const struct regcache *regcache, int regnum,
 extern void i387_supply_fxsave (struct regcache *regcache, int regnum,
                                const void *fxsave);
 
+/* Select an XSAVE layout based on the XCR0 bitmask and total XSAVE
+   extended state size.  Returns true if the bitmask and size matched
+   a known layout.  */
+
+extern bool i387_guess_xsave_layout (uint64_t xcr0, size_t xsave_size,
+                                    x86_xsave_layout &layout);
+
 /* Similar to i387_supply_fxsave, but use XSAVE extended state.  */
 
 extern void i387_supply_xsave (struct regcache *regcache, int regnum,