[PATCH] D134220: [MIPS] Fix useDeprecatedPositionallyEncodedOperands errors.

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 19 13:20:12 PDT 2022


jyknight created this revision.
jyknight added a reviewer: atanasyan.
Herald added subscribers: jrtc27, hiraditya, arichardson, sdardis.
Herald added a project: All.
jyknight requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is a follow-on to https://reviews.llvm.org/D134073.

The number of MIPS16 changes here is a bit surprising -- and even more
so because my changes have not preserved existing behavior. Many of
the fields with mismatched names were NOT previously choosing the
correct argument positionally, but instead doing something completely
wrong (e.g. it would encode a register where an immediate was
expected).

So, I would guess that the machine-code generation for MIPS16 has
never actually functioned. It's also fully untested, thus, these
changes, despite changing behavior, breaks (and fixes) zero tests.

Outside MIPS16, I believe the only functional change is to the 'ginvi'
instruction: it was previously encoding garbage into a field which was
specified to be '00'. Fortunately, it was covered by tests -- and the
tests were testing the incorrect behavior. So, fixed.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134220

Files:
  llvm/lib/Target/Mips/MicroMips32r6InstrFormats.td
  llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td
  llvm/lib/Target/Mips/MicroMipsInstrFormats.td
  llvm/lib/Target/Mips/Mips.td
  llvm/lib/Target/Mips/Mips16InstrFormats.td
  llvm/lib/Target/Mips/Mips16InstrInfo.td
  llvm/lib/Target/Mips/Mips32r6InstrInfo.td
  llvm/lib/Target/Mips/MipsEVAInstrFormats.td
  llvm/lib/Target/Mips/MipsEVAInstrInfo.td
  llvm/test/MC/Disassembler/Mips/ginv/valid-el.txt
  llvm/test/MC/Disassembler/Mips/ginv/valid-micromips-el.txt
  llvm/test/MC/Disassembler/Mips/ginv/valid-micromips.txt
  llvm/test/MC/Disassembler/Mips/ginv/valid.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134220.461336.patch
Type: text/x-patch
Size: 17139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220919/199bdc8d/attachment.bin>


More information about the llvm-commits mailing list