From: kettenis Date: Sat, 27 Jul 2024 13:31:26 +0000 (+0000) Subject: Use ".arch_extension fp" for the signal trampoline since it saves and X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5ccef5843652c8cb5feaeff7f006be97e32303bc;p=openbsd Use ".arch_extension fp" for the signal trampoline since it saves and restores the FPU registers (running in userland). And add an ".arch_extension nofp" afterwards such that the remaining kernel code can't touch the FPU. Needed to build with clang18 ok jsg@ --- diff --git a/sys/arch/arm64/arm64/locore.S b/sys/arch/arm64/arm64/locore.S index 4781cdbe30f..54cd5922c85 100644 --- a/sys/arch/arm64/arm64/locore.S +++ b/sys/arch/arm64/arm64/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.46 2024/03/16 20:46:28 kettenis Exp $ */ +/* $OpenBSD: locore.S,v 1.47 2024/07/27 13:31:26 kettenis Exp $ */ /*- * Copyright (c) 2012-2014 Andrew Turner * All rights reserved. @@ -315,6 +315,9 @@ initstack: .globl initstack_end initstack_end: +/* The signal trampoline saves and restores the floating-point registers. */ +.arch_extension fp + .text .globl sigcode .type sigcode,@function @@ -387,6 +390,9 @@ esigfill: sigfillsiz: .word esigfill - sigfill +/* Back to normal kernel code. */ +.arch_extension nofp + .text #ifdef MULTIPROCESSOR