Author Topic: error A2169: General Failure  (Read 300 times)

KradMoonRa

  • Regular Member
  • *
  • Posts: 23
error A2169: General Failure
« on: March 26, 2018, 07:18:46 AM »
Dono why the next code cannot compile.

i can do this it compiles successfully.
Code: [Select]
.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.
Code: [Select]
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?

johnsa

  • Member
  • ****
  • Posts: 682
    • Uasm
Re: error A2169: General Failure
« Reply #1 on: March 26, 2018, 08:34:33 PM »
Hi,

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

Code: [Select]

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

  • Regular Member
  • *
  • Posts: 23
Re: error A2169: General Failure
« Reply #2 on: March 26, 2018, 10:37:03 PM »
Hi Johnsa,

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

Code: [Select]
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