1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2018 Intel Corporation
5 * See arch/x86/include/asm/setjmp.h for jmp_buf format
8 #include <linux/linkage.h>
16 movq %rcx, (%rdi) /* Return address */
24 xorq %rax, %rax /* Direct invocation returns 0 */
33 movq (%rdi), %rcx /* Return address */
42 movq %rsi, %rax /* Value to be returned by setjmp() */
43 testq %rax, %rax /* cannot be 0 in this case */
45 incq %rax /* Return 1 instead */