1 /* asmmacro.h: Assembler macros.
3 * Copyright (C) 1996 David S. Miller (davem@caipfs.rutgers.edu)
6 #ifndef _SPARC_ASMMACRO_H
7 #define _SPARC_ASMMACRO_H
9 #include <linux/config.h>
10 #include <asm/btfixup.h>
13 #define GET_PROCESSOR4M_ID(reg) \
18 #define GET_PROCESSOR4D_ID(reg) \
19 lda [%g0] ASI_M_VIKING_TMP1, %reg;
21 /* All trap entry points _must_ begin with this macro or else you
22 * lose. It makes sure the kernel has a proper window so that
23 * c-code can be called.
25 #define SAVE_ALL_HEAD \
26 sethi %hi(trap_setup), %l4; \
27 jmpl %l4 + %lo(trap_setup), %l6;
32 /* All traps low-level code here must end with this macro. */
33 #define RESTORE_ALL b ret_trap_entry; clr %l6;
35 /* sun4 probably wants half word accesses to ASI_SEGMAP, while sun4c+
36 likes byte accesses. These are to avoid ifdef mania. */
46 #endif /* !(_SPARC_ASMMACRO_H) */