]> xenbits.xensource.com Git - people/andrewcoop/xen-test-framework.git/commitdiff
Clean up extable.h
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Jun 2017 14:51:06 +0000 (14:51 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 28 Jun 2017 18:58:54 +0000 (19:58 +0100)
Factor _ASM_EXTABLE() out of the C/ASM logic, and implement it in terms of
_ASM_EXTABLE_HANDLER().

No functional change.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
include/xtf/extable.h

index b646be83b9ffd76c8597b93a2a37690982039067..daedd9e840308cad551834ceb588b10f40e4581f 100644 (file)
 
 #ifdef __ASSEMBLY__
 
-/**
- * Create an exception table entry.
- * @param fault Faulting address.
- * @param fixup Fixup address.
- */
-#define _ASM_EXTABLE(fault, fixup)              \
-    .pushsection .ex_table, "a";                \
-    _WORD fault, fixup, 0;                      \
-    .popsection
-
 /**
  * Create an exception table entry with custom handler.
  * @param fault Faulting address.
 
 #else
 
-/**
- * Create an exception table entry.
- * @param fault Faulting address.
- * @param fixup Fixup address.
- */
-#define _ASM_EXTABLE(fault, fixup)              \
-    ".pushsection .ex_table, \"a\";\n"          \
-    _WORD STR(fault) ", " STR(fixup) ", 0;\n"   \
-    ".popsection;\n"
-
 /**
  * Create an exception table entry with custom handler.
  * @param fault Faulting address.
     _WORD STR(fault) ", " STR(fixup) ", " STR(handler) ";\n"    \
     ".popsection;\n"
 
+#endif
+
+/**
+ * Create an exception table entry.
+ * @param fault Faulting address.
+ * @param fixup Fixup address.
+ */
+#define _ASM_EXTABLE(fault, fixup) _ASM_EXTABLE_HANDLER(fault, fixup, 0)
+
+#ifndef __ASSEMBLY__
+
 struct cpu_regs;
 
 /** Exception table entry. */