dolphin icon indicating copy to clipboard operation
dolphin copied to clipboard

Remove _M_X86 in favour of _M_X86_64

Open Zopolis4 opened this issue 3 years ago • 1 comments

This removes an unnecessary definition, improves clarity and is functionally identical to before.

Zopolis4 avatar Aug 08 '22 00:08 Zopolis4

In Hash.cpp, GetHash64_SSE42_CRC32 has 32-bit variant which get compiled instead of the 64-bit variant if _M_X86 is defined while _M_X86_64 is not. This is clearly legacy code from when Dolphin still supported 32-bit, though, so you could probably remove it.

Minty-Meeo avatar Aug 19 '22 04:08 Minty-Meeo

There seems to be library code that only uses _M_X86:

https://github.com/dolphin-emu/dolphin/blob/b66793194e7b9e34080764e5985d49055ccaa37d/Externals/zstd/lib/common/compiler.h#L92-L105

https://github.com/dolphin-emu/dolphin/blob/b66793194e7b9e34080764e5985d49055ccaa37d/Externals/liblzma/config.h#L154-L157

https://github.com/dolphin-emu/dolphin/blob/b66793194e7b9e34080764e5985d49055ccaa37d/Externals/liblzma/config.h#L370-L374

I'm not sure what to do about that. I think you can just edit the liblzma config, and __x86_64__ may be automatically defined, though.

Pokechu22 avatar Oct 24 '22 20:10 Pokechu22

I feel uneasy about it, but I've edited the liblzma files.

Zopolis4 avatar Dec 14 '22 22:12 Zopolis4