This is an archive of the discontinued LLVM Phabricator instance.

Add float/vector registers for ppc64le
ClosedPublic

Authored by alexandreyy on Nov 1 2017, 5:15 AM.

Details

Summary

Add read and write functions for VSX, VMX and float registers and fix watchpoint size

Event Timeline

alexandreyy created this revision.Nov 1 2017, 5:15 AM
clayborg accepted this revision.Nov 1 2017, 9:51 AM
clayborg added a subscriber: clayborg.

Looks fine.

This revision is now accepted and ready to land.Nov 1 2017, 9:51 AM

@clayborg Thanks for the review.

@eugene , @labath Could you, please, commit this patch?
I don't have the permission for it.

labath added inline comments.Nov 2 2017, 5:31 AM
source/Plugins/Process/Linux/NativeRegisterContextLinux_ppc64le.cpp
534

Isn't this somewhat over-engineered?

I mean, GetVMXBuffer returns a pointer to a member variable, so it's pretty much impossible for it to be null. And all GetVMXSize does is return the size of that member variable. If we remove all this boilerplate then this becomes something like:

int regset = NT_PPC_VMX;
return NativeProcessLinux::PtraceWrapper(PTRACE_SETVRREGS, m_thread.GetID(),
                                         &regset, &m_vmx_ppc64le, sizeof(m_vmx_ppc64le));

which I think is much easier to follow than jumping through dozens of these tiny functions

Simplified vector register methods

Thanks @labath.
I adjusted the VSX and VMX methods.

labath added a comment.Nov 3 2017, 8:16 AM

Thank you, I'll commit that right away.

This revision was automatically updated to reflect the committed changes.