diff options
author | 2001-04-18 11:53:39 +0000 | |
---|---|---|
committer | 2001-04-18 11:53:39 +0000 | |
commit | 35e430216121355bcc15f67f0ce07c28120f99cd (patch) | |
tree | 8f47e737358c351343d15b753c2635972e717093 /lib/libc/arch/vax | |
parent | another vax tag (diff) | |
download | wireguard-openbsd-35e430216121355bcc15f67f0ce07c28120f99cd.tar.xz wireguard-openbsd-35e430216121355bcc15f67f0ce07c28120f99cd.zip |
Most of the systems we run on require an emulated EMODD, so avoid using
it if a CVTDL would do instead. This path is 80x faster on such systems,
and falling back to EMODD if necessary hurts little.
Helps programs like nawk, a heavy modf user.
Diffstat (limited to 'lib/libc/arch/vax')
-rw-r--r-- | lib/libc/arch/vax/gen/modf.S | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/libc/arch/vax/gen/modf.S b/lib/libc/arch/vax/gen/modf.S index 0caa0aaef97..06a05b6bf91 100644 --- a/lib/libc/arch/vax/gen/modf.S +++ b/lib/libc/arch/vax/gen/modf.S @@ -33,7 +33,7 @@ #if defined(LIBC_SCCS) .text - .asciz "$OpenBSD: modf.S,v 1.3 2001/03/18 07:29:04 bjc Exp $" + .asciz "$OpenBSD: modf.S,v 1.4 2001/04/18 11:53:39 hugh Exp $" #endif /* LIBC_SCCS */ /* @@ -47,8 +47,14 @@ #include "DEFS.h" ENTRY(modf, R2) + cvtdl 4(ap),r2 + bvs 0f + cvtld r2,*12(ap) + subd3 *12(ap),4(ap),r0 + ret +0: emodd 4(ap),$0,$0f1.0,r2,r0 - jvs 1f # integer overflow + bvs 1f # integer overflow cvtld r2,*12(ap) ret 1: |