Skip to content

Commit 0fa50d3

Browse files
committed
[CHERIoT] Add assertions to make incorrect codegen on XCheriot due to TLS more apparent.
1 parent 8ea7c18 commit 0fa50d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Target/RISCV/RISCVExpandPseudoInsts.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -808,6 +808,7 @@ bool RISCVExpandPseudo::expandCapLoadTLSIEAddress(
808808
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
809809
MachineBasicBlock::iterator &NextMBBI) {
810810
MachineFunction *MF = MBB.getParent();
811+
assert(!STI->hasVendorXCheriot() && "TLS is not supported on XCheriot!");
811812

812813
const auto &STI = MF->getSubtarget<RISCVSubtarget>();
813814
unsigned SecondOpcode = STI.is64Bit() ? RISCV::CLD : RISCV::CLW;
@@ -818,6 +819,7 @@ bool RISCVExpandPseudo::expandCapLoadTLSIEAddress(
818819
bool RISCVExpandPseudo::expandCapLoadTLSGDCap(
819820
MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
820821
MachineBasicBlock::iterator &NextMBBI) {
822+
assert(!STI->hasVendorXCheriot() && "TLS is not supported on XCheriot!");
821823
return expandAuipccInstPair(MBB, MBBI, NextMBBI, RISCVII::MO_TLS_GD_HI,
822824
RISCV::CIncOffsetImm);
823825
}

0 commit comments

Comments
 (0)