This is an archive of the discontinued LLVM Phabricator instance.

[LLVM][MIPS] Fix createStubFunction to emit JR encoding based on Arch.
ClosedPublic

Authored by nitesh.jain on Jun 9 2016, 12:03 AM.

Details

Summary

The RuntimeDyldImpl::createStubFunction() contains hard coded JR encoding. The encoding given in this function is incorrect in case of R6 so it results in illegal instruction at runtime while evaluating expression in LLDB for MIPS32r6. This patch emit JR encoding based on Arch.

Diff Detail

Repository
rL LLVM

Event Timeline

nitesh.jain retitled this revision from to [LLVM][MIPS] Fix createStubFunction to emit JR encoding based on Arch. .
nitesh.jain updated this object.
nitesh.jain added reviewers: dsanders, vkalintiris.
nitesh.jain set the repository for this revision to rL LLVM.
nitesh.jain added subscribers: jaydeep, bhushan, slthakur and 2 others.
dsanders edited edge metadata.Jun 13 2016, 3:34 AM
dsanders added a subscriber: lhames.

This change looks correct but it ought to have a testcase.

@lhames: Is there a good way to test that the stub function was created correctly?

Hi Daniel,

Please could you find some time to review this ?

Thanks

dsanders accepted this revision.Jul 6 2016, 3:10 AM
dsanders edited edge metadata.

LGTM on the basis that the code looks right and we don't know of any means to add a test case.

This revision is now accepted and ready to land.Jul 6 2016, 3:10 AM
This revision was automatically updated to reflect the committed changes.