* config/i386/fbsd64.mt (TDEPFILES): Add corelow.o.
[deliverable/binutils-gdb.git] / gdb / config / sparc / tm-sp64.h
1 /* Target machine sub-parameters for SPARC64, for GDB, the GNU debugger.
2 This is included by other tm-*.h files to define SPARC64 cpu-related info.
3 Copyright 1994, 1995, 1996, 1998, 1999, 2000
4 Free Software Foundation, Inc.
5 This is (obviously) based on the SPARC Vn (n<9) port.
6 Contributed by Doug Evans (dje@cygnus.com).
7 Further modified by Bob Manson (manson@cygnus.com).
8
9 This file is part of GDB.
10
11 This program is free software; you can redistribute it and/or modify
12 it under the terms of the GNU General Public License as published by
13 the Free Software Foundation; either version 2 of the License, or
14 (at your option) any later version.
15
16 This program is distributed in the hope that it will be useful,
17 but WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 GNU General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, write to the Free Software
23 Foundation, Inc., 59 Temple Place - Suite 330,
24 Boston, MA 02111-1307, USA. */
25
26 struct type;
27
28 #ifndef GDB_TARGET_IS_SPARC64
29 #define GDB_TARGET_IS_SPARC64 1
30 #endif
31
32 #include "sparc/tm-sparc.h"
33
34 /* Eeeew. Ok, we have to assume (for now) that the processor really is
35 in sparc64 mode. While this is the same instruction sequence as
36 on the Sparc, the stack frames are offset by +2047 (and the arguments
37 are 8 bytes instead of 4). */
38 /* Instructions are:
39 std %f10, [ %fp + 0x7a7 ]
40 std %f8, [ %fp + 0x79f ]
41 std %f6, [ %fp + 0x797 ]
42 std %f4, [ %fp + 0x78f ]
43 std %f2, [ %fp + 0x787 ]
44 std %f0, [ %fp + 0x77f ]
45 std %g6, [ %fp + 0x777 ]
46 std %g4, [ %fp + 0x76f ]
47 std %g2, [ %fp + 0x767 ]
48 std %g0, [ %fp + 0x75f ]
49 std %fp, [ %fp + 0x757 ]
50 std %i4, [ %fp + 0x74f ]
51 std %i2, [ %fp + 0x747 ]
52 std %i0, [ %fp + 0x73f ]
53 nop
54 nop
55 nop
56 nop
57 rd %tbr, %o0
58 st %o0, [ %fp + 0x72b ]
59 rd %tpc, %o0
60 st %o0, [ %fp + 0x727 ]
61 rd %psr, %o0
62 st %o0, [ %fp + 0x723 ]
63 rd %y, %o0
64 st %o0, [ %fp + 0x71f ]
65 ldx [ %sp + 0x8a7 ], %o5
66 ldx [ %sp + 0x89f ], %o4
67 ldx [ %sp + 0x897 ], %o3
68 ldx [ %sp + 0x88f ], %o2
69 ldx [ %sp + 0x887 ], %o1
70 call %g0
71 ldx [ %sp + 0x87f ], %o0
72 nop
73 ta 1
74 nop
75 nop
76 */
77
78 /* Offsets into jmp_buf.
79 FIXME: This was borrowed from the v8 stuff and will probably have to change
80 for v9. */
81
82 #define JB_ELEMENT_SIZE 8 /* Size of each element in jmp_buf */
83
84 #define JB_ONSSTACK 0
85 #define JB_SIGMASK 1
86 #define JB_SP 2
87 #define JB_PC 3
88 #define JB_NPC 4
89 #define JB_PSR 5
90 #define JB_G1 6
91 #define JB_O0 7
92 #define JB_WBCNT 8
93
94 /* Figure out where the longjmp will land. We expect that we have
95 just entered longjmp and haven't yet setup the stack frame, so the
96 args are still in the output regs. %o0 (O0_REGNUM) points at the
97 jmp_buf structure from which we extract the pc (JB_PC) that we will
98 land at. The pc is copied into ADDR. This routine returns true on
99 success */
100
101 extern int get_longjmp_target (CORE_ADDR *);
102
103 #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
104
105 #undef TM_PRINT_INSN_MACH
106 #define TM_PRINT_INSN_MACH bfd_mach_sparc_v9a
107
This page took 0.030707 seconds and 4 git commands to generate.