about summary refs log tree commit diff
path: root/src/math/x86_64/lrintl.s
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-09-13 01:22:13 -0400
committerRich Felker <dalias@aerifal.cx>2013-09-13 01:22:13 -0400
commit2f1de8051b4b33445ca233868e573ec838c81f65 (patch)
tree1d47679a347353dfc7cab08adc30c44299fe030d /src/math/x86_64/lrintl.s
parentff4be700d0f316e043de8b3cf03ad64e086f0525 (diff)
downloadmusl-2f1de8051b4b33445ca233868e573ec838c81f65.tar.gz
musl-2f1de8051b4b33445ca233868e573ec838c81f65.tar.xz
musl-2f1de8051b4b33445ca233868e573ec838c81f65.zip
fix x86_64 lrintl asm, again
the underlying problem was not incorrect sign extension (fixed in the
previous commit to this file by nsz) but that code that treats "long"
as 32-bit was copied blindly from i386 to x86_64.

now lrintl is identical to llrintl on x86_64, as it should be.
Diffstat (limited to 'src/math/x86_64/lrintl.s')
-rw-r--r--src/math/x86_64/lrintl.s4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/x86_64/lrintl.s b/src/math/x86_64/lrintl.s
index 0e2c7712..d587b12b 100644
--- a/src/math/x86_64/lrintl.s
+++ b/src/math/x86_64/lrintl.s
@@ -2,6 +2,6 @@
 .type lrintl,@function
 lrintl:
 	fldt 8(%rsp)
-	fistpl 8(%rsp)
-	movslq 8(%rsp),%rax
+	fistpll 8(%rsp)
+	mov 8(%rsp),%rax
 	ret