Illegal instruction in 64-bit code

I've always wanted to play the game Horizon Zero Dawn since it was released for the PlayStation 4 in 2017. In 2020-07 it was released for PC, but since it was DRM-ridden, I did not buy it then.

In 2022-12 I found it on gog.com for a reasonable price of 17€ and bought it. After downloading the 74 GiB with the command-line tool LGOGDownloader and installing it with Wine 8.0-rc2, I started it and got a crash:

Unhandled exception: illegal instruction in 64-bit code (0x00000140118cb7).

It turned out that HorizonZeroDawn.exe uses CPU instructions that my processor (AMD Phenom II X4 945 from 2009) does not support. The minimum system requirements say that an AMD FX 6300 is needed, which was released in 2012.

Which illegal instructions?

It is possible to see which opcodes are used in an executable.

Combining objdump with some grep will give you the list of CPU instructions. I used cpu_features.py to get the list, and it showed me that AVX and SSE4 instructions are used:

$ python2 cpu_features.py HorizonZeroDawn.exe
[...]
x64:
	sse4.1:
		pextrw
		pextrq
	sse4.2:
		crc32
[...]
sandybridge:
	avx:
		vcvtss2sd
		vpmuludq
		vpsrlq
		vpcmpgtd
		vcvtsd2ss
		vaesenc
		vsqrtss
[...]

Just listing the instructions does not mean that they are actually used, because the programs can have checks that use certain opcodes only when the CPU supports it.

Patch 1.08: AVX

Many players complained about Horizon requiring AVX, and so version 1.08 was released that removed that requirement:

Fixed a start-up crash for CPUs that do not support AVX instructions

SSE 4

This leaves the SSE4 opcodes that are also not supported by my processor :-/ I will have buy a new CPU + mainboard until I am able to play the game.

Someone on the internet provides binaries for processors without SSE4.x support but those executables are for the Steam and Epic versions only, and not for the GOG one :(

Written by Christian Weiske.

Comments? Please send an e-mail.