* i387-tdep.h: Update copyright date.
[platform/upstream/binutils.git] / gdb / i387-tdep.h
1 /* Target-dependent code for the i387.
2
3    Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
4
5    This file is part of GDB.
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 2 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program; if not, write to the Free Software
19    Foundation, Inc., 59 Temple Place - Suite 330,
20    Boston, MA 02111-1307, USA.  */
21
22 #ifndef I387_TDEP_H
23 #define I387_TDEP_H
24
25 struct gdbarch;
26 struct ui_file;
27 struct frame_info;
28 struct type;
29
30 /* Print out the i387 floating point state.  */
31
32 extern void i387_print_float_info (struct gdbarch *gdbarch,
33                                    struct ui_file *file,
34                                    struct frame_info *frame,
35                                    const char *args);
36
37 /* Read a value of type TYPE from register REGNUM in frame FRAME, and
38    return its contents in TO.  */
39
40 extern void i387_register_to_value (struct frame_info *frame, int regnum,
41                                     struct type *type, void *to);
42
43 /* Write the contents FROM of a value of type TYPE into register
44    REGNUM in frame FRAME.  */
45
46 extern void i387_value_to_register (struct frame_info *frame, int regnum,
47                                     struct type *type, const void *from);
48 \f
49
50 /* Size of the memory area use by the 'fsave' and 'fxsave'
51    instructions.  */
52 #define I387_SIZEOF_FSAVE       108
53 #define I387_SIZEOF_FXSAVE      512
54
55 /* Fill register REGNUM in GDB's register cache with the appropriate
56    value from *FSAVE.  This function masks off any of the reserved
57    bits in *FSAVE.  */
58
59 extern void i387_supply_fsave (const char *fsave, int regnum);
60
61 /* Fill register REGNUM (if it is a floating-point register) in *FSAVE
62    with the value in GDB's register cache.  If REGNUM is -1, do this
63    for all registers.  This function doesn't touch any of the reserved
64    bits in *FSAVE.  */
65
66 extern void i387_fill_fsave (char *fsave, int regnum);
67
68 /* Fill register REGNUM in GDB's register cache with the appropriate
69    floating-point or SSE register value from *FXSAVE.  This function
70    masks off any of the reserved bits in *FXSAVE.  */
71
72 extern void i387_supply_fxsave (const char *fxsave, int regnum);
73
74 /* Fill register REGNUM (if it is a floating-point or SSE register) in
75    *FXSAVE with the value in GDB's register cache.  If REGNUM is -1, do
76    this for all registers.  This function doesn't touch any of the
77    reserved bits in *FXSAVE.  */
78
79 extern void i387_fill_fxsave (char *fxsave, int regnum);
80
81 #endif /* i387-tdep.h */