-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[Linux] xenia-cpu-ppc-tests #803
base: master
Are you sure you want to change the base?
Conversation
Reformatted and rebased. It looks like I should have really used clang-3.8 before. |
Thanks for the PR! This looks pretty exciting - give me some time and I'll review it later. |
@@ -203,13 +203,21 @@ inline bool bit_scan_forward(uint64_t v, uint32_t* out_first_set_index) { | |||
#else | |||
inline bool bit_scan_forward(uint32_t v, uint32_t* out_first_set_index) { | |||
int i = ffs(v); | |||
*out_first_set_index = i; | |||
return i != 0; | |||
if (i == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For brevity, you could use the ternary operator (*out_first_set_index = i == 0 ? 0 : i - 1;
)
} | ||
inline bool bit_scan_forward(uint64_t v, uint32_t* out_first_set_index) { | ||
int i = ffsll(v); | ||
*out_first_set_index = i; | ||
return i != 0; | ||
if (i == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
@@ -61,19 +68,34 @@ bool QueryProtect(void* base_address, size_t& length, PageAccess& access_out) { | |||
|
|||
FileMappingHandle CreateFileMappingHandle(std::wstring path, size_t length, | |||
PageAccess access, bool commit) { | |||
return nullptr; | |||
int fd = open("/dev/zero", O_RDWR); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like you ignore the requested access mode here (O_RDWR
)
Not too big of a deal here, I can update this with my implementation.
@@ -518,24 +569,47 @@ GuestToHostThunk X64ThunkEmitter::EmitGuestToHostThunk() { | |||
extern "C" uint64_t ResolveFunction(void* raw_context, uint32_t target_address); | |||
|
|||
ResolveFunctionThunk X64ThunkEmitter::EmitResolveFunctionThunk() { | |||
// ebx = target PPC address | |||
// rcx = context | |||
// ebx = target PPC address |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something happened to the spacing here.
static_cast<unsigned __int128>(other->constant.i64)); | ||
(static_cast<unsigned __int128>(constant.u64) * | ||
static_cast<unsigned __int128>(other->constant.u64)) >> | ||
64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch!
Thank you for the review. I'm sorry but I won't be able to continue working on this. Unfortunately I'm swamped right now and it doesn't look like it will change anytime soon. Please just take whatever, if anything, you find useful. |
No problem. I'll work on this as I find the time and energy. Appreciate the contribution! |
Hi,
This pull request fixes #670 (and also partially #356). I've tried to change as little as possible in Windows code.
Comments:
Thanks.