diff options
| author | Simon Dardis <simon.dardis@imgtec.com> | 2016-10-18 14:42:13 +0000 |
|---|---|---|
| committer | Simon Dardis <simon.dardis@imgtec.com> | 2016-10-18 14:42:13 +0000 |
| commit | c4463c942c0914bc7c9f0bef16b14aef142cedad (patch) | |
| tree | 64058c1a00163f205907a98a4b8711575f3fbf5f /llvm/lib/Target/Mips/MipsInstrInfo.td | |
| parent | 197aa3192dd8d25330c23274a0d257c6130e4e09 (diff) | |
| download | bcm5719-llvm-c4463c942c0914bc7c9f0bef16b14aef142cedad.tar.gz bcm5719-llvm-c4463c942c0914bc7c9f0bef16b14aef142cedad.zip | |
[mips] Fix sync instruction definition
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!
Reveiwers: vkalintiris
Differential Revision: https://reviews.llvm.org/D25672
llvm-svn: 284483
Diffstat (limited to 'llvm/lib/Target/Mips/MipsInstrInfo.td')
| -rw-r--r-- | llvm/lib/Target/Mips/MipsInstrInfo.td | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/MipsInstrInfo.td b/llvm/lib/Target/Mips/MipsInstrInfo.td index 2900a3f4e66..ea4a8e68b71 100644 --- a/llvm/lib/Target/Mips/MipsInstrInfo.td +++ b/llvm/lib/Target/Mips/MipsInstrInfo.td @@ -1876,8 +1876,7 @@ let DecoderNamespace = "COP3_" in { } } -def SYNC : MMRel, StdMMR6Rel, SYNC_FT<"sync">, SYNC_FM, - ISA_MIPS32; +def SYNC : MMRel, StdMMR6Rel, SYNC_FT<"sync">, SYNC_FM, ISA_MIPS2; def SYNCI : MMRel, StdMMR6Rel, SYNCI_FT<"synci">, SYNCI_FM, ISA_MIPS32R2; let AdditionalPredicates = [NotInMicroMips] in { |

