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

xEmitter: Convert PrefetchLevel to enum class #11966

Conversation

Dentomologist
Copy link
Contributor

Title.

I also want to explicitly assign the enum values (_MM_HINT_NTA, etc.); I can throw that in this PR or make a new one if that's worth the effort.

@@ -481,12 +481,12 @@ class XEmitter
void BSR(int bits, X64Reg dest, const OpArg& src); // Top bit to bottom bit

// Cache control
enum PrefetchLevel
enum class PrefetchLevel
Copy link
Contributor

Choose a reason for hiding this comment

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

enum class PrefetchLevel : u8

@AdmiralCurtiss
Copy link
Contributor

I also want to explicitly assign the enum values (_MM_HINT_NTA, etc.); I can throw that in this PR or make a new one if that's worth the effort.

Are those guaranteed to be identical to the values used in the actual binary instruction?

@Dentomologist Dentomologist force-pushed the convert_xemitter_prefetchlevel_to_enum_class branch from fb31977 to 04fcf68 Compare June 17, 2023 23:41
@Dentomologist
Copy link
Contributor Author

I also want to explicitly assign the enum values (_MM_HINT_NTA, etc.); I can throw that in this PR or make a new one if that's worth the effort.

Are those guaranteed to be identical to the values used in the actual binary instruction?

I would have thought so (and they are for me) but can't find a guarantee about that; I've replaced them with literals.

@AdmiralCurtiss AdmiralCurtiss merged commit 8039d10 into dolphin-emu:master Jun 18, 2023
14 checks passed
@Dentomologist Dentomologist deleted the convert_xemitter_prefetchlevel_to_enum_class branch June 18, 2023 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants