https://git.reactos.org/?p=reactos.git;a=commitdiff;h=105426b81afce4926d427…
commit 105426b81afce4926d427925770acdc776923d19
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sat Jun 25 13:00:01 2022 +0300
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Dec 1 15:21:59 2022 +0200
[LIBM] Fix up some asm files
This allows to compile them with GAS after translation
---
sdk/lib/crt/math/libm_sse2/fmod.asm | 10 +++++-----
sdk/lib/crt/math/libm_sse2/fmodf.asm | 10 +++++-----
sdk/lib/crt/math/libm_sse2/log.asm | 20 ++++++++++----------
sdk/lib/crt/math/libm_sse2/log10.asm | 20 ++++++++++----------
sdk/lib/crt/math/libm_sse2/pow.asm | 4 ++--
5 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/sdk/lib/crt/math/libm_sse2/fmod.asm b/sdk/lib/crt/math/libm_sse2/fmod.asm
index 11778f27bfb..7ba554671f8 100644
--- a/sdk/lib/crt/math/libm_sse2/fmod.asm
+++ b/sdk/lib/crt/math/libm_sse2/fmod.asm
@@ -90,12 +90,12 @@ fmod PROC FRAME
fnclex ; clear exception flags
; in preparation for fprem
-@@:
+@again:
DB 0d9h, 0f8h ; fprem
DB 09bh, 0dfh, 0e0h ; fstsw ax
test ax, 4 SHL X87SW_C
- jnz @b ; do it again in case of partial result
+ jnz @again ; do it again in case of partial result
DB 0ddh, 01ch, 024h ; fstp QWORD PTR [rsp]
movlpd xmm0, QWORD PTR [rsp] ; result
@@ -133,14 +133,14 @@ fmod PROC FRAME
@raise:
mov eax, INVALID ; raise exception
mov r8, FPIND
- jmp @f
+ jmp @fail
@error:
xor eax, eax ; no exception
movd r8, xmm0
- jmp @f
+ jmp @fail
-@@:
+@fail:
lea rcx, [@fmodz] ; fname
mov edx, FPCODEFMOD ; opcode
; mov r8, INDEF ; value
diff --git a/sdk/lib/crt/math/libm_sse2/fmodf.asm b/sdk/lib/crt/math/libm_sse2/fmodf.asm
index e015ca66a6c..b5685d7ba0d 100644
--- a/sdk/lib/crt/math/libm_sse2/fmodf.asm
+++ b/sdk/lib/crt/math/libm_sse2/fmodf.asm
@@ -90,12 +90,12 @@ fmodf PROC FRAME
fnclex ; clear exception flags
; in preparation for fprem
-@@:
+@again:
DB 0d9h, 0f8h ; fprem
DB 9bh, 0dfh, 0e0h ; fstsw ax
test ax, 00400h
- jnz @b ; do it again in case of partial result
+ jnz @again ; do it again in case of partial result
DB 0d9h, 1ch, 24h ; fstp DWORD PTR [rsp]
movss xmm0, DWORD PTR [rsp] ; result
@@ -133,14 +133,14 @@ fmodf PROC FRAME
@raise:
mov eax, INVALID ; raise exception
mov r8d, FPIND
- jmp @f
+ jmp @fail
@error:
xor eax, eax ; no exception
movd r8d, xmm0
- jmp @f
+ jmp @fail
-@@:
+@fail:
lea rcx, [@fmodfz] ; fname
mov edx, FPCODEFMOD ; opcode
; mov r8d, [rsp] ; value
diff --git a/sdk/lib/crt/math/libm_sse2/log.asm b/sdk/lib/crt/math/libm_sse2/log.asm
index 585f70d3a31..d80fbc8ed0b 100644
--- a/sdk/lib/crt/math/libm_sse2/log.asm
+++ b/sdk/lib/crt/math/libm_sse2/log.asm
@@ -391,11 +391,11 @@ Llog_fma3:
xor rax,rax
vpsrlq xmm3,xmm0,52
vmovq rax,xmm0
- vpsubq xmm3,xmm3,QWORD PTR __mask_1023
+ vpsubq xmm3,xmm3,XMMWORD PTR __mask_1023
vcvtdq2pd xmm6,xmm3 ; xexp
; NaN or inf
- vpand xmm5,xmm0,QWORD PTR __real_inf
+ vpand xmm5,xmm0,XMMWORD PTR __real_inf
vcomisd xmm5,QWORD PTR __real_inf
je Llog_fma3_x_is_inf_or_nan
@@ -404,7 +404,7 @@ Llog_fma3:
vcomisd xmm0,xmm5
jbe Llog_fma3_x_is_zero_or_neg
- vpand xmm2,xmm0,QWORD PTR __real_mant
+ vpand xmm2,xmm0,XMMWORD PTR __real_mant
vsubsd xmm4,xmm0,QWORD PTR __real_one
vcomisd xmm6,QWORD PTR __mask_1023_f
@@ -412,21 +412,21 @@ Llog_fma3:
Llog_fma3_continue_common:
; compute index into the log tables
- vpand xmm1,xmm0,QWORD PTR __mask_mant_all8
- vpand xmm3,xmm0,QWORD PTR __mask_mant9
+ vpand xmm1,xmm0,XMMWORD PTR __mask_mant_all8
+ vpand xmm3,xmm0,XMMWORD PTR __mask_mant9
vpsllq xmm3,xmm3,1
vpaddq xmm1,xmm3,xmm1
vmovq rax,xmm1
; near one codepath
- vpand xmm4,xmm4,QWORD PTR __real_notsign
+ vpand xmm4,xmm4,XMMWORD PTR __real_notsign
vcomisd xmm4,QWORD PTR __real_threshold
jb Llog_fma3_near_one
; F,Y
shr rax,44
- vpor xmm2,xmm2,QWORD PTR __real_half
- vpor xmm1,xmm1,QWORD PTR __real_half
+ vpor xmm2,xmm2,XMMWORD PTR __real_half
+ vpor xmm1,xmm1,XMMWORD PTR __real_half
lea r9,QWORD PTR __log_F_inv_qword
; f = F - Y,r = f * inv
@@ -501,10 +501,10 @@ Llog_fma3_near_one:
Llog_fma3_denormal_adjust:
- vpor xmm2,xmm2,QWORD PTR __real_one
+ vpor xmm2,xmm2,XMMWORD PTR __real_one
vsubsd xmm2,xmm2,QWORD PTR __real_one
vpsrlq xmm5,xmm2,52
- vpand xmm2,xmm2,QWORD PTR __real_mant
+ vpand xmm2,xmm2,XMMWORD PTR __real_mant
vmovapd xmm0,xmm2
vpsubd xmm5,xmm5,XMMWORD PTR __mask_2045
vcvtdq2pd xmm6,xmm5
diff --git a/sdk/lib/crt/math/libm_sse2/log10.asm b/sdk/lib/crt/math/libm_sse2/log10.asm
index 790b535d0c7..abe64191d64 100644
--- a/sdk/lib/crt/math/libm_sse2/log10.asm
+++ b/sdk/lib/crt/math/libm_sse2/log10.asm
@@ -382,7 +382,7 @@ Llog10_fma3:
xor rax,rax
vpsrlq xmm3,xmm0,52
vmovq rax,xmm0
- vpsubq xmm3,xmm3,QWORD PTR __int_1023
+ vpsubq xmm3,xmm3,XMMWORD PTR __int_1023
vcvtdq2pd xmm6,xmm3 ; xmm6 <-- (double)xexp
; NaN or Inf?
@@ -404,21 +404,21 @@ Llog10_fma3:
Llog10_fma3_continue_common:
; compute index into the log tables
- vpand xmm1,xmm0,DWORD PTR __mask_mant_top8
- vpand xmm3,xmm0,DWORD PTR __mask_mant9
+ vpand xmm1,xmm0,XMMWORD PTR __mask_mant_top8
+ vpand xmm3,xmm0,XMMWORD PTR __mask_mant9
vpsllq xmm3,xmm3,1
vpaddq xmm1,xmm3,xmm1
vmovq rax,xmm1
; near one codepath
- vpand xmm4,xmm4,DWORD PTR __real_notsign
+ vpand xmm4,xmm4,XMMWORD PTR __real_notsign
vcomisd xmm4,QWORD PTR __real_threshold
jb Llog10_fma3_near_one
; F,Y
shr rax,44
- vpor xmm2,xmm2,DWORD PTR __real_half
- vpor xmm1,xmm1,DWORD PTR __real_half
+ vpor xmm2,xmm2,XMMWORD PTR __real_half
+ vpor xmm1,xmm1,XMMWORD PTR __real_half
lea r9,DWORD PTR __log_F_inv_qword
; f = F - Y,r = f * inv
@@ -486,7 +486,7 @@ Llog10_fma3_near_one:
vmulsd xmm5,xmm5,xmm2
vaddsd xmm4,xmm4,xmm5
vsubsd xmm4,xmm4,xmm6
- vpand xmm3,xmm0,QWORD PTR __mask_lower
+ vpand xmm3,xmm0,XMMWORD PTR __mask_lower
vsubsd xmm0,xmm0,xmm3
vaddsd xmm4,xmm4,xmm0
@@ -505,12 +505,12 @@ Llog10_fma3_near_one:
Llog10_fma3_denormal_adjust:
- vpor xmm2,xmm2,QWORD PTR __real_one
+ vpor xmm2,xmm2,XMMWORD PTR __real_one
vsubsd xmm2,xmm2,QWORD PTR __real_one
vpsrlq xmm5,xmm2,52
- vpand xmm2,xmm2,QWORD PTR __mask_mant
+ vpand xmm2,xmm2,XMMWORD PTR __mask_mant
vmovapd xmm0,xmm2
- vpsubd xmm5,xmm5,DWORD PTR __mask_2045
+ vpsubd xmm5,xmm5,XMMWORD PTR __mask_2045
vcvtdq2pd xmm6,xmm5
jmp Llog10_fma3_continue_common
diff --git a/sdk/lib/crt/math/libm_sse2/pow.asm b/sdk/lib/crt/math/libm_sse2/pow.asm
index 65038c705b0..11543f93b07 100644
--- a/sdk/lib/crt/math/libm_sse2/pow.asm
+++ b/sdk/lib/crt/math/libm_sse2/pow.asm
@@ -1219,7 +1219,7 @@ Lpow_sse2_near_one:
movsd xmm3, QWORD PTR [r9+r8*8]
addsd xmm3, QWORD PTR [rdx+r8*8]
mulsd xmm4, xmm3
- andpd xmm4, QWORD PTR __real_fffffffff8000000
+ andpd xmm4, XMMWORD PTR __real_fffffffff8000000
movsd xmm5, xmm4 ; r1
mulsd xmm4, xmm0
subsd xmm1, xmm4
@@ -2028,7 +2028,7 @@ Lpow_fma3_near_one:
vmovsd xmm3, QWORD PTR [r9+r8*8]
vaddsd xmm3, xmm3, QWORD PTR [rdx+r8*8]
vmulsd xmm4, xmm4, xmm3 ; xmm4 <-- r = f*inv
- vandpd xmm4, xmm4, QWORD PTR __real_fffffffff8000000 ; r1
+ vandpd xmm4, xmm4, XMMWORD PTR __real_fffffffff8000000 ; r1
vmovapd xmm5, xmm4 ; xmm5 <-- copy of r1
; mulsd xmm4, xmm0 ; xmm4 <-- F*r1
; subsd xmm1, xmm4 ; xmm1 <-- f - F*r1