From: drahn Date: Fri, 14 May 2021 00:57:03 +0000 (+0000) Subject: Fix regression for _setjmp, fucntion does not use stack and adjusting X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ea5fb929317f1d3e5b50e11d11277905b9ed611e;p=openbsd Fix regression for _setjmp, fucntion does not use stack and adjusting it causes restored stack to be incorrect. --- diff --git a/lib/libc/arch/riscv64/gen/_setjmp.S b/lib/libc/arch/riscv64/gen/_setjmp.S index 85bbe0bd716..724ba8693e9 100644 --- a/lib/libc/arch/riscv64/gen/_setjmp.S +++ b/lib/libc/arch/riscv64/gen/_setjmp.S @@ -1,4 +1,4 @@ -/* $OpenBSD: _setjmp.S,v 1.2 2021/05/09 21:26:06 drahn Exp $ */ +/* $OpenBSD: _setjmp.S,v 1.3 2021/05/14 00:57:03 drahn Exp $ */ /* * Copyright (c) 2020 Dale Rahn * @@ -20,7 +20,6 @@ #include ENTRY(_setjmp) - addi sp, sp, -32 RETGUARD_SETUP(_setjmp, t6) sd sp, (1 * 8)(a0) @@ -60,7 +59,6 @@ ENTRY(_setjmp) /* Return value */ mv a0, x0 RETGUARD_CHECK(_setjmp, t6) - addi sp, sp, 32 ret END_STRONG(_setjmp)