Author Topic: uasm 2.47.0 shifting integers psllw invalid instruction  (Read 475 times)

KradMoonRa

  • Regular Member
  • *
  • Posts: 24
uasm 2.47.0 shifting integers psllw invalid instruction
« on: April 14, 2018, 12:18:33 AM »
invalid instruction with shifting integers xmm for see2

psllw
pslld
psllq
psraw
psrad
psrlw
psrld
psrlq

Code: [Select]
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.
Code: [Select]
(switch (CodeInfo->token){)commented:
line 373 to 381:
Code: [Select]
        /*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.
 

 
« Last Edit: April 14, 2018, 02:54:54 AM by KradMoonRa »

habran

  • Member
  • *****
  • Posts: 1175
    • uasm
Re: uasm 2.47.0 shifting integers psllw invalid instruction
« Reply #1 on: April 15, 2018, 05:37:30 AM »
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:
Code: [Select]
        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