aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-03-31 02:34:13 +0000
committerRichard Henderson <rth@redhat.com>2004-03-31 02:34:13 +0000
commitb6f10974a7ec44f233d0bb071d9027eba9389d7d (patch)
tree209b821b378c0cb6ae57f130299111df8eb425d3 /sysdeps/alpha
parent3fa21fd813ac323f2890812b99663d7cf17578eb (diff)
downloadglibc-b6f10974a7ec44f233d0bb071d9027eba9389d7d.tar
glibc-b6f10974a7ec44f233d0bb071d9027eba9389d7d.tar.gz
glibc-b6f10974a7ec44f233d0bb071d9027eba9389d7d.tar.bz2
glibc-b6f10974a7ec44f233d0bb071d9027eba9389d7d.zip
* sysdeps/alpha/remqu.S: Detect power-of-two special case.
2004-03-30 Richard Henderson <rth@redhat.com> * sysdeps/alpha/remqu.S: Detect power-of-two special case.
Diffstat (limited to 'sysdeps/alpha')
-rw-r--r--sysdeps/alpha/remqu.S19
1 files changed, 15 insertions, 4 deletions
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index 1a1dcad8a0..fa2eb626c7 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -54,24 +54,25 @@ __remqu:
going to use the results. */
stq X, 16(sp)
stq Y, 24(sp)
- beq Y, DIVBYZERO
+ subq Y, 1, AT
stt $f0, 0(sp)
+ and Y, AT, AT
stt $f1, 8(sp)
+ beq AT, $powerof2
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
+
ldt $f0, 16(sp)
ldt $f1, 24(sp)
-
cvtqt $f0, $f0
cvtqt $f1, $f1
+
blt X, $x_is_neg
divt/c $f0, $f1, $f0
/* Check to see if Y was mis-converted as signed value. */
ldt $f1, 8(sp)
- unop
- nop
blt Y, $y_is_neg
/* Check to see if X fit in the double as an exact value. */
@@ -245,6 +246,16 @@ $y_is_neg:
cfi_def_cfa_offset (0)
ret $31, (RA), 1
+ .align 4
+ cfi_def_cfa_offset (FRAME)
+$powerof2:
+ subq Y, 1, AT
+ beq Y, DIVBYZERO
+ and X, AT, RV
+ lda sp, FRAME(sp)
+ cfi_def_cfa_offset (0)
+ ret $31, (RA), 1
+
cfi_endproc
.size __remqu, .-__remqu