[MIPS] Fix the opcode of max.fmt and mina.fmt (#85609)
commit028e425f86ccff44aa521c2e2ac428dbda2c13d4
authorCinhi Young <cyanoxygen2725@gmail.com>
Wed, 3 Apr 2024 02:14:02 +0000 (3 10:14 +0800)
committerTom Stellard <tstellar@redhat.com>
Wed, 17 Apr 2024 00:07:04 +0000 (16 17:07 -0700)
tree62d3b42112e6d57a176330e21f02026c408db84d
parente3c832b37b0a7b97eb16eaff2dda747093a858e2
[MIPS] Fix the opcode of max.fmt and mina.fmt (#85609)

- The opcode of the mina.fmt and max.fmt is documented wrong, the
  object code compiled from the same assembly with LLVM behaves
  differently than one compiled with GCC and Binutils.
- Modify the opcodes to match Binutils. The actual opcodes are as
follows:

  {5,3} | bits {2,0} of func
           |    ...   | 100  | 101    | 110   | 111
  -----+-----+-----+-----+-----+-----
   010  |   ...   |  min  | mina | max  | maxa

(cherry picked from commit 8b859c6e4a8e9ab9969582267bbdc04ed6bfa535)
llvm/lib/Target/Mips/Mips32r6InstrInfo.td
llvm/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6-el.txt
llvm/test/MC/Disassembler/Mips/mips32r6/valid-mips32r6.txt
llvm/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6-el.txt
llvm/test/MC/Disassembler/Mips/mips64r6/valid-mips64r6.txt
llvm/test/MC/Mips/mips32r6/valid.s
llvm/test/MC/Mips/mips64r6/valid.s