mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
Unify Assembler files between Linux and Windows
Add new macro ASMABI used by Windows to change calling API to "sysv_abi". Reviewed-by: Attila Fülöp <attila@fueloep.org> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Jorgen Lundman <lundman@lundman.net> Closes #14228
This commit is contained in:
@@ -27,28 +27,16 @@
|
||||
#include <linux/linkage.h>
|
||||
#endif
|
||||
|
||||
#ifndef RET
|
||||
#define RET ret
|
||||
#endif
|
||||
|
||||
#undef ENTRY
|
||||
#define ENTRY(x) \
|
||||
.text; \
|
||||
.align 8; \
|
||||
.globl x; \
|
||||
.type x, @function; \
|
||||
x:
|
||||
|
||||
#define SET_SIZE(x) \
|
||||
.size x, [.-x]
|
||||
|
||||
/*
|
||||
* Setjmp and longjmp implement non-local gotos using state vectors
|
||||
* type label_t.
|
||||
*/
|
||||
#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)
|
||||
@@ -62,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
|
||||
|
||||
Reference in New Issue
Block a user