aboutsummaryrefslogtreecommitdiffstats
path: root/runtime/x86_64/i64_utod.S
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@college-de-france.fr>2020-10-05 15:52:58 +0200
committerXavier Leroy <xavier.leroy@college-de-france.fr>2020-10-05 15:52:58 +0200
commit26ddb90280b45e92d90eead89edb237f2922824a (patch)
treeff18b31abdbb97133f9708ca085467f25758e507 /runtime/x86_64/i64_utod.S
parente9c738e3bd156f68905968e25c70ec796d3119c4 (diff)
downloadcompcert-kvx-26ddb90280b45e92d90eead89edb237f2922824a.tar.gz
compcert-kvx-26ddb90280b45e92d90eead89edb237f2922824a.zip
Support Cygwin 64 bits
- Add support for the Win64 ABI to the x86_64 port - Update vararg support to handle Win64 conventions - Configure support for x86_64-cygwin64
Diffstat (limited to 'runtime/x86_64/i64_utod.S')
-rw-r--r--runtime/x86_64/i64_utod.S18
1 files changed, 9 insertions, 9 deletions
diff --git a/runtime/x86_64/i64_utod.S b/runtime/x86_64/i64_utod.S
index 62e6e484..4d4870fc 100644
--- a/runtime/x86_64/i64_utod.S
+++ b/runtime/x86_64/i64_utod.S
@@ -39,18 +39,18 @@
// Conversion unsigned long -> double-precision float
FUNCTION(__compcert_i64_utod)
- testq %rdi, %rdi
+ testq INT_ARG_1, INT_ARG_1
js 1f
- pxor %xmm0, %xmm0 // if < 2^63,
- cvtsi2sdq %rdi, %xmm0 // convert as if signed
+ pxor FP_RES, FP_RES // if < 2^63,
+ cvtsi2sdq INT_ARG_1, FP_RES // convert as if signed
ret
1: // if >= 2^63, use round-to-odd trick
- movq %rdi, %rax
+ movq INT_ARG_1, %rax
shrq %rax
- andq $1, %rdi
- orq %rdi, %rax // (arg >> 1) | (arg & 1)
- pxor %xmm0, %xmm0
- cvtsi2sdq %rax, %xmm0 // convert as if signed
- addsd %xmm0, %xmm0 // multiply result by 2.0
+ andq $1, INT_ARG_1
+ orq INT_ARG_1, %rax // (arg >> 1) | (arg & 1)
+ pxor FP_RES, FP_RES
+ cvtsi2sdq %rax, FP_RES // convert as if signed
+ addsd FP_RES, FP_RES // multiply result by 2.0
ret
ENDFUNCTION(__compcert_i64_utod)