Page 1 of 1

Warning 2461: Why Immediate value (*) should not exceed 7 raised for shufps?

Posted: 17 Nov 2024 20:06
by AndreyDmitriev
Hi!
Strange warning appear in attempt to use shufps:


|000000E4:66490F6ED8 | movq xmm3, r8
|000000E9:66480F6EE0 | movq xmm4, rax
|000000EE:0FC6DC11 | shufps xmm3,xmm4,00010001b
|## W2461 Immediate value (17) should not exceed 7.
|000000F2: |


In my humble understanding such mask is valid for shufps and this should not exceed 255, but not 7, or did I missing something?

Andrey.

Re: Warning 2461: Why Immediate value (*) should not exceed 7 raised for shufps?

Posted: 18 Nov 2024 06:10
by vitsoft
No, you didn't miss anything; according to the description in SHUFPS, shuffle instructions use imm8[1:0], imm8[3:2], imm8[5:4], imm8[7:6] and the value of immediate operand 0..255 is legal. I must have misunderstand the selection mechanism of the third operand years ago :oops:

This bug will be fixed in the next version of EuroAssembler. Until then you can ignore the warning or suppress it with EuroAsm NoWarn=2461.
In the source file iip.htm the line 4727 IiEmitImm Operand3, BYTE, Max=7 will change to IiEmitImm Operand3, BYTE, Max=255.

Thank you for noticing.