afrokick
afrokick

Reputation: 21

OSX EXC_BAD_INSTRUCTION when call _mm_shuffle_epi32

I got an error in runtime "EXC_BAD_INSTRUCTION(code=EXC_i386_INVOP)" after executed next line of code:

var1 = _mm_shuffle_epi32(x1,0xFF);

On my MacBook Pro mid 2015 code works fine. On Mac mini late 2012 an error occurs.

Both machines have:

What I'm doing wrong?

You can try to build it

Upvotes: 0

Views: 225

Answers (1)

Brendan Shanks
Brendan Shanks

Reputation: 3236

I see that var1 = _mm_shuffle_epi32(x1,0xFF) runs right after __m128i xout1 = _mm_aeskeygenassist_si128(*xout2, rcon)--this is an AES-NI instruction.

If your Mac doesn't support AES-NI, it would trigger the exact crash you're getting (EXC_BAD_INSTRUCTION). The late 2012 Mac mini should have an i5-3210M (Ivy Bridge) which supports AES-NI. Are you sure your Mac mini is late 2012?

Upvotes: 0

Related Questions