[PATCH] D25672: [mips] Fix sync instruction definition

Simon Dardis via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 06:11:45 PDT 2016


sdardis created this revision.
sdardis added a reviewer: vkalintiris.
sdardis added a subscriber: llvm-commits.
sdardis set the repository for this revision to rL LLVM.

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!


Repository:
  rL LLVM

https://reviews.llvm.org/D25672

Files:
  lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  lib/Target/Mips/MipsInstrInfo.td
  test/MC/Mips/mips2/invalid-mips32.s
  test/MC/Mips/mips2/valid.s
  test/MC/Mips/mips3/invalid-mips32.s
  test/MC/Mips/mips3/valid.s
  test/MC/Mips/mips4/invalid-mips32.s
  test/MC/Mips/mips4/valid.s
  test/MC/Mips/mips5/invalid-mips32.s
  test/MC/Mips/mips5/valid.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25672.74833.patch
Type: text/x-patch
Size: 7736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161017/2c382936/attachment-0001.bin>


More information about the llvm-commits mailing list