-
Notifications
You must be signed in to change notification settings - Fork 0
Add tests for MachRegister::getBaseRegister #7
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
Conversation
kupsch
left a comment
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.
I think it be worth add a couple of more checks for x86 and x86_64, otherwise looks good (the suggested changes are untested).
I would think the AMD scalar and vector registers should be their own base register, so that is likely a bug unless @bbiiggppiigg says otherwise.
If we are talking about the implementation in MachRegister::getBaseRegister |
|
In MachRegister.C, MachRegister::getBaseRegister, maps Sx to S0 and Vx to V0 for all values of x instead of mapping to the same register. The base register the largest containing physical register for the pseudoregister, such as x86's |
I'm confused. If I look at the current implementation |
|
Never mind. The code is the identity function, but confusing. Here is the code: It clears all but the lower byte of reg, and then ors the upper 3 bytes of s0 along with a zero for the lower byte. This results in the same value as |
|
I've disabled running the amdgpu tests until we can decide on how best to represent their base registers. |
The x86 tests won't pass until dyninst/dyninst#1851 is merged.
@bbiiggppiigg The amd gpu checks seem to be no-ops since it just stuffs the ID into s0, but that's the same as adding the ID to 0. For example,
Should it be mapping
s<N>tos0?