GDB (xrefs)
Macros | Functions | Variables
/tmp/gdb-7.10/gdb/i387-tdep.c File Reference
#include "defs.h"
#include "doublest.h"
#include "floatformat.h"
#include "frame.h"
#include "gdbcore.h"
#include "inferior.h"
#include "language.h"
#include "regcache.h"
#include "value.h"
#include "i386-tdep.h"
#include "i387-tdep.h"
#include "x86-xstate.h"

Go to the source code of this file.

Macros

#define FSAVE_ADDR(tdep, fsave, regnum)   (fsave + fsave_offset[regnum - I387_ST0_REGNUM (tdep)])
 
#define FXSAVE_ADDR(tdep, fxsave, regnum)   (fxsave + fxsave_offset[regnum - I387_ST0_REGNUM (tdep)])
 
#define FXSAVE_MXCSR_ADDR(fxsave)   (fxsave + 24)
 
#define XSAVE_XSTATE_BV_ADDR(xsave)   (xsave + 512)
 
#define XSAVE_AVXH_ADDR(tdep, xsave, regnum)   (xsave + xsave_avxh_offset[regnum - I387_YMM0H_REGNUM (tdep)])
 
#define XSAVE_YMM_AVX512_ADDR(tdep, xsave, regnum)   (xsave + xsave_ymm_avx512_offset[regnum - I387_YMM16H_REGNUM (tdep)])
 
#define XSAVE_XMM_AVX512_ADDR(tdep, xsave, regnum)   (xsave + xsave_xmm_avx512_offset[regnum - I387_XMM16_REGNUM (tdep)])
 
#define XSAVE_MPX_ADDR(tdep, xsave, regnum)   (xsave + xsave_mpx_offset[regnum - I387_BND0R_REGNUM (tdep)])
 
#define XSAVE_AVX512_K_ADDR(tdep, xsave, regnum)   (xsave + xsave_avx512_k_offset[regnum - I387_K0_REGNUM (tdep)])
 
#define XSAVE_AVX512_ZMM_H_ADDR(tdep, xsave, regnum)   (xsave + xsave_avx512_zmm_h_offset[regnum - I387_ZMM0H_REGNUM (tdep)])
 

Functions

static void print_i387_value (struct gdbarch *gdbarch, const gdb_byte *raw, struct ui_file *file)
 
static void print_i387_ext (struct gdbarch *gdbarch, const gdb_byte *raw, struct ui_file *file)
 
static void print_i387_status_word (int status_p, unsigned int status, struct ui_file *file)
 
static void print_i387_control_word (int control_p, unsigned int control, struct ui_file *file)
 
void i387_print_float_info (struct gdbarch *gdbarch, struct ui_file *file, struct frame_info *frame, const char *args)
 
int i387_convert_register_p (struct gdbarch *gdbarch, int regnum, struct type *type)
 
int i387_register_to_value (struct frame_info *frame, int regnum, struct type *type, gdb_byte *to, int *optimizedp, int *unavailablep)
 
void i387_value_to_register (struct frame_info *frame, int regnum, struct type *type, const gdb_byte *from)
 
void i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave)
 
void i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave)
 
static int i387_tag (const gdb_byte *raw)
 
void i387_supply_fxsave (struct regcache *regcache, int regnum, const void *fxsave)
 
void i387_collect_fxsave (const struct regcache *regcache, int regnum, void *fxsave)
 
void i387_supply_xsave (struct regcache *regcache, int regnum, const void *xsave)
 
void i387_collect_xsave (const struct regcache *regcache, int regnum, void *xsave, int gcore)
 
void i387_return_value (struct gdbarch *gdbarch, struct regcache *regcache)
 

Variables

static int fsave_offset []
 
static int fxsave_offset []
 
static int xsave_avxh_offset []
 
static int xsave_ymm_avx512_offset []
 
static int xsave_xmm_avx512_offset []
 
static int xsave_mpx_offset []
 
static int xsave_avx512_k_offset []
 
static int xsave_avx512_zmm_h_offset []
 

Macro Definition Documentation

#define FSAVE_ADDR (   tdep,
  fsave,
  regnum 
)    (fsave + fsave_offset[regnum - I387_ST0_REGNUM (tdep)])

Definition at line 438 of file i387-tdep.c.

Referenced by i387_collect_fsave(), and i387_supply_fsave().

#define FXSAVE_ADDR (   tdep,
  fxsave,
  regnum 
)    (fxsave + fxsave_offset[regnum - I387_ST0_REGNUM (tdep)])
#define FXSAVE_MXCSR_ADDR (   fxsave)    (fxsave + 24)
#define XSAVE_AVX512_K_ADDR (   tdep,
  xsave,
  regnum 
)    (xsave + xsave_avx512_k_offset[regnum - I387_K0_REGNUM (tdep)])

Definition at line 845 of file i387-tdep.c.

Referenced by i387_collect_xsave(), and i387_supply_xsave().

#define XSAVE_AVX512_ZMM_H_ADDR (   tdep,
  xsave,
  regnum 
)    (xsave + xsave_avx512_zmm_h_offset[regnum - I387_ZMM0H_REGNUM (tdep)])

Definition at line 888 of file i387-tdep.c.

Referenced by i387_collect_xsave(), and i387_supply_xsave().

#define XSAVE_AVXH_ADDR (   tdep,
  xsave,
  regnum 
)    (xsave + xsave_avxh_offset[regnum - I387_YMM0H_REGNUM (tdep)])

Definition at line 763 of file i387-tdep.c.

Referenced by i387_collect_xsave(), and i387_supply_xsave().

#define XSAVE_MPX_ADDR (   tdep,
  xsave,
  regnum 
)    (xsave + xsave_mpx_offset[regnum - I387_BND0R_REGNUM (tdep)])

Definition at line 826 of file i387-tdep.c.

Referenced by i387_collect_xsave(), and i387_supply_xsave().

#define XSAVE_XMM_AVX512_ADDR (   tdep,
  xsave,
  regnum 
)    (xsave + xsave_xmm_avx512_offset[regnum - I387_XMM16_REGNUM (tdep)])

Definition at line 814 of file i387-tdep.c.

Referenced by i387_collect_xsave(), and i387_supply_xsave().

#define XSAVE_XSTATE_BV_ADDR (   xsave)    (xsave + 512)

Definition at line 737 of file i387-tdep.c.

Referenced by i387_collect_xsave(), and i387_supply_xsave().

#define XSAVE_YMM_AVX512_ADDR (   tdep,
  xsave,
  regnum 
)    (xsave + xsave_ymm_avx512_offset[regnum - I387_YMM16H_REGNUM (tdep)])

Definition at line 791 of file i387-tdep.c.

Referenced by i387_collect_xsave(), and i387_supply_xsave().

Function Documentation

void i387_collect_fsave ( const struct regcache regcache,
int  regnum,
void *  fsave 
)
void i387_collect_fxsave ( const struct regcache regcache,
int  regnum,
void *  fxsave 
)
void i387_collect_xsave ( const struct regcache regcache,
int  regnum,
void *  xsave,
int  gcore 
)
int i387_convert_register_p ( struct gdbarch gdbarch,
int  regnum,
struct type type 
)

Definition at line 338 of file i387-tdep.c.

References i386_fp_regnum_p(), and i387_ext_type().

Referenced by amd64_init_abi(), and i386_convert_register_p().

void i387_print_float_info ( struct gdbarch gdbarch,
struct ui_file file,
struct frame_info frame,
const char *  args 
)
int i387_register_to_value ( struct frame_info frame,
int  regnum,
struct type type,
gdb_byte to,
int optimizedp,
int unavailablep 
)
void i387_return_value ( struct gdbarch gdbarch,
struct regcache regcache 
)
void i387_supply_fsave ( struct regcache regcache,
int  regnum,
const void *  fsave 
)
void i387_supply_fxsave ( struct regcache regcache,
int  regnum,
const void *  fxsave 
)
void i387_supply_xsave ( struct regcache regcache,
int  regnum,
const void *  xsave 
)
static int i387_tag ( const gdb_byte raw)
static

Definition at line 1708 of file i387-tdep.c.

Referenced by i387_supply_fxsave(), and i387_supply_xsave().

void i387_value_to_register ( struct frame_info frame,
int  regnum,
struct type type,
const gdb_byte from 
)
static void print_i387_control_word ( int  control_p,
unsigned int  control,
struct ui_file file 
)
static

Definition at line 154 of file i387-tdep.c.

References _, fprintf_filtered(), fputs_filtered(), and hex_string_custom().

Referenced by i387_print_float_info().

static void print_i387_ext ( struct gdbarch gdbarch,
const gdb_byte raw,
struct ui_file file 
)
static
static void print_i387_status_word ( int  status_p,
unsigned int  status,
struct ui_file file 
)
static

Definition at line 116 of file i387-tdep.c.

References _, fprintf_filtered(), fputs_filtered(), and hex_string_custom().

Referenced by i387_print_float_info().

static void print_i387_value ( struct gdbarch gdbarch,
const gdb_byte raw,
struct ui_file file 
)
static

Definition at line 37 of file i387-tdep.c.

References extract_typed_floating(), fprintf_filtered(), and i387_ext_type().

Referenced by print_i387_ext().

Variable Documentation

int fsave_offset[]
static
Initial value:
=
{
28 + 0 * 10,
28 + 1 * 10,
28 + 2 * 10,
28 + 3 * 10,
28 + 4 * 10,
28 + 5 * 10,
28 + 6 * 10,
28 + 7 * 10,
0,
4,
8,
16,
12,
24,
20,
18
}

Definition at line 418 of file i387-tdep.c.

int fxsave_offset[]
static

Definition at line 541 of file i387-tdep.c.

int xsave_avx512_k_offset[]
static
Initial value:
=
{
1088 + 0 * 8,
1088 + 1 * 8,
1088 + 2 * 8,
1088 + 3 * 8,
1088 + 4 * 8,
1088 + 5 * 8,
1088 + 6 * 8,
1088 + 7 * 8
}

Definition at line 833 of file i387-tdep.c.

int xsave_avx512_zmm_h_offset[]
static

Definition at line 852 of file i387-tdep.c.

int xsave_avxh_offset[]
static
Initial value:
=
{
576 + 0 * 16,
576 + 1 * 16,
576 + 2 * 16,
576 + 3 * 16,
576 + 4 * 16,
576 + 5 * 16,
576 + 6 * 16,
576 + 7 * 16,
576 + 8 * 16,
576 + 9 * 16,
576 + 10 * 16,
576 + 11 * 16,
576 + 12 * 16,
576 + 13 * 16,
576 + 14 * 16,
576 + 15 * 16
}

Definition at line 743 of file i387-tdep.c.

int xsave_mpx_offset[]
static
Initial value:
= {
960 + 0 * 16,
960 + 1 * 16,
960 + 2 * 16,
960 + 3 * 16,
1024 + 0 * 8,
1024 + 1 * 8,
}

Definition at line 817 of file i387-tdep.c.

int xsave_xmm_avx512_offset[]
static
Initial value:
=
{
1664 + 0 * 64,
1664 + 1 * 64,
1664 + 2 * 64,
1664 + 3 * 64,
1664 + 4 * 64,
1664 + 5 * 64,
1664 + 6 * 64,
1664 + 7 * 64,
1664 + 8 * 64,
1664 + 9 * 64,
1664 + 10 * 64,
1664 + 11 * 64,
1664 + 12 * 64,
1664 + 13 * 64,
1664 + 14 * 64,
1664 + 15 * 64
}

Definition at line 794 of file i387-tdep.c.

int xsave_ymm_avx512_offset[]
static
Initial value:
=
{
1664 + 16 + 0 * 64,
1664 + 16 + 1 * 64,
1664 + 16 + 2 * 64,
1664 + 16 + 3 * 64,
1664 + 16 + 4 * 64,
1664 + 16 + 5 * 64,
1664 + 16 + 6 * 64,
1664 + 16 + 7 * 64,
1664 + 16 + 8 * 64,
1664 + 16 + 9 * 64,
1664 + 16 + 10 * 64,
1664 + 16 + 11 * 64,
1664 + 16 + 12 * 64,
1664 + 16 + 13 * 64,
1664 + 16 + 14 * 64,
1664 + 16 + 15 * 64
}

Definition at line 770 of file i387-tdep.c.