diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2024-03-02 16:51:01 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2024-03-02 16:51:01 +0000 |
commit | 3008e26bf29e5ab455b1f9767a73e6045d74c3d6 (patch) | |
tree | 02af0ef465a52ae033235a1505c33bf524f8423c /lib | |
parent | 5d25cd599e7dba10080f358c9d2101e6fa79eb4a (diff) |
Shorter and simpler version which does not need to use the stack.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/arch/m88k/gen/fabs.S | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/libc/arch/m88k/gen/fabs.S b/lib/libc/arch/m88k/gen/fabs.S index 3e0742d3eef..f47d31b9ee7 100644 --- a/lib/libc/arch/m88k/gen/fabs.S +++ b/lib/libc/arch/m88k/gen/fabs.S @@ -1,4 +1,4 @@ -/* $OpenBSD: fabs.S,v 1.12 2024/03/02 12:02:42 miod Exp $ */ +/* $OpenBSD: fabs.S,v 1.13 2024/03/02 16:51:00 miod Exp $ */ /*- * Copyright (c) 1996 Nivas Madhur * All rights reserved. @@ -37,12 +37,6 @@ STRONG_ALIAS(fabsl, fabs) ENTRY(fabs) - subu %r31,%r31,16 - st.d %r2,%r31,0 - ld.bu %r4,%r31,0 - mask %r4,%r4,0x7f /* set sign bit to 0 */ - st.b %r4,%r31,0 - ld.d %r2,%r31,0 jmp.n %r1 - addu %r31,%r31,16 + and.u %r2, %r2, 0x7fff /* set sign bit to 0 */ END(fabs) |