浏览代码

[S390] EX_TABLE macro.

Add EX_TABLE helper macro to simplify creation of inline assembly
exception table entries.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Martin Schwidefsky 19 年之前
父节点
当前提交
de1a3f1ce6
共有 1 个文件被更改,包括 17 次插入0 次删除
  1. 17 0
      include/asm-s390/processor.h

+ 17 - 0
include/asm-s390/processor.h

@@ -339,4 +339,21 @@ int unregister_idle_notifier(struct notifier_block *nb);
 
 #endif
 
+/*
+ * Helper macro for exception table entries
+ */
+#ifndef __s390x__
+#define EX_TABLE(_fault,_target)			\
+	".section __ex_table,\"a\"\n"			\
+	"	.align 4\n"				\
+	"	.long  " #_fault "," #_target "\n"	\
+	".previous\n"
+#else
+#define EX_TABLE(_fault,_target)			\
+	".section __ex_table,\"a\"\n"			\
+	"	.align 8\n"				\
+	"	.quad  " #_fault "," #_target "\n"	\
+	".previous\n"
+#endif
+
 #endif                                 /* __ASM_S390_PROCESSOR_H           */