From d0a1005038916a8061ca63e589ff6f27d5aeb8ec Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Fri, 26 Jul 2024 00:23:58 +0000 Subject: 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(-) (limited to 'sys') 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) { -- cgit v1.2.3