aboutsummaryrefslogtreecommitdiff
path: root/module/lua/setjmp/setjmp_x86_64.S
diff options
context:
space:
mode:
Diffstat (limited to 'module/lua/setjmp/setjmp_x86_64.S')
-rw-r--r--module/lua/setjmp/setjmp_x86_64.S27
1 files changed, 8 insertions, 19 deletions
diff --git a/module/lua/setjmp/setjmp_x86_64.S b/module/lua/setjmp/setjmp_x86_64.S
index 34cf2c7dce93..337fceb15b00 100644
--- a/module/lua/setjmp/setjmp_x86_64.S
+++ b/module/lua/setjmp/setjmp_x86_64.S
@@ -6,7 +6,7 @@
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
+ * or https://opensource.org/licenses/CDDL-1.0.
* See the License for the specific language governing permissions
* and limitations under the License.
*
@@ -23,22 +23,8 @@
* Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved.
*/
-
-#define ENTRY(x) \
- .text; \
- .align 8; \
- .globl x; \
- .type x, @function; \
-x:
-
-#define SET_SIZE(x) \
- .size x, [.-x]
-
-
-#if defined(__linux__) && defined(CONFIG_SLS)
-#define RET ret; int3
-#else
-#define RET ret
+#if defined(_KERNEL) && defined(__linux__)
+#include <linux/linkage.h>
#endif
/*
@@ -47,7 +33,10 @@ x:
*/
#ifdef __x86_64__
- ENTRY(setjmp)
+#define _ASM
+#include <sys/asm_linkage.h>
+
+ENTRY_ALIGN(setjmp, 8)
movq %rsp, 0(%rdi)
movq %rbp, 8(%rdi)
movq %rbx, 16(%rdi)
@@ -61,7 +50,7 @@ x:
RET
SET_SIZE(setjmp)
- ENTRY(longjmp)
+ENTRY_ALIGN(longjmp, 8)
movq 0(%rdi), %rsp
movq 8(%rdi), %rbp
movq 16(%rdi), %rbx