diff options
author | Richard Henderson <rth@redhat.com> | 2004-05-06 22:01:01 +0000 |
---|---|---|
committer | Richard Henderson <rth@redhat.com> | 2004-05-06 22:01:01 +0000 |
commit | 165634aa4c7ed7b2fe8a47ff24166400a419d141 (patch) | |
tree | 769e3eb211ade1b2dce18d6dcb745b293b8f7aef /sysdeps/alpha/divqu.S | |
parent | Update. (diff) | |
download | glibc-165634aa4c7ed7b2fe8a47ff24166400a419d141.tar.gz glibc-165634aa4c7ed7b2fe8a47ff24166400a419d141.tar.bz2 glibc-165634aa4c7ed7b2fe8a47ff24166400a419d141.zip |
* sysdeps/alpha/div_libc.h (_ITOFS, _ITOFT, _FTOIT, _ITOFT2): New. * sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S, sysdeps/alpha/reml.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S: Use them.
2004-05-06 Richard Henderson <rth@redhat.com>
* sysdeps/alpha/div_libc.h (_ITOFS, _ITOFT, _FTOIT, _ITOFT2): New.
* sysdeps/alpha/divl.S, sysdeps/alpha/divq.S, sysdeps/alpha/divqu.S,
sysdeps/alpha/reml.S, sysdeps/alpha/remq.S, sysdeps/alpha/remqu.S:
Use them.
Diffstat (limited to 'sysdeps/alpha/divqu.S')
-rw-r--r-- | sysdeps/alpha/divqu.S | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/sysdeps/alpha/divqu.S b/sysdeps/alpha/divqu.S index 6ff6c035e2..63b575faa7 100644 --- a/sysdeps/alpha/divqu.S +++ b/sysdeps/alpha/divqu.S @@ -52,23 +52,20 @@ __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. */ - stq X, 16(sp) - stq Y, 24(sp) - beq Y, DIVBYZERO - stt $f0, 0(sp) stt $f1, 8(sp) + beq Y, DIVBYZERO cfi_rel_offset ($f0, 0) cfi_rel_offset ($f1, 8) - ldt $f0, 16(sp) - ldt $f1, 24(sp) + _ITOFT2 X, $f0, 16, Y, $f1, 24 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. */ + .align 4 ldt $f1, 8(sp) unop nop @@ -81,9 +78,7 @@ __divqu: /* If we get here, we're expecting exact results from the division. Do nothing else besides convert and clean up. */ cvttq/c $f0, $f0 - stt $f0, 16(sp) - - ldq RV, 16(sp) + _FTOIT $f0, RV, 16 ldt $f0, 0(sp) cfi_remember_state cfi_restore ($f0) @@ -101,9 +96,9 @@ $x_is_neg: ldah AT, 0x5f80 /* 2**64 as float. */ stt $f2, 24(sp) cfi_rel_offset ($f2, 24) - stl AT, 16(sp) - lds $f2, 16(sp) + _ITOFS AT, $f2, 16 + .align 4 addt $f0, $f2, $f0 unop divt/c $f0, $f1, $f0 @@ -140,10 +135,10 @@ $x_big: #define QY t3 /* Q*Y */ cvttq/c $f0, $f0 - stt $f0, 8(sp) - ldq Q, 8(sp) + _FTOIT $f0, Q, 8 mulq Q, Y, QY + .align 4 stq t4, 8(sp) unop ldt $f0, 0(sp) |