[llvm] 0f99958 - [Lanai] Fix useDeprecatedPositionallyEncodedOperands errors.
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 25 14:55:34 PDT 2022
Author: James Y Knight
Date: 2022-09-25T17:55:09-04:00
New Revision: 0f99958e7979a2cb57f997a7ea81649c30c54c02
URL: https://github.com/llvm/llvm-project/commit/0f99958e7979a2cb57f997a7ea81649c30c54c02
DIFF: https://github.com/llvm/llvm-project/commit/0f99958e7979a2cb57f997a7ea81649c30c54c02.diff
LOG: [Lanai] Fix useDeprecatedPositionallyEncodedOperands errors.
This is a follow-on to https://reviews.llvm.org/D134073.
Lanai was almost clean: the only issue is that 'bit' behaves
differently than 'bits<1>', because only the 'bits' type preserves
unresolved references via 'keepUnsetBits()' in
TableGen/Record.h. Thus, use bits instead.
This issue _would_ have caused invalid instruction emission/decoding,
except that the PQ bits were being overriden after the fact by code in
'adjustPqBits' in MCTargetDesc/LanaiMCCodeEmitter.cpp, and
'PostOperandDecodeAdjust' in Disassembler/LanaiDisassembler.cpp.
Differential Revision: https://reviews.llvm.org/D134075
Added:
Modified:
llvm/lib/Target/Lanai/Lanai.td
llvm/lib/Target/Lanai/LanaiInstrFormats.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/Lanai/Lanai.td b/llvm/lib/Target/Lanai/Lanai.td
index d2780177a05d2..c6d949f42047e 100644
--- a/llvm/lib/Target/Lanai/Lanai.td
+++ b/llvm/lib/Target/Lanai/Lanai.td
@@ -21,9 +21,7 @@ include "LanaiRegisterInfo.td"
include "LanaiCallingConv.td"
include "LanaiInstrInfo.td"
-def LanaiInstrInfo : InstrInfo {
- let useDeprecatedPositionallyEncodedOperands = 1;
-}
+def LanaiInstrInfo : InstrInfo;
//===----------------------------------------------------------------------===//
// Lanai processors supported.
diff --git a/llvm/lib/Target/Lanai/LanaiInstrFormats.td b/llvm/lib/Target/Lanai/LanaiInstrFormats.td
index 4101aa912ade4..5c21d203edf26 100644
--- a/llvm/lib/Target/Lanai/LanaiInstrFormats.td
+++ b/llvm/lib/Target/Lanai/LanaiInstrFormats.td
@@ -197,8 +197,8 @@ class InstRM<bit S, dag outs, dag ins, string asmstr, list<dag> pattern>
: InstLanai<outs, ins, asmstr, pattern> {
bits<5> Rd;
bits<5> Rs1;
- bit P;
- bit Q;
+ bits<1> P;
+ bits<1> Q;
bits<16> imm16;
// Dummy variables to allow multiclass definition of RM and RRM
bits<2> YL;
@@ -259,8 +259,8 @@ class InstRRM<bit S, dag outs, dag ins, string asmstr,
bits<5> Rd;
bits<5> Rs1;
bits<5> Rs2;
- bit P;
- bit Q;
+ bits<1> P;
+ bits<1> Q;
bits<3> BBB;
bits<5> JJJJJ;
bits<2> YL;
@@ -504,8 +504,8 @@ class InstSPLS<dag outs, dag ins, string asmstr,
bit Y;
bit S;
bit E;
- bit P;
- bit Q;
+ bits<1> P;
+ bits<1> Q;
bits<10> imm10;
let Opcode = 0b1111;
More information about the llvm-commits
mailing list