Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libm/arch/m68k Remove a meaningless conditional branch.
details: https://anonhg.NetBSD.org/src/rev/3d769db63d2a
branches: trunk
changeset: 331394:3d769db63d2a
user: isaki <isaki%NetBSD.org@localhost>
date: Sun Aug 10 13:29:10 2014 +0000
description:
Remove a meaningless conditional branch.
PR/49083 (1)
diffstat:
lib/libm/arch/m68k/s_ceil.S | 12 +++---------
lib/libm/arch/m68k/s_floor.S | 11 +++--------
2 files changed, 6 insertions(+), 17 deletions(-)
diffs (64 lines):
diff -r 095ff0bf1657 -r 3d769db63d2a lib/libm/arch/m68k/s_ceil.S
--- a/lib/libm/arch/m68k/s_ceil.S Sun Aug 10 12:01:57 2014 +0000
+++ b/lib/libm/arch/m68k/s_ceil.S Sun Aug 10 13:29:10 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: s_ceil.S,v 1.7 2003/08/07 16:44:40 agc Exp $ */
+/* $NetBSD: s_ceil.S,v 1.8 2014/08/10 13:29:10 isaki Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,20 +38,14 @@
;_sccsid:
;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90"
-RCSID("$NetBSD: s_ceil.S,v 1.7 2003/08/07 16:44:40 agc Exp $")
+RCSID("$NetBSD: s_ceil.S,v 1.8 2014/08/10 13:29:10 isaki Exp $")
| ceil(x)
-| -floor(-x), for all real x
ENTRY(ceil)
fmovel %fpcr,%d0 | save old FPCR
fmoved %sp@(4),%fp0 | get argument
fbun Lret | if NaN, return NaN
- fbolt Lrtz | <0, round to zero
- fmovel #0x30,%fpcr | >=0, round to inf
- jra Ldoit
-Lrtz:
- fmovel #0x10,%fpcr
-Ldoit:
+ fmovel #0x30,%fpcr | round to +inf
fintd %sp@(4),%fp0 | truncate
fmovel %d0,%fpcr | restore old FPCR
Lret:
diff -r 095ff0bf1657 -r 3d769db63d2a lib/libm/arch/m68k/s_floor.S
--- a/lib/libm/arch/m68k/s_floor.S Sun Aug 10 12:01:57 2014 +0000
+++ b/lib/libm/arch/m68k/s_floor.S Sun Aug 10 13:29:10 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: s_floor.S,v 1.7 2003/08/07 16:44:41 agc Exp $ */
+/* $NetBSD: s_floor.S,v 1.8 2014/08/10 13:29:10 isaki Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,7 +38,7 @@
;_sccsid:
;.asciz "from: @(#)floor.s 5.1 (Berkeley) 5/17/90"
-RCSID("$NetBSD: s_floor.S,v 1.7 2003/08/07 16:44:41 agc Exp $")
+RCSID("$NetBSD: s_floor.S,v 1.8 2014/08/10 13:29:10 isaki Exp $")
| floor(x)
| the largest integer no larger than x
@@ -46,12 +46,7 @@
fmovel %fpcr,%d0 | save old FPCR
fmoved %sp@(4),%fp0 | get argument
fbun Lret | if NaN, return NaN
- fboge Lrtz | >=0, round to zero
- fmovel #0x20,%fpcr | <0, round to -inf
- jra Ldoit
-Lrtz:
- fmovel #0x10,%fpcr
-Ldoit:
+ fmovel #0x20,%fpcr | round to -inf
fintd %sp@(4),%fp0 | truncate
fmovel %d0,%fpcr | restore old FPCR
Lret:
Home |
Main Index |
Thread Index |
Old Index