1 2# define __ASM_FORM(x) " " #x " " 3# define JUMP_LABEL_INITIAL_NOP ".byte 0xe9 \n\t .long 0\n\t" 4# define __ASM_SEL(a,b) __ASM_FORM(b) 5#define _ASM_PTR __ASM_SEL(.long, .quad) 6 7# define JUMP_LABEL(key, label) \ 8 do { \ 9 asm goto("1:" \ 10 JUMP_LABEL_INITIAL_NOP \ 11 ".pushsection __jump_table, \"a\" \n\t"\ 12 _ASM_PTR "1b, %l[" #label "], %c0 \n\t" \ 13 ".popsection \n\t" \ 14 : : "i" (key) : : label); \ 15 } while (0) 16 17int main(int argc, char *argv[]) 18{ 19 JUMP_LABEL("1", do_trace ); 20 return 1; 21do_trace: 22 return 0; 23} 24 25/* 26 * check-name: Asm with goto labels. 27 */ 28 29