Hi,
I am having trouble with AVX2 instructions generated by HJWasm. The following code appears to assemble and execute fine:
00000000 temp proc
00000000 C4E27918CA vbroadcastss xmm1, xmm2
00000005 temp endp
However, the following code causes an "illegal instruction" exception:
00000000 temp proc
00000000 62F27D0878CA vpbroadcastb xmm1, xmm2
00000006 temp endp
Intel's Software Development Manual defines the two instructions as:
VEX.128.66.0F38.W0 18 /r RM V/V AVX2
VBROADCASTSS xmm1, xmm2
VEX.128.66.0F38.W0 78 /r RM V/V AVX2
VPBROADCASTB xmm1, xmm2/m8
The encoding for
vpbroadcastb appears to be one byte too long. Can anybody confirm if both of the above generated encodings match Intel's definitions?
The execution environment is Windows 7 Ultimate SP1 inside a VirtualBox virtual machine. Specifically, v5.0.0.r101573 on Ubuntu 15.04 which has AVX/AVX2 enabled (see
https://www.virtualbox.org/wiki/Changelog). Underlying CPU is Skylake.
Inside the virtual machine,
CPUID reports:
CPUID[EAX=01h].ECX == 018000000h (OSXSAVE and AVX enabled)
CPUID[EAX=07h].EBX == 000000020h (AVX2 enabled)
XGETBV[ECX=00h].EAX == 000000006h (XMM and YMM state enabled)
Has anybody else checked running AVX2 instructions generated by HJWasm? Either on a real machine or inside a VirtualBox VM?
Thanks in advance.