]> sourceware.org Git - glibc.git/commitdiff
alpha: Improve sysdeps/alpha/divqu.S and sysdeps/alpha/remqu.S
authorUros Bizjak <ubizjak@gmail.com>
Mon, 1 Apr 2019 08:58:37 +0000 (15:58 +0700)
committerRichard Henderson <richard.henderson@linaro.org>
Mon, 1 Apr 2019 09:00:37 +0000 (16:00 +0700)
* 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>
ChangeLog
sysdeps/alpha/divqu.S
sysdeps/alpha/remqu.S

index 54b90015ad9ef1c4c1450162b2ed3087bc98fa7b..a514308225a2791842fb2b840326b5b44474d0e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2019-04-01  Uros Bizjak <ubizjak@gmail.com>
+
+       * 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.
+
 2019-04-01  Richard Henderson  <rth@twiddle.net>
 
        * sysdeps/unix/sysv/linux/alpha/kernel-features.h (__NR_shmat):
index f5cedd071632091250d5ddf9748397d8a7db9530..3165374b6d830aa1c2fce3d4087f54ab6c3c54d0 100644 (file)
@@ -56,10 +56,10 @@ __divqu:
           that's done, we have at least 22 cycles until its results are
           ready -- all the time in the world to figure out how we're
           going to use the results.  */
-       stt     $f0, 0(sp)
-       excb
        beq     Y, DIVBYZERO
 
+       stt     $f0, 0(sp)
+       excb
        stt     $f1, 8(sp)
        stt     $f3, 48(sp)
        cfi_rel_offset ($f0, 0)
@@ -70,6 +70,7 @@ __divqu:
        _ITOFT2 X, $f0, 16, Y, $f1, 24
        cvtqt   $f0, $f0
        cvtqt   $f1, $f1
+
        blt     X, $x_is_neg
        divt/c  $f0, $f1, $f0
 
@@ -90,12 +91,12 @@ __divqu:
 
        ldt     $f0, 0(sp)
        ldt     $f3, 48(sp)
+       lda     sp, FRAME(sp)
        cfi_remember_state
        cfi_restore ($f0)
        cfi_restore ($f1)
        cfi_restore ($f3)
        cfi_def_cfa_offset (0)
-       lda     sp, FRAME(sp)
        ret     $31, (RA), 1
 
        .align  4
index a240ee9735850bf1eabb49a480475ea6c798f239..3b6a62dd88fd94891e9bde815a42b6ed72141f3e 100644 (file)
@@ -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)
This page took 0.07292 seconds and 5 git commands to generate.