OSDN Git Service

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