Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove _M_X86 in favour of _M_X86_64 #10965

Merged
merged 2 commits into from Nov 28, 2023
Merged

Remove _M_X86 in favour of _M_X86_64 #10965

merged 2 commits into from Nov 28, 2023

Conversation

Zopolis4
Copy link
Contributor

@Zopolis4 Zopolis4 commented Aug 8, 2022

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

@Minty-Meeo
Copy link
Contributor

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.

@Pokechu22
Copy link
Contributor

There seems to be library code that only uses _M_X86:

/* Enable runtime BMI2 dispatch based on the CPU.
* Enabled for clang & gcc >=4.8 on x86 when BMI2 isn't enabled by default.
*/
#ifndef DYNAMIC_BMI2
#if ((defined(__clang__) && __has_attribute(__target__)) \
|| (defined(__GNUC__) \
&& (__GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)))) \
&& (defined(__x86_64__) || defined(_M_X86)) \
&& !defined(__BMI2__)
# define DYNAMIC_BMI2 1
#else
# define DYNAMIC_BMI2 0
#endif
#endif

#ifdef _M_X86
/* Define to 1 if you have the <immintrin.h> header file. */
#define HAVE_IMMINTRIN_H 1
#endif

#ifdef _M_X86
/* Define to 1 if the system supports fast unaligned access to 16-bit and
32-bit integers. */
#define TUKLIB_FAST_UNALIGNED_ACCESS 1
#endif

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.

@Zopolis4
Copy link
Contributor Author

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

Copy link
Member

@Tilka Tilka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase.

@Tilka Tilka merged commit 5d98385 into dolphin-emu:master Nov 28, 2023
11 checks passed
@Zopolis4 Zopolis4 deleted the hex86 branch November 28, 2023 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants