aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/alpha/remqu.S
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2019-04-01 15:58:37 +0700
committerRichard Henderson <richard.henderson@linaro.org>2019-04-01 16:00:37 +0700
commit993e3107af67edefcfc79a62ae55f7b98aa5151e (patch)
tree449aa8a58d1397aeb3d39b7fb106f0821ef1ef85 /sysdeps/alpha/remqu.S
parentd5ecee822e72a2fd156338ab2be2f2e70a1da55a (diff)
downloadglibc-993e3107af67edefcfc79a62ae55f7b98aa5151e.tar.xz
glibc-993e3107af67edefcfc79a62ae55f7b98aa5151e.zip
alpha: Improve sysdeps/alpha/divqu.S and sysdeps/alpha/remqu.S
* sysdeps/alpha/divqu.S (__divqu): Move save of $f0 and excb after conditional branch to DIVBYZERO. Fix unwind info. * sysdeps/alpha/remqu.S (__remqu): Move saves of $f0, $f1, $f2 and excb after conditional branch to $powerof2. Add missing unop instructions and .align directives and reorder instructions to match __divqu. Signed-off-by: Uroš Bizjak <ubizjak@gmail.com>
Diffstat (limited to 'sysdeps/alpha/remqu.S')
-rw-r--r--sysdeps/alpha/remqu.S12
1 files changed, 7 insertions, 5 deletions
diff --git a/sysdeps/alpha/remqu.S b/sysdeps/alpha/remqu.S
index a240ee9735..3b6a62dd88 100644
--- a/sysdeps/alpha/remqu.S
+++ b/sysdeps/alpha/remqu.S
@@ -57,19 +57,19 @@ __remqu:
ready -- all the time in the world to figure out how we're
going to use the results. */
subq Y, 1, AT
- stt $f0, 0(sp)
and Y, AT, AT
+ beq AT, $powerof2
- stt $f1, 8(sp)
+ stt $f0, 0(sp)
excb
+ stt $f1, 8(sp)
stt $f3, 48(sp)
- beq AT, $powerof2
cfi_rel_offset ($f0, 0)
cfi_rel_offset ($f1, 8)
cfi_rel_offset ($f3, 48)
+ mf_fpcr $f3
_ITOFT2 X, $f0, 16, Y, $f1, 24
- mf_fpcr $f3
cvtqt $f0, $f0
cvtqt $f1, $f1
@@ -116,11 +116,13 @@ $x_is_neg:
cfi_rel_offset ($f2, 24)
_ITOFS AT, $f2, 16
+ .align 4
addt $f0, $f2, $f0
+ unop
divt/c $f0, $f1, $f0
+ unop
/* Ok, we've now the divide issued. Continue with other checks. */
- .align 4
ldt $f1, 8(sp)
unop
ldt $f2, 24(sp)