This is an archive of the discontinued LLVM Phabricator instance.

[mips][dsp] Modify repl.ph to accept signed immediate values
ClosedPublic

Authored by smaksimovic on May 26 2017, 6:21 AM.

Details

Summary

Changed immediate type for repl.ph from uimm10 to simm10 as per the specs.
Repl.qb still accepts uimm8. Both instructions now mimic the behaviour of GNU as.

Diff Detail

Event Timeline

smaksimovic created this revision.May 26 2017, 6:21 AM
sdardis requested changes to this revision.May 30 2017, 7:27 AM

You also need to update:

Failing Tests (2):

LLVM :: MC/Mips/dsp/invalid.s
LLVM :: MC/Mips/micromips-dsp/valid.s

Could you also ensure the ranges are fully checked in the invalid cases in the invalid test for both dsp and micromips-dsp?.

lib/Target/Mips/MipsDSPInstrInfo.td
21–22

These two should be in ascending order.

This revision now requires changes to proceed.May 30 2017, 7:27 AM
smaksimovic edited edge metadata.

Updated failing tests and added checks for invalid cases in micromips-dsp.

sdardis accepted this revision.May 31 2017, 8:22 AM

LGTM with inline nit addressed.

test/MC/Disassembler/Mips/micromips-dsp/valid.txt
97 ↗(On Diff #100851)

Nit: Where possible, avoid the use of 0 as a constant in these sort of tests. If the memory used by the compiler is zero-initialized, the test may be unstably passing.

test/MC/Mips/micromips-dsp/valid.s
98 ↗(On Diff #100851)

Here too.

This revision is now accepted and ready to land.May 31 2017, 8:22 AM

Nits fixed.

This revision was automatically updated to reflect the committed changes.