xref: /openbsd-src/gnu/usr.bin/gcc/gcc/config/sparc/litecoff.h (revision c87b03e512fc05ed6e0222f6fb0ae86264b1d05b)
1*c87b03e5Sespie /* Definitions of target machine for GNU compiler, for SPARClite w/o FPU, COFF.
2*c87b03e5Sespie    Copyright (C) 1994, 1996, 2000, 2002 Free Software Foundation, Inc.
3*c87b03e5Sespie    Written by Ken Raeburn (raeburn@cygnus.com).
4*c87b03e5Sespie 
5*c87b03e5Sespie This file is part of GNU CC.
6*c87b03e5Sespie 
7*c87b03e5Sespie GNU CC is free software; you can redistribute it and/or modify
8*c87b03e5Sespie it under the terms of the GNU General Public License as published by
9*c87b03e5Sespie the Free Software Foundation; either version 2, or (at your option)
10*c87b03e5Sespie any later version.
11*c87b03e5Sespie 
12*c87b03e5Sespie GNU CC is distributed in the hope that it will be useful,
13*c87b03e5Sespie but WITHOUT ANY WARRANTY; without even the implied warranty of
14*c87b03e5Sespie MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15*c87b03e5Sespie GNU General Public License for more details.
16*c87b03e5Sespie 
17*c87b03e5Sespie You should have received a copy of the GNU General Public License
18*c87b03e5Sespie along with GNU CC; see the file COPYING.  If not, write to
19*c87b03e5Sespie the Free Software Foundation, 59 Temple Place - Suite 330,
20*c87b03e5Sespie Boston, MA 02111-1307, USA.  */
21*c87b03e5Sespie 
22*c87b03e5Sespie #define BSS_SECTION_ASM_OP	"\t.section\t\".bss\""
23*c87b03e5Sespie 
24*c87b03e5Sespie #undef CPP_PREDEFINES
25*c87b03e5Sespie #define CPP_PREDEFINES "-Dsparc -Dsparclite -Acpu=sparc -Amachine=sparc"
26*c87b03e5Sespie 
27*c87b03e5Sespie /* Default to stabs in COFF.  */
28*c87b03e5Sespie 
29*c87b03e5Sespie #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
30*c87b03e5Sespie 
31*c87b03e5Sespie /* Support the ctors and dtors sections for g++.  */
32*c87b03e5Sespie 
33*c87b03e5Sespie #undef INIT_SECTION_ASM_OP
34*c87b03e5Sespie 
35*c87b03e5Sespie #undef DO_GLOBAL_CTORS_BODY
36*c87b03e5Sespie #undef DO_GLOBAL_DTORS_BODY
37*c87b03e5Sespie 
38*c87b03e5Sespie /* These compiler options take an argument.  We ignore -target for now.  */
39*c87b03e5Sespie 
40*c87b03e5Sespie #define WORD_SWITCH_TAKES_ARG(STR)				\
41*c87b03e5Sespie  (DEFAULT_WORD_SWITCH_TAKES_ARG (STR)				\
42*c87b03e5Sespie   || !strcmp (STR, "target") || !strcmp (STR, "assert"))
43*c87b03e5Sespie 
44*c87b03e5Sespie /* Output the label for a function definition.  */
45*c87b03e5Sespie 
46*c87b03e5Sespie #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL)			\
47*c87b03e5Sespie do {									\
48*c87b03e5Sespie   ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));			\
49*c87b03e5Sespie   ASM_OUTPUT_LABEL (FILE, NAME);					\
50*c87b03e5Sespie } while (0)
51*c87b03e5Sespie 
52*c87b03e5Sespie /* Output before read-only data.  */
53*c87b03e5Sespie 
54*c87b03e5Sespie #define TEXT_SECTION_ASM_OP "\t.text"
55*c87b03e5Sespie 
56*c87b03e5Sespie /* Output before writable data.  */
57*c87b03e5Sespie 
58*c87b03e5Sespie #define DATA_SECTION_ASM_OP "\t.data"
59*c87b03e5Sespie 
60*c87b03e5Sespie /* How to renumber registers for dbx and gdb.  In the flat model, the frame
61*c87b03e5Sespie    pointer is really %i7.  */
62*c87b03e5Sespie 
63*c87b03e5Sespie #define DBX_REGISTER_NUMBER(REGNO) \
64*c87b03e5Sespie   (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO)
65