summary refs log tree commit diff
path: root/sysdeps/libm-i387/s_remquof.S
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/libm-i387/s_remquof.S')
-rw-r--r--sysdeps/libm-i387/s_remquof.S7
1 files changed, 6 insertions, 1 deletions
diff --git a/sysdeps/libm-i387/s_remquof.S b/sysdeps/libm-i387/s_remquof.S
index 56954323a6..144eb3034c 100644
--- a/sysdeps/libm-i387/s_remquof.S
+++ b/sysdeps/libm-i387/s_remquof.S
@@ -25,7 +25,12 @@ ENTRY(__remquof)
 	shrl	%cl, %eax
 	andl	$3, %eax
 	movl	12(%esp), %ecx
-	movl	%eax, (%ecx)
+	movl	4(%esp), %edx
+	xorl	8(%esp), %edx
+	testl	$0x80000000, %edx
+	jz	1f
+	negl	%eax
+1:	movl	%eax, (%ecx)
 	ret
 END (__remquof)
 weak_alias (__remquof, remquof)