Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

_mm_extract_epi32: Invalid opcode

Zvi_Vered
Beginner
690 Views
Hello,

I'm using Intel compiler 11.1 / 064

I tried to run a code that contains: _mm_extract_epi32 and got "Invalid opcode"

The machine code I got for _mm_extract_epi32 is:
.byte 0x66,0xF,0x3A

_mm_extract_epi16 works fine.

The CPU is Core2Duo.

What is the reason for "Invalid Opcode" ?

Thanks,
Zvika.
0 Kudos
2 Replies
Om_S_Intel
Employee
690 Views
I think your CPU do not support this instruction. I can run the forllowing code segment in my Intel Core i5:

#include

#include

int main ()

{

__m128i a;

const int ndx1 = 1;

const int ndx2 = 2;

a.m128i_i32[0] = 0;

a.m128i_i32[1] = 65535;

a.m128i_i32[2] = -320000000;

a.m128i_i32[3] = 128;

int res = _mm_extract_epi32(a, ndx1);

printf_s("Result res should equal %d: %d\n", a.m128i_i32[ndx1], res);

res = _mm_extract_epi32(a, ndx2);

printf_s("Result res should equal %d: %d\n", a.m128i_i32[ndx2], res);

return 0;

}

c:\>icl tstcase.cpp

Intel C++ Intel 64 Compiler XE for applications running on Intel 64, Version 12.0.1.127 Build 20101116

Copyright (C) 1985-2010 Intel Corporation. All rights reserved.

tstcase.cpp

Microsoft Incremental Linker Version 10.00.30319.01

Copyright (C) Microsoft Corporation. All rights reserved.

-out:tstcase.exe

tstcase.obj

c:\>tstcase.exe

Result res should equal 65535: 65535

Result res should equal -320000000: -320000000

0 Kudos
TimP
Honored Contributor III
690 Views
I think your CPU do not support this instruction.

For example, the Core 2 Duo T7300, on which I am running presently, is shown at ark.intel.com as "Obsolete" Merom family processor. ICL option -Qxhost should come out as -QxSSSE3. Merom processors don't support any SSE4 instructions, although Core 2 Duo Penryn family CPUs (introduced since 2008) do support them.
0 Kudos
Reply