aboutsummaryrefslogtreecommitdiff
path: root/gdb/symm-tdep.c
blob: 21c843680e1c32e4bbd221ba7dd54d465d68b7f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
// OBSOLETE /* Sequent Symmetry target interface, for GDB.
// OBSOLETE    Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994, 1995, 2000
// OBSOLETE    Free Software Foundation, Inc.
// OBSOLETE 
// OBSOLETE    This file is part of GDB.
// OBSOLETE 
// OBSOLETE    This program is free software; you can redistribute it and/or modify
// OBSOLETE    it under the terms of the GNU General Public License as published by
// OBSOLETE    the Free Software Foundation; either version 2 of the License, or
// OBSOLETE    (at your option) any later version.
// OBSOLETE 
// OBSOLETE    This program is distributed in the hope that it will be useful,
// OBSOLETE    but WITHOUT ANY WARRANTY; without even the implied warranty of
// OBSOLETE    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// OBSOLETE    GNU General Public License for more details.
// OBSOLETE 
// OBSOLETE    You should have received a copy of the GNU General Public License
// OBSOLETE    along with this program; if not, write to the Free Software
// OBSOLETE    Foundation, Inc., 59 Temple Place - Suite 330,
// OBSOLETE    Boston, MA 02111-1307, USA.  */
// OBSOLETE 
// OBSOLETE /* many 387-specific items of use taken from i386-dep.c */
// OBSOLETE 
// OBSOLETE #include "defs.h"
// OBSOLETE #include "frame.h"
// OBSOLETE #include "inferior.h"
// OBSOLETE #include "symtab.h"
// OBSOLETE 
// OBSOLETE #include <signal.h>
// OBSOLETE #include <sys/param.h>
// OBSOLETE #include <sys/user.h>
// OBSOLETE #include <sys/dir.h>
// OBSOLETE #include <sys/ioctl.h>
// OBSOLETE #include "gdb_stat.h"
// OBSOLETE #include "gdbcore.h"
// OBSOLETE #include <fcntl.h>
// OBSOLETE 
// OBSOLETE void
// OBSOLETE symmetry_extract_return_value (struct type *type, char *regbuf, char *valbuf)
// OBSOLETE {
// OBSOLETE   union
// OBSOLETE     {
// OBSOLETE       double d;
// OBSOLETE       int l[2];
// OBSOLETE     }
// OBSOLETE   xd;
// OBSOLETE   struct minimal_symbol *msymbol;
// OBSOLETE   float f;
// OBSOLETE 
// OBSOLETE   if (TYPE_CODE_FLT == TYPE_CODE (type))
// OBSOLETE     {
// OBSOLETE       msymbol = lookup_minimal_symbol ("1167_flt", NULL, NULL);
// OBSOLETE       if (msymbol != NULL)
// OBSOLETE 	{
// OBSOLETE 	  /* found "1167_flt" means 1167, %fp2-%fp3 */
// OBSOLETE 	  /* float & double; 19= %fp2, 20= %fp3 */
// OBSOLETE 	  /* no single precision on 1167 */
// OBSOLETE 	  xd.l[1] = *((int *) &regbuf[REGISTER_BYTE (19)]);
// OBSOLETE 	  xd.l[0] = *((int *) &regbuf[REGISTER_BYTE (20)]);
// OBSOLETE 	  switch (TYPE_LENGTH (type))
// OBSOLETE 	    {
// OBSOLETE 	    case 4:
// OBSOLETE 	      /* FIXME: broken for cross-debugging.  */
// OBSOLETE 	      f = (float) xd.d;
// OBSOLETE 	      memcpy (valbuf, &f, TYPE_LENGTH (type));
// OBSOLETE 	      break;
// OBSOLETE 	    case 8:
// OBSOLETE 	      /* FIXME: broken for cross-debugging.  */
// OBSOLETE 	      memcpy (valbuf, &xd.d, TYPE_LENGTH (type));
// OBSOLETE 	      break;
// OBSOLETE 	    default:
// OBSOLETE 	      error ("Unknown floating point size");
// OBSOLETE 	      break;
// OBSOLETE 	    }
// OBSOLETE 	}
// OBSOLETE       else
// OBSOLETE 	{
// OBSOLETE 	  /* 387 %st(0), gcc uses this */
// OBSOLETE 	  i387_to_double (((int *) &regbuf[REGISTER_BYTE (3)]),
// OBSOLETE 			  &xd.d);
// OBSOLETE 	  switch (TYPE_LENGTH (type))
// OBSOLETE 	    {
// OBSOLETE 	    case 4:		/* float */
// OBSOLETE 	      f = (float) xd.d;
// OBSOLETE 	      /* FIXME: broken for cross-debugging.  */
// OBSOLETE 	      memcpy (valbuf, &f, 4);
// OBSOLETE 	      break;
// OBSOLETE 	    case 8:		/* double */
// OBSOLETE 	      /* FIXME: broken for cross-debugging.  */
// OBSOLETE 	      memcpy (valbuf, &xd.d, 8);
// OBSOLETE 	      break;
// OBSOLETE 	    default:
// OBSOLETE 	      error ("Unknown floating point size");
// OBSOLETE 	      break;
// OBSOLETE 	    }
// OBSOLETE 	}
// OBSOLETE     }
// OBSOLETE   else
// OBSOLETE     {
// OBSOLETE       memcpy (valbuf, regbuf, TYPE_LENGTH (type));
// OBSOLETE     }
// OBSOLETE }