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).
9 This file is part of GDB.
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.
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.
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. */
28 #ifndef GDB_TARGET_IS_SPARC64
29 #define GDB_TARGET_IS_SPARC64 1
32 #include "sparc/tm-sparc.h"
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). */
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 ]
58 st %o0, [ %fp + 0x72b ]
60 st %o0, [ %fp + 0x727 ]
62 st %o0, [ %fp + 0x723 ]
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
71 ldx [ %sp + 0x87f ], %o0
78 /* Offsets into jmp_buf.
79 FIXME: This was borrowed from the v8 stuff and will probably have to change
82 #define JB_ELEMENT_SIZE 8 /* Size of each element in jmp_buf */
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
101 extern int get_longjmp_target (CORE_ADDR *);
103 #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
105 #undef TM_PRINT_INSN_MACH
106 #define TM_PRINT_INSN_MACH bfd_mach_sparc_v9a