News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

error A2169: General Failure

Started by KradMoonRa, March 26, 2018, 07:18:46 AM

Previous topic - Next topic

KradMoonRa

Dono why the next code cannot compile.

i can do this it compiles successfully.

.code
align 16
DllMain proto UX_VECCALL (dword) ;hModule:ptr, dwReason:dword, dwReserved:ptr

align 16
DllMain proc UX_VECCALL (dword) ;hModule:ptr, dwReason:dword, dwReserved:ptr

mov eax, 1
ret

DllMain endp


But this don't work.

option casemap:none
.X64P
.xmm
option win64:15
option stackbase:rsp
option frame:auto

;include xmmtypes.inc

; MM128 = yes
; HFA   = no
; HVA   = no
__m128f struct 16
f0 real4 ?
f1 real4 ?
f2 real4 ?
f3 real4 ?
__m128f ends

.code
align 16
uXm_xmm_add_ss proto vectorcall (__m128f) InXmm_A:__m128f, InXmm_B:__m128f

align 16
uXm_xmm_add_ss proc vectorcall (__m128f) frame InXmm_A:__m128f, InXmm_B:__uXm128f

addss xmm0, xmm1

ret

uXm_xmm_add_ss endp

end ;.code


What I'm doing wrong?
The uasmlib

johnsa

Hi,

This will be fixed shortly, as a side note the following will work as the simd types are built-in now:



option casemap:none
.X64P
.xmm
option win64:15
option stackbase:rsp
option frame:auto

uXm_xmm_add_ss proto vectorcall (__m128f) InXmm_A:__m128f, InXmm_B:__m128f

.code


align 16
uXm_xmm_add_ss proc vectorcall (__m128f) InXmm_A:__m128f, InXmm_B:__m128f

addss xmm0, xmm1

ret

uXm_xmm_add_ss endp

entry:

invoke uXm_xmm_add_ss, xmm2, xmm3

movaps xmm2, uinvoke(uXm_xmm_add_ss, xmm0, xmm1)

end entry



KradMoonRa

Hi Johnsa,

Managed to get it working, after some research in the asm types.


option casemap:none
.X64P
.xmm
option win64:15
option stackbase:rsp
option frame:auto

__uXm128f textequ <xmmword>

.code
align 16
uXm_xmm_add_ss proto vectorcall (__m128f) InXmm_A:__m128f, InXmm_B:__m128f

align 16
uXm_xmm_add_ss proc vectorcall (__m128f) frame InXmm_A:__m128f, InXmm_B:__uXm128f

addss xmm0, xmm1

ret

uXm_xmm_add_ss endp

end ;.code
The uasmlib