2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / config / sparc / aout.h
blob1031048df696210ec068b72c75a68b6651d031cb
1 /* Definitions of target machine for GCC, for SPARC using a.out.
2 Copyright (C) 1994, 1996, 2002 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@cygnus.com).
5 This file is part of GCC.
7 GCC is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
12 GCC is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING. If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
22 /* Print subsidiary information on the compiler version in use. */
24 #define TARGET_VERSION fprintf (stderr, " (sparc)");
26 /* These compiler options take an argument. We ignore -target for now. */
28 #define WORD_SWITCH_TAKES_ARG(STR) \
29 (DEFAULT_WORD_SWITCH_TAKES_ARG (STR) \
30 || !strcmp (STR, "target") || !strcmp (STR, "assert"))
32 #define TARGET_ASM_SELECT_SECTION sparc_aout_select_section
33 #define TARGET_ASM_SELECT_RTX_SECTION sparc_aout_select_rtx_section
35 /* Output the label for a function definition. */
37 #define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
38 do { \
39 ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL)); \
40 ASM_OUTPUT_LABEL (FILE, NAME); \
41 } while (0)
43 /* Output before read-only data. */
45 #define TEXT_SECTION_ASM_OP "\t.text"
47 /* Output before writable data. */
49 #define DATA_SECTION_ASM_OP "\t.data"
51 /* How to renumber registers for dbx and gdb. In the flat model, the frame
52 pointer is really %i7. */
54 #define DBX_REGISTER_NUMBER(REGNO) \
55 (TARGET_FLAT && (REGNO) == HARD_FRAME_POINTER_REGNUM ? 31 : REGNO)
57 /* This is how to output a note to DBX telling it the line number
58 to which the following sequence of instructions corresponds.
60 This is needed for SunOS 4.0, and should not hurt for 3.2
61 versions either. */
62 #define ASM_OUTPUT_SOURCE_LINE(file, line, counter) \
63 fprintf (file, ".stabn 68,0,%d,LM%d\nLM%d:\n", \
64 line, counter, counter)