import gdb-1999-11-16 snapshot
[deliverable/binutils-gdb.git] / gdb / config / i386 / tm-go32.h
CommitLineData
e49d4fa6
SS
1/* Target-dependent definitions for Intel x86 running DJGPP.
2 Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
3
c5aa993b
JM
4 This file is part of GDB.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
e49d4fa6 20
4ce44c66
JM
21#undef HAVE_SSE_REGS /* FIXME! go32-nat.c needs to support XMMi registers */
22#define HAVE_I387_REGS
23
24#include "i386/tm-i386.h"
e49d4fa6
SS
25
26/* The host and target are i386 machines and the compiler supports
27 long doubles. Long doubles on the host therefore have the same
28 layout as a 387 FPU stack register. */
29
30#if defined(HAVE_LONG_DOUBLE) && defined(HOST_I386)
31#undef LD_I387
32#define LD_I387
33#endif
34
35/* Allow floating point numbers to be specified by a raw long double
36 10 hex bytes number, e.g. 1.0 can be input as
37 0x3fff8000000000000000 */
38
39#ifdef LD_I387
40#define HEX_LONG_DOUBLE_INPUT(base,p,len,target) \
41 ((base) == 16 && (len) == 20 \
42 && i387_hex_long_double_input ((p), (target)))
43#endif
44
45extern int i387_hex_long_double_input (char *p, long double *putithere);
46
4ce44c66
JM
47#ifdef LD_I387 /* otherwise, definitions from tm-i386.h are good enough */
48
e49d4fa6 49#undef REGISTER_CONVERT_TO_VIRTUAL
4ce44c66
JM
50#define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \
51{ \
52 long double val = *((long double *)(FROM)); \
53 store_floating ((TO), TYPE_LENGTH (TYPE), val); \
e49d4fa6 54}
e49d4fa6
SS
55
56#undef REGISTER_CONVERT_TO_RAW
4ce44c66
JM
57#define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \
58{ \
59 long double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \
60 *((long double *)(TO)) = val; \
e49d4fa6 61}
e49d4fa6 62
4ce44c66
JM
63/* Return the GDB type object for the "standard" data type of data in
64 register N. Perhaps si and di should go here, but potentially they
65 could be used for things other than address. */
e49d4fa6 66
4ce44c66
JM
67#define REGISTER_VIRTUAL_TYPE(N) \
68 (((N) == PC_REGNUM || (N) == FP_REGNUM || (N) == SP_REGNUM) \
69 ? lookup_pointer_type (builtin_type_void) \
70 : IS_FP_REGNUM(N) ? builtin_type_long_double \
71 : IS_SSE_REGNUM(N) ? builtin_type_v4sf \
72 : builtin_type_int)
e49d4fa6 73
4ce44c66 74#endif /* LD_I387 */
e49d4fa6
SS
75
76#undef TARGET_LONG_DOUBLE_BIT
77#define TARGET_LONG_DOUBLE_BIT 96
This page took 0.035577 seconds and 4 git commands to generate.