]>
Commit | Line | Data |
---|---|---|
c906108c SS |
1 | /* Macro defintions for IBM AIX PS/2 (i386). |
2 | Copyright 1986, 1987, 1989, 1992, 1993 Free Software Foundation, Inc. | |
3 | ||
c5aa993b | 4 | This file is part of GDB. |
c906108c | 5 | |
c5aa993b JM |
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. | |
c906108c | 10 | |
c5aa993b JM |
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. | |
c906108c | 15 | |
c5aa993b JM |
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. */ | |
c906108c SS |
20 | |
21 | /* Changes for IBM AIX PS/2 by Minh Tran-Le (tranle@intellicorp.com). */ | |
22 | ||
23 | #ifndef TM_I386AIX_H | |
24 | #define TM_I386AIX_H 1 | |
25 | ||
26 | #include "i386/tm-i386.h" | |
27 | #include <sys/reg.h> | |
28 | ||
29 | #ifndef I386 | |
c5aa993b | 30 | #define I386 1 |
c906108c SS |
31 | #endif |
32 | #ifndef I386_AIX_TARGET | |
c5aa993b | 33 | #define I386_AIX_TARGET 1 |
c906108c SS |
34 | #endif |
35 | ||
36 | /* Nonzero if register N requires conversion | |
37 | from raw format to virtual format. */ | |
38 | ||
39 | #undef REGISTER_CONVERTIBLE | |
40 | #define REGISTER_CONVERTIBLE(N) \ | |
41 | ((N < FP0_REGNUM) ? 0 : 1) | |
42 | ||
43 | /* Convert data from raw format for register REGNUM in buffer FROM | |
44 | to virtual format with type TYPE in buffer TO. */ | |
45 | ||
46 | #undef REGISTER_CONVERT_TO_VIRTUAL | |
47 | #define REGISTER_CONVERT_TO_VIRTUAL(REGNUM,TYPE,FROM,TO) \ | |
48 | { \ | |
49 | double val; \ | |
50 | i387_to_double ((FROM), (char *)&val); \ | |
51 | store_floating ((TO), TYPE_LENGTH (TYPE), val); \ | |
52 | } | |
53 | extern void | |
54 | i387_to_double PARAMS ((char *, char *)); | |
55 | ||
56 | /* Convert data from virtual format with type TYPE in buffer FROM | |
57 | to raw format for register REGNUM in buffer TO. */ | |
58 | ||
59 | #undef REGISTER_CONVERT_TO_RAW | |
60 | #define REGISTER_CONVERT_TO_RAW(TYPE,REGNUM,FROM,TO) \ | |
61 | { \ | |
62 | double val = extract_floating ((FROM), TYPE_LENGTH (TYPE)); \ | |
63 | double_to_i387((char *)&val, (TO)); \ | |
64 | } | |
65 | extern void | |
66 | double_to_i387 PARAMS ((char *, char *)); | |
67 | ||
68 | #endif /* TM_I386AIX_H */ |