[PATCH] D115853: [RISCV][NFC] Move ilp32e/rv32e checks to AsmParser and TargetLowering
Yueh-Ting Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 16 08:28:12 PST 2021
eopXD updated this revision to Diff 394890.
eopXD marked an inline comment as done.
eopXD added a comment.
Delete redundant code.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115853/new/
https://reviews.llvm.org/D115853
Files:
llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
Index: llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
===================================================================
--- llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
+++ llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
@@ -51,11 +51,6 @@
errs() << "64-bit ABIs are not supported for 32-bit targets (ignoring "
"target-abi)\n";
TargetABI = ABI_Unknown;
- } else if (IsRV32E && TargetABI != ABI_ILP32E && TargetABI != ABI_Unknown) {
- // TODO: move this checking to RISCVTargetLowering and RISCVAsmParser
- errs()
- << "Only the ilp32e ABI is supported for RV32E (ignoring target-abi)\n";
- TargetABI = ABI_Unknown;
}
if (TargetABI != ABI_Unknown)
Index: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
===================================================================
--- llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -252,6 +252,10 @@
errs() << "Hard-float 'd' ABI can't be used for a target that "
"doesn't support the D instruction set extension (ignoring "
"target-abi)\n";
+ } else if (!ABIName.endswith("e") &&
+ getSTI().getFeatureBits()[RISCV::FeatureRV32E]) {
+ errs() << "Only the ilp32e ABI is supported for RV32E (ignoring "
+ "target-abi)\n";
}
const MCObjectFileInfo *MOFI = Parser.getContext().getObjectFileInfo();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115853.394890.patch
Type: text/x-patch
Size: 1460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211216/77665d61/attachment.bin>
More information about the llvm-commits
mailing list