1 /* Sequent Symmetry target interface, for GDB.
2 Copyright (C) 1986, 1987, 1989, 1991, 1994 Free Software Foundation, Inc.
4 This file is part of GDB.
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.
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.
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, Boston, MA 02111-1307, USA. */
20 /* many 387-specific items of use taken from i386-dep.c */
28 #include <sys/param.h>
31 #include <sys/ioctl.h>
37 symmetry_extract_return_value(type
, regbuf
, valbuf
)
46 struct minimal_symbol
*msymbol
;
49 if (TYPE_CODE_FLT
== TYPE_CODE(type
)) {
50 msymbol
= lookup_minimal_symbol ("1167_flt", NULL
, NULL
);
51 if (msymbol
!= NULL
) {
52 /* found "1167_flt" means 1167, %fp2-%fp3 */
53 /* float & double; 19= %fp2, 20= %fp3 */
54 /* no single precision on 1167 */
55 xd
.l
[1] = *((int *)®buf
[REGISTER_BYTE(19)]);
56 xd
.l
[0] = *((int *)®buf
[REGISTER_BYTE(20)]);
57 switch (TYPE_LENGTH(type
)) {
59 /* FIXME: broken for cross-debugging. */
61 memcpy (valbuf
, &f
, TYPE_LENGTH(type
));
64 /* FIXME: broken for cross-debugging. */
65 memcpy (valbuf
, &xd
.d
, TYPE_LENGTH(type
));
68 error("Unknown floating point size");
72 /* 387 %st(0), gcc uses this */
73 i387_to_double(((int *)®buf
[REGISTER_BYTE(3)]),
75 switch (TYPE_LENGTH(type
)) {
78 /* FIXME: broken for cross-debugging. */
79 memcpy (valbuf
, &f
, 4);
82 /* FIXME: broken for cross-debugging. */
83 memcpy (valbuf
, &xd
.d
, 8);
86 error("Unknown floating point size");
91 memcpy (valbuf
, regbuf
, TYPE_LENGTH (type
));
This page took 0.039724 seconds and 4 git commands to generate.