1/* Definitions of target machine for GNU compiler, for SunOS 4.x
2   Copyright (C) 1994 Free Software Foundation, Inc.
3
4This file is part of GNU CC.
5
6GNU CC is free software; you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation; either version 2, or (at your option)
9any later version.
10
11GNU CC is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along with GNU CC; see the file COPYING.  If not, write to
18the Free Software Foundation, 59 Temple Place - Suite 330,
19Boston, MA 02111-1307, USA.  */
20
21#define SUNOS4_SHARED_LIBRARIES 1
22
23/* Use N_BINCL stabs.  */
24
25#define DBX_USE_BINCL
26
27#include "sparc/sparc.h"
28
29/* The Sun as doesn't like unaligned data.  */
30#define DWARF2_UNWIND_INFO 0
31
32/* Override MACHINE_STATE_{SAVE,RESTORE} because we have special
33   traps available which can get and set the condition codes
34   reliably.  */
35#undef MACHINE_STATE_SAVE
36#define MACHINE_STATE_SAVE(ID)				\
37  unsigned long int ms_flags, ms_saveret;		\
38  asm volatile("ta	0x20\n\t"			\
39	       "mov	%%g1, %0\n\t"			\
40	       "mov	%%g2, %1\n\t"			\
41	       : "=r" (ms_flags), "=r" (ms_saveret));
42
43#undef MACHINE_STATE_RESTORE
44#define MACHINE_STATE_RESTORE(ID)			\
45  asm volatile("mov	%0, %%g1\n\t"			\
46	       "mov	%1, %%g2\n\t"			\
47	       "ta	0x21\n\t"			\
48	       : /* no outputs */			\
49	       : "r" (ms_flags), "r" (ms_saveret));
50