Skip to content

Commit 6bc4cd7

Browse files
committed
[CHERI] Remove dead code related to Mips CHERI compartment calls.
1 parent d20a6df commit 6bc4cd7

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

llvm/lib/Target/Mips/MipsCallingConv.td

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,6 @@ def CC_MipsN : CallingConv<[
173173
CCIfType<[c64, c128, c256], CCDelegateTo<CC_MipsCheriCapOnStack>>
174174
]>;
175175

176-
def CC_CHERI_CCall : CallingConv<[
177-
CCIfType<[c64, c128, c256], CCAssignToReg<[C1, C2, C3, C4, C5, C6, C7, C8, C9, C10]>>,
178-
CCIfType<[i64], CCAssignToReg<[V0_64]>>,
179-
CCDelegateTo<CC_MipsN>
180-
]>;
181-
182176
// N32/64 variable arguments.
183177
// All arguments are passed in integer registers.
184178
def CC_MipsN_VarArg : CallingConv<[

llvm/lib/Target/Mips/MipsISelLowering.cpp

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -4465,8 +4465,6 @@ MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
44654465

44664466
CCInfo.rewindByValRegsInfo();
44674467

4468-
unsigned CapArgs = 0;
4469-
unsigned IntArgs = 0;
44704468
int FirstOffset = -1;
44714469
int LastOffset;
44724470

@@ -4562,11 +4560,6 @@ MipsTargetLowering::LowerCall(TargetLowering::CallLoweringInfo &CLI,
45624560
// Arguments that can be passed on register must be kept at
45634561
// RegsToPass vector
45644562
if (VA.isRegLoc()) {
4565-
if (ValVT.isFatPointer())
4566-
CapArgs++;
4567-
else if ((VA.getLocReg() >= Mips::A0_64) &&
4568-
(VA.getLocReg() <= Mips::T3_64))
4569-
IntArgs++;
45704563
RegsToPass.push_back(std::make_pair(VA.getLocReg(), Arg));
45714564

45724565
// If the parameter is passed through reg $D, which splits into
@@ -5208,10 +5201,6 @@ MipsTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv,
52085201

52095202
SDValue Glue;
52105203
SmallVector<SDValue, 4> RetOps(1, Chain);
5211-
bool zeroV0 = true;
5212-
bool zeroV1 = true;
5213-
bool zeroC3 = true;
5214-
bool zeroC4 = true;
52155204

52165205
// Copy the result values into the output registers.
52175206
for (unsigned i = 0; i != RVLocs.size(); ++i) {
@@ -5257,22 +5246,6 @@ MipsTargetLowering::LowerReturn(SDValue Chain, CallingConv::ID CallConv,
52575246
}
52585247

52595248
Chain = DAG.getCopyToReg(Chain, DL, VA.getLocReg(), Val, Glue);
5260-
switch (VA.getLocReg()) {
5261-
case Mips::V0_64:
5262-
case Mips::V0:
5263-
zeroV0 = false;
5264-
break;
5265-
case Mips::V1_64:
5266-
case Mips::V1:
5267-
zeroV1 = false;
5268-
break;
5269-
case Mips::C3:
5270-
zeroC3 = false;
5271-
break;
5272-
case Mips::C4:
5273-
zeroC4 = false;
5274-
break;
5275-
}
52765249

52775250
// Guarantee that all emitted copies are stuck together with flags.
52785251
Glue = Chain.getValue(1);

0 commit comments

Comments
 (0)