Home >Backend Development >Golang >How to get the relevant instruction code from the instruction byte?
When I run a Go program that contains some Go assembly code, I receive the following error message:
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 to get the relevant instruction code from the instruction byte? I tried the https://github.com/golang/arch Decode method but I only got opcode 0.
Starting from the first byte 0xc4, it should be the VEX prefix.
CPU:Intel(R) Xeon(R) CPU E5-2620)
Operating system: Linux
This is ANDN, which is part of the BMI1 instruction set. On Intel, Haswell and newer support BMI1, but your chip is Sandy Bridge, which is a generation (or two, depending on how you count) too old.
The above is the detailed content of How to get the relevant instruction code from the instruction byte?. For more information, please follow other related articles on the PHP Chinese website!