gox86-64disassembly

How to get related instruction code from instruction bytes?


I got the following error message when I run a Go program which contains some Go assembler codes:

SIGILL: illegal instruction
PC=0x508c04 m=0 sigcode=2
instruction bytes: 0xc4 0x42 0x68 0xf2 0xea 0xc5 0xf9 0xef 0xc1 0x41 0x9 0xfd 0x45 0x1 0xee 0xc1

How can i get related instruction code from the instruction bytes? I tried https://github.com/golang/arch Decode method, but I just got opcode 0.

From the first byte 0xc4, it should be VEX Prefix.

CPU: Intel(R) Xeon(R) CPU E5-2620)
Operating system: Linux


Solution

  • This is ANDN, which is part of the BMI1 instruction set. On Intel, BMI1 is supported by Haswell and newer, but your chip is Sandy Bridge, which is a generation (or two, depending on how you count) too old.