Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIPS] Fix useDeprecatedPositionallyEncodedOperands errors.
This is a follow-on to https://reviews.llvm.org/D134073. The number of MIPS16 changes here is a bit surprising. 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). But, machine-code generation for MIPS16 has never actually functioned. It's also fully untested, thus, the MIPS16 changes, despite changing behavior, breaks (and fixes) zero tests. This change does not fix MIPS16 output, but it ought to be at least incrementally less broken. 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. Differential Revision: https://reviews.llvm.org/D134220
- Loading branch information
Showing
13 changed files
with
66 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# RUN: llvm-mc --disassemble %s -triple=mipsel-unknown-linux-gnu \ | ||
# RUN: -mcpu=mips32r6 -mattr=+ginv | FileCheck %s | ||
|
||
0x3d 0x02 0x40 0x7c # CHECK: ginvi $2 | ||
0x3d 0x00 0x40 0x7c # CHECK: ginvi $2 | ||
0xbd 0x02 0x40 0x7c # CHECK: ginvt $2, 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# RUN: llvm-mc --disassemble %s -triple=mipsel-unknown-linux-gnu \ | ||
# RUN: -mcpu=mips32r6 -mattr=+micromips,+ginv | FileCheck %s | ||
|
||
0x02 0x00 0x7c 0x65 # CHECK: ginvi $2 | ||
0x02 0x00 0x7c 0x61 # CHECK: ginvi $2 | ||
0x02 0x00 0x7c 0x75 # CHECK: ginvt $2, 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux-gnu \ | ||
# RUN: -mcpu=mips32r6 -mattr=+micromips,+ginv | FileCheck %s | ||
|
||
0x00 0x02 0x65 0x7c # CHECK: ginvi $2 | ||
0x00 0x02 0x61 0x7c # CHECK: ginvi $2 | ||
0x00 0x02 0x75 0x7c # CHECK: ginvt $2, 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# RUN: llvm-mc --disassemble %s -triple=mips-unknown-linux-gnu \ | ||
# RUN: -mcpu=mips32r6 -mattr=+ginv | FileCheck %s | ||
|
||
0x7c 0x40 0x02 0x3d # CHECK: ginvi $2 | ||
0x7c 0x40 0x00 0x3d # CHECK: ginvi $2 | ||
0x7c 0x40 0x02 0xbd # CHECK: ginvt $2, 2 |