Terraspace / UASM

UASM - Macro Assembler
http://www.terraspace.co.uk/uasm.html
Other
220 stars 49 forks source link

vpbroadcastd ymm, mem not assembling #157

Closed gwoltman closed 2 years ago

gwoltman commented 3 years ago

TITLE factor64

OPTION EVEX:1

_GWDATA SEGMENT PAGE YMM_ONE DD 1,0,1,0,1,0,1,0 _GWDATA ENDS

_TEXT SEGMENT fac PROC vpbroadcastd ymm3, YMM_ONE ; Load constant 1 vpbroadcastd zmm13, YMM_ONE ; Load constant 1 fac ENDP _TEXT ENDS END

generates an error: Error A2049: Invalid instruction operands the AVX-512 broadcast assembles OK note it assembles OK if YMM_ONE is declared as "YMM_ONE DD 1"

john-terraspace commented 3 years ago

This is likely due to type size checking, a list of DDs is only going to see the first element as 4 bytes. Can you try either with YMMWORD PTR or use __m256 built-in struct (or create your own) so that it gets the size right?

From: gwoltman @.> Sent: Sunday, August 22, 2021 12:59 AM To: Terraspace/UASM @.> Cc: Subscribed @.***> Subject: [Terraspace/UASM] vpbroadcastd ymm, mem not assembling (#157)

TITLE factor64

OPTION EVEX:1

_GWDATA SEGMENT PAGE YMM_ONE DD 1,0,1,0,1,0,1,0 _GWDATA ENDS

_TEXT SEGMENT fac PROC vpbroadcastd ymm3, YMM_ONE ; Load constant 1 vpbroadcastd zmm13, YMM_ONE ; Load constant 1 fac ENDP _TEXT ENDS END

generates an error: Error A2049: Invalid instruction operands the AVX-512 broadcast assembles OK note it assembles OK if YMM_ONE is declared as "YMM_ONE DD 1"

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Terraspace/UASM/issues/157 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEAZAVGS6PDCJF37SDNIKRTT6A4VTANCNFSM5CSKTF3Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

gwoltman commented 3 years ago

YMMWORD PTR does not work

The workaround is defining YMM_ONE as YMM_ONE DD 1 REST_OF_YMM_ONE DD 0,1,0,1,0,1,0

This is not a high priority issue

john-terraspace commented 2 years ago

Fixed in 2.55