Path: blob/master/arch/sparc/include/asm/asmmacro.h
17531 views
/* asmmacro.h: Assembler macros.1*2* Copyright (C) 1996 David S. Miller ([email protected])3*/45#ifndef _SPARC_ASMMACRO_H6#define _SPARC_ASMMACRO_H78#include <asm/btfixup.h>9#include <asm/asi.h>1011#define GET_PROCESSOR4M_ID(reg) \12rd %tbr, %reg; \13srl %reg, 12, %reg; \14and %reg, 3, %reg;1516#define GET_PROCESSOR4D_ID(reg) \17lda [%g0] ASI_M_VIKING_TMP1, %reg;1819/* All trap entry points _must_ begin with this macro or else you20* lose. It makes sure the kernel has a proper window so that21* c-code can be called.22*/23#define SAVE_ALL_HEAD \24sethi %hi(trap_setup), %l4; \25jmpl %l4 + %lo(trap_setup), %l6;26#define SAVE_ALL \27SAVE_ALL_HEAD \28nop;2930/* All traps low-level code here must end with this macro. */31#define RESTORE_ALL b ret_trap_entry; clr %l6;3233/* sun4 probably wants half word accesses to ASI_SEGMAP, while sun4c+34likes byte accesses. These are to avoid ifdef mania. */3536#define lduXa lduba37#define stXa stba3839#endif /* !(_SPARC_ASMMACRO_H) */404142