From: jsg Date: Fri, 26 Jul 2024 00:23:57 +0000 (+0000) Subject: use the fp target attribute with fpu_save()/fpu_load() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=84dbb7f9d7e882d86464be986f72b8a4bfbe7caf;p=openbsd 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@ --- 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) {