News:

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

Main Menu

uasm 2.47.0 shifting integers psllw invalid instruction

Started by KradMoonRa, April 14, 2018, 12:18:33 AM

Previous topic - Next topic

KradMoonRa

invalid instruction with shifting integers xmm for see2

psllw
pslld
psllq
psraw
psrad
psrlw
psrld
psrlq

psrlq    xmm0, xmm1 ;invalid instruction
psrlq    xmm0, 225 ;invalid instruction


uasm not permitting to use with evex, but also blocks if used with for sse2 only xmm.


Found the file codegen.c in line 337.
(switch (CodeInfo->token){)
commented:
line 373 to 381:
        /*case   T_PSLLDQ:
        case   T_PSRLDQ:
        case   T_PSLLW:
        case   T_PSLLD:
        case   T_PSLLQ:
        case   T_PSRAW:
        case   T_PSRAD:
        case   T_PSRAQ:
        case   T_PSRLW:
        case   T_PSRLD:
        case   T_PSRLQ:*/


Do now the implications with the arch evex if doing this, but resolved the invalid instruction assembling for sse2.



The uasmlib

habran

Good find KradMoonRa :t
it was supposed to be for AVX and EVEX instruction and not for SSE, that was a typo of copy-paste with omitted T_V ::)
it should be:

        case   T_VPSLLDQ:
        case   T_VPSRLDQ:
        case   T_VPSLLW:
        case   T_VPSLLD:
        case   T_VPSLLQ:
        case   T_VPSRAW:
        case   T_VPSRAD:
        case   T_VPSRAQ:
        case   T_VPSRLW:
        case   T_VPSRLD:
        case   T_VPSRLQ:


will be fixed ASAP
Cod-Father