about summary refs log tree commit diff
path: root/sysdeps/alpha/divq.S
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2004-05-06 22:01:01 +0000
committerRichard Henderson <rth@redhat.com>2004-05-06 22:01:01 +0000
commit165634aa4c7ed7b2fe8a47ff24166400a419d141 (patch)
tree769e3eb211ade1b2dce18d6dcb745b293b8f7aef /sysdeps/alpha/divq.S
parent58d87ee17185dbd0b8f927c939343eaed34c8614 (diff)
downloadglibc-165634aa4c7ed7b2fe8a47ff24166400a419d141.tar.gz
glibc-165634aa4c7ed7b2fe8a47ff24166400a419d141.tar.xz
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/divq.S')
-rw-r--r--sysdeps/alpha/divq.S21
1 files changed, 7 insertions, 14 deletions
diff --git a/sysdeps/alpha/divq.S b/sysdeps/alpha/divq.S
index 464536db3d..4df79829f9 100644
--- a/sysdeps/alpha/divq.S
+++ b/sysdeps/alpha/divq.S
@@ -52,17 +52,13 @@ __divq:
 	   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
 	divt/c	$f0, $f1, $f0
@@ -77,9 +73,8 @@ __divq:
 	/* 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)
+	_FTOIT	$f0, RV, 16
 
-	ldq	RV, 16(sp)
 	ldt	$f0, 0(sp)
 	cfi_restore ($f1)
 	cfi_remember_state
@@ -117,8 +112,8 @@ $x_big:
 $fix_sign_in_ret1:
 	cvttq/c	$f0, $f0
 
-	stt	$f0, 8(sp)
-	ldq	Q, 8(sp)
+	_FTOIT	$f0, Q, 8
+	.align	3
 $fix_sign_in_ret2:
 	mulq	Q, Y, QY
 	stq	t4, 8(sp)
@@ -234,10 +229,8 @@ $fix_sign_in:
 	blbc	t5, $fix_sign_in_ret1
 
 	cvttq/c	$f0, $f0
-	stt	$f0, 8(sp)
-	ldq	Q, 8(sp)
-	unop
-
+	_FTOIT	$f0, Q, 8
+	.align	3
 	negq	Q, Q
 	br	$fix_sign_in_ret2