This is an archive of the discontinued LLVM Phabricator instance.

[mips] Fix sync instruction definition
ClosedPublic

Authored by sdardis on Oct 17 2016, 6:11 AM.

Details

Summary

The 'sync' instruction for MIPS was defined in MIPS-II as taking no operands.
MIPS32 extended the define of 'sync' as taking an optional unsigned 5 bit
immediate.

This patch correct the definition of sync so that it is accepted with an
operand of 0 or no operand for MIPS-II to MIPS-V, and a 5 bit unsigned
immediate for MIPS32 and later revisions.

Additionally a clear error is given when the MIPS32 version of sync is
used when targeting pre MIPS32.

This partially resolves PR/30714.

Thanks to Daniel Sanders for reporting this issue!

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis updated this revision to Diff 74833.Oct 17 2016, 6:11 AM
sdardis retitled this revision from to [mips] Fix sync instruction definition.
sdardis updated this object.
sdardis added a reviewer: vkalintiris.
sdardis set the repository for this revision to rL LLVM.
sdardis added a subscriber: llvm-commits.
vkalintiris accepted this revision.Oct 18 2016, 7:18 AM
vkalintiris edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Oct 18 2016, 7:18 AM
This revision was automatically updated to reflect the committed changes.