OSDN Git Service

2001-11-14 David O'Brien <obrien@FreeBSD.org>
[pf3gnuchains/gcc-fork.git] / gcc / config / sparc / sun4o3.h
1 #undef CPP_PREDEFINES
2 #define CPP_PREDEFINES "-Dsparc -Dsun -Dunix -Asystem=unix -Asystem=bsd"
3
4 /* Override the name of the mcount profiling function.  */
5
6 #undef MCOUNT_FUNCTION
7 #define MCOUNT_FUNCTION "*.mcount"
8
9 /* LINK_SPEC is needed only for SunOS 4.  */
10
11 #undef LINK_SPEC
12
13 /* Override MACHINE_STATE_{SAVE,RESTORE} because we have special
14    traps available which can get and set the condition codes
15    reliably.  */
16 #undef MACHINE_STATE_SAVE
17 #define MACHINE_STATE_SAVE(ID)                          \
18   unsigned long int ms_flags, ms_saveret;               \
19   asm volatile("ta      0x20\n\t"                       \
20                "mov     %%g1, %0\n\t"                   \
21                "mov     %%g2, %1\n\t"                   \
22                : "=r" (ms_flags), "=r" (ms_saveret));
23
24 #undef MACHINE_STATE_RESTORE
25 #define MACHINE_STATE_RESTORE(ID)                       \
26   asm volatile("mov     %0, %%g1\n\t"                   \
27                "mov     %1, %%g2\n\t"                   \
28                "ta      0x21\n\t"                       \
29                : /* no outputs */                       \
30                : "r" (ms_flags), "r" (ms_saveret));