From 84dbb7f9d7e882d86464be986f72b8a4bfbe7caf Mon Sep 17 00:00:00 2001 From: jsg Date: Fri, 26 Jul 2024 00:23:57 +0000 Subject: [PATCH] use the fp target attribute with fpu_save()/fpu_load() otherwise clang 18 errors when inline assembly uses floating point registers with nofp in -march ok kettenis@ --- sys/arch/arm64/arm64/fpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/arch/arm64/arm64/fpu.c b/sys/arch/arm64/arm64/fpu.c index 0285ef78558..a50cf631968 100644 --- a/sys/arch/arm64/arm64/fpu.c +++ b/sys/arch/arm64/arm64/fpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fpu.c,v 1.1 2022/01/01 18:52:36 kettenis Exp $ */ +/* $OpenBSD: fpu.c,v 1.2 2024/07/26 00:23:57 jsg Exp $ */ /* * Copyright (c) 2022 Mark Kettenis * @@ -22,6 +22,7 @@ #include +__attribute__((target("+fp"))) void fpu_save(struct proc *p) { @@ -74,6 +75,7 @@ fpu_save(struct proc *p) fp->fp_cr = READ_SPECIALREG(fpcr); } +__attribute__((target("+fp"))) void fpu_load(struct proc *p) { -- 2.20.1