about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-03-14 16:21:40 -0700
committerDavid S. Miller <davem@davemloft.net>2012-03-14 16:21:40 -0700
commit7bd951ff59e0443ca1bdd5b0ea58f6f4f641ac73 (patch)
treeff25a68a9fa2c41a54bc59d7291d48e3eef991b6 /sysdeps
parentbd951ccbe8597225d0f219425cf8e75d639185cd (diff)
downloadglibc-7bd951ff59e0443ca1bdd5b0ea58f6f4f641ac73.tar.gz
glibc-7bd951ff59e0443ca1bdd5b0ea58f6f4f641ac73.tar.xz
glibc-7bd951ff59e0443ca1bdd5b0ea58f6f4f641ac73.zip
Small optimization to sparc 64-bit copysign.
	* sysdeps/sparc/sparc64/fpu/s_copysign.S (__copysign): Use fzeros/fnegs
	to load 0x80000000 into a float register instead of using the stack.
	* sysdeps/sparc/sparc64/fpu/s_copysignf.S (__copysignf): Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/sparc/sparc64/fpu/s_copysign.S5
-rw-r--r--sysdeps/sparc/sparc64/fpu/s_copysignf.S5
2 files changed, 4 insertions, 6 deletions
diff --git a/sysdeps/sparc/sparc64/fpu/s_copysign.S b/sysdeps/sparc/sparc64/fpu/s_copysign.S
index 571f57cbdc..f7f69fb8d9 100644
--- a/sysdeps/sparc/sparc64/fpu/s_copysign.S
+++ b/sysdeps/sparc/sparc64/fpu/s_copysign.S
@@ -20,9 +20,8 @@
 #include <sysdep.h>
 
 ENTRY (__copysign)
-	sethi	%hi(0x80000000), %g1
-	st	%g1, [%sp + STACK_BIAS + 128]
-	ld	[%sp + STACK_BIAS + 128], %f7
+	fzeros	%f7
+	fnegs	%f7, %f7
 	fands	%f2, %f7, %f9
 	fandnot2s %f0, %f7, %f0
 	retl
diff --git a/sysdeps/sparc/sparc64/fpu/s_copysignf.S b/sysdeps/sparc/sparc64/fpu/s_copysignf.S
index db6a384c60..85577a7170 100644
--- a/sysdeps/sparc/sparc64/fpu/s_copysignf.S
+++ b/sysdeps/sparc/sparc64/fpu/s_copysignf.S
@@ -20,9 +20,8 @@
 #include <sysdep.h>
 
 ENTRY (__copysignf)
-	sethi	%hi(0x80000000), %g1
-	st	%g1, [%sp + STACK_BIAS + 128]
-	ld	[%sp + STACK_BIAS + 128], %f7
+	fzeros	%f7
+	fnegs	%f7, %f7
 	fands	%f3, %f7, %f9
 	fandnot2s %f1, %f7, %f1
 	retl