Page MenuHomePhabricator

[mips] Correct MIPS16 jal/jalx to have uimm26 offsets and add MC layer range checks. NFC.
ClosedPublic

Authored by dsanders on Mar 15 2016, 4:34 AM.

Details

Summary

However, this has no effect at this time because the instructions affected
are marked 'isCodeGenOnly=1' and have no alternative for the MC layer.

Diff Detail

Event Timeline

dsanders updated this revision to Diff 50714.Mar 15 2016, 4:34 AM
dsanders retitled this revision from to [mips] Correct MIPS16 jal/jalx to have uimm26 offsets and add MC layer range checks. NFC..
dsanders updated this object.
dsanders added a reviewer: vkalintiris.
dsanders added a subscriber: llvm-commits.
vkalintiris accepted this revision.Mar 21 2016, 9:11 AM
vkalintiris edited edge metadata.

LGTM. I was going to ask for few test cases, as you've done with the previous patches. However, I noticed that we don't have mips16 tests for MC.

This revision is now accepted and ready to land.Mar 21 2016, 9:11 AM

LGTM. I was going to ask for few test cases, as you've done with the previous patches. However, I noticed that we don't have mips16 tests for MC.

That's right (because MIPS16 lacks any IAS support at the moment) but it's not the reason for the lack of tests. These particular instructions are marked isCodeGenOnly so tablegen doesn't generate matching code for the assembly matcher in IAS. As a result, my change has no effect but I want to avoid leaving an unchecked immediate operand for whoever adds MIPS16 support to the MC layer in the future.

dsanders closed this revision.Mar 29 2016, 2:45 AM