1a73cc96db4c3f64cdbd986f5a5947b8c7d3dd4c
[deliverable/binutils-gdb.git] / gdb / config / sparc / tm-sparclet.h
1 /* Target machine definitions for GDB for an embedded SPARC.
2 Copyright 1989, 1992, 1993 Free Software Foundation, Inc.
3
4 This file is part of GDB.
5
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.
10
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.
15
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. */
19
20 #include "sparc/tm-sparc.h"
21
22 #define TARGET_SPARCLET 1
23
24 /* overrides of tm-sparc.h */
25
26 /* Initializer for an array of names of registers.
27 There should be NUM_REGS strings in this initializer. */
28 /* Sparclet has no fp! */
29 /* Compiler maps types for floats by number, so can't
30 change the numbers here. */
31
32 #undef REGISTER_NAMES
33 /* g0 removed - Sparclet returns error if attempt to access. */
34 /* psr removed - Sparclet does not return ": " in response,
35 the monitor is therefore unable to get the expected response delimiter,
36 causing a timeout. */
37 #define REGISTER_NAMES \
38 { "", "g1", "g2", "g3", "g4", "g5", "g6", "g7", \
39 "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", \
40 "l0", "l1", "l2", "l3", "l4", "l5", "l6", "l7", \
41 "i0", "i1", "i2", "i3", "i4", "i5", "i6", "i7", \
42 \
43 0, 0, 0, 0, 0, 0, 0, 0, \
44 0, 0, 0, 0, 0, 0, 0, 0, \
45 0, 0, 0, 0, 0, 0, 0, 0, \
46 0, 0, 0, 0, 0, 0, 0, 0, \
47 \
48 "y", 0, "wim", "tbr", "pc", "npc", 0, 0 }
49
50 /* Remove FP dependant code which was defined in tm-sparc.h */
51 #undef FP0_REGNUM /* Floating point register 0 */
52 #undef FPS_REGNUM /* Floating point status register */
53 #undef CPS_REGNUM /* Coprocessor status register */
54
55 #undef EXTRACT_RETURN_VALUE
56 #define EXTRACT_RETURN_VALUE(TYPE,REGBUF,VALBUF) \
57 { \
58 memcpy ((VALBUF), \
59 (char *)(REGBUF) + REGISTER_RAW_SIZE (O0_REGNUM) * 8 + \
60 (TYPE_LENGTH(TYPE) >= REGISTER_RAW_SIZE (O0_REGNUM) \
61 ? 0 : REGISTER_RAW_SIZE (O0_REGNUM) - TYPE_LENGTH(TYPE)), \
62 TYPE_LENGTH(TYPE)); \
63 }
64 #undef STORE_RETURN_VALUE
65 #define STORE_RETURN_VALUE(TYPE,VALBUF) \
66 { \
67 /* Other values are returned in register %o0. */ \
68 write_register_bytes (REGISTER_BYTE (O0_REGNUM), (VALBUF), \
69 TYPE_LENGTH (TYPE)); \
70 }
71 #undef PRINT_REGISTER_HOOK
72 #define PRINT_REGISTER_HOOK(regno)
73
74 /* Override the standard gdb prompt when compiled for this target. */
75
76 #define DEFAULT_PROMPT "(gdbslet) "
77
78 /* Offsets into jmp_buf. Not defined by Sun, but at least documented in a
79 comment in <machine/setjmp.h>! */
80
81 #define JB_ELEMENT_SIZE 4 /* Size of each element in jmp_buf */
82
83 #define JB_ONSSTACK 0
84 #define JB_SIGMASK 1
85 #define JB_SP 2
86 #define JB_PC 3
87 #define JB_NPC 4
88 #define JB_PSR 5
89 #define JB_G1 6
90 #define JB_O0 7
91 #define JB_WBCNT 8
92
93 /* Figure out where the longjmp will land. We expect that we have just entered
94 longjmp and haven't yet setup the stack frame, so the args are still in the
95 output regs. %o0 (O0_REGNUM) points at the jmp_buf structure from which we
96 extract the pc (JB_PC) that we will land at. The pc is copied into ADDR.
97 This routine returns true on success */
98
99 extern int
100 get_longjmp_target PARAMS ((CORE_ADDR *));
101
102 #define GET_LONGJMP_TARGET(ADDR) get_longjmp_target(ADDR)
This page took 0.032345 seconds and 3 git commands to generate.