Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/arch/m68k/gen The mapping is, effectively, an exclu...



details:   https://anonhg.NetBSD.org/src/rev/c8dfb5de89ce
branches:  trunk
changeset: 500053:c8dfb5de89ce
user:      is <is%NetBSD.org@localhost>
date:      Mon Dec 04 12:02:08 2000 +0000

description:
The mapping is, effectively, an exclusive or with 0x01. Replace.
Savings: 10 bytes of code/constant data, 1 machine instruction (including
one memory access).

diffstat:

 lib/libc/arch/m68k/gen/flt_rounds.S |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r d48f9b9a9ced -r c8dfb5de89ce lib/libc/arch/m68k/gen/flt_rounds.S
--- a/lib/libc/arch/m68k/gen/flt_rounds.S       Mon Dec 04 11:54:39 2000 +0000
+++ b/lib/libc/arch/m68k/gen/flt_rounds.S       Mon Dec 04 12:02:08 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: flt_rounds.S,v 1.8 1999/10/25 23:48:10 thorpej Exp $   */
+/*     $NetBSD: flt_rounds.S,v 1.9 2000/12/04 12:02:08 is Exp $        */
 
 /*
  * Written by J.T. Conklin, Apr 6, 1995
@@ -9,15 +9,17 @@
 
        .text
        .even
+#if 0
+/* XXX This is, effectively, an exclusive-or with 1 operation. */
 _map:
        .byte 1         /* round to nearest */
        .byte 0         /* round to zero */
        .byte 3         /* round to negative infinity */
        .byte 2         /* round to positive infinity */
+#endif
 
 ENTRY(__flt_rounds)
        fmovel %fpcr,%d0
        bfextu %d0{#26:#2},%d0
-       lea _map,%a0
-       moveb %a0@(%d0:l:1),%d0
+       eorib #1,%d0
        rts



Home | Main Index | Thread Index | Old Index