• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef __ASM_EXTABLE_H
2 #define __ASM_EXTABLE_H
3 
4 #ifndef __ASSEMBLY__
5 
6 /*
7  * The exception table consists of pairs of relative offsets: the first
8  * is the relative offset to an instruction that is allowed to fault,
9  * and the second is the relative offset at which the program should
10  * continue. No registers are modified, so it is entirely up to the
11  * continuation code to figure out what to do.
12  */
13 
14 struct exception_table_entry {
15 	int insn, fixup;
16 };
17 
18 #define ARCH_HAS_RELATIVE_EXTABLE
19 
20 extern int fixup_exception(struct pt_regs *regs);
21 
22 	/*
23 	 * ex_entry - place-relative extable entry
24 	 */
25 asm(	".macro		ex_entry, insn, fixup		\n"
26 	".pushsection	__ex_table, \"a\", %progbits	\n"
27 	".align		3				\n"
28 	".long		\\insn - .			\n"
29 	".long		\\fixup - .			\n"
30 	".popsection					\n"
31 	".endm						\n");
32 
33 #else
34 
35 	/*
36 	 * ex_entry - place-relative extable entry
37 	 */
38 	.macro		ex_entry, insn, fixup
39 	.pushsection	__ex_table, "a", %progbits
40 	.align		3
41 	.long		\insn - .
42 	.long		\fixup - .
43 	.popsection
44 	.endm
45 
46 #endif
47 #endif
48