1 #ifndef _ASM_IA64_ASMMACRO_H 2 #define _ASM_IA64_ASMMACRO_H 3 4 /* 5 * Copyright (C) 2000-2001 Hewlett-Packard Co 6 * Copyright (C) 2000-2001 David Mosberger-Tang <davidm@hpl.hp.com> 7 */ 8 9 #define ENTRY(name) \ 10 .align 32; \ 11 .proc name; \ 12 name: 13 14 #define GLOBAL_ENTRY(name) \ 15 .global name; \ 16 ENTRY(name) 17 18 #define END(name) \ 19 .endp name 20 21 /* 22 * Helper macros to make unwind directives more readable: 23 */ 24 25 /* prologue_gr: */ 26 #define ASM_UNW_PRLG_RP 0x8 27 #define ASM_UNW_PRLG_PFS 0x4 28 #define ASM_UNW_PRLG_PSP 0x2 29 #define ASM_UNW_PRLG_PR 0x1 30 #define ASM_UNW_PRLG_GRSAVE(ninputs) (32+(ninputs)) 31 32 /* 33 * Helper macros for accessing user memory. 34 */ 35 36 .section "__ex_table", "a" // declare section & section attributes 37 .previous 38 39 #if __GNUC__ >= 3 40 # define EX(y,x...) \ 41 .xdata4 "__ex_table", @gprel(99f), @gprel(y); \ 42 [99:] x 43 # define EXCLR(y,x...) \ 44 .xdata4 "__ex_table", @gprel(99f), @gprel(y)+4; \ 45 [99:] x 46 #else 47 # define EX(y,x...) \ 48 .xdata4 "__ex_table", @gprel(99f), @gprel(y); \ 49 99: x 50 # define EXCLR(y,x...) \ 51 .xdata4 "__ex_table", @gprel(99f), @gprel(y)+4; \ 52 99: x 53 #endif 54 55 #endif /* _ASM_IA64_ASMMACRO_H */ 56