aboutsummaryrefslogtreecommitdiff
path: root/backend/unittests
diff options
context:
space:
mode:
authorRichard-Qin-X <richard.qin.001@gmail.com>2026-08-11 19:54:56 +0800
committerRichard-Qin-X <richard.qin.001@gmail.com>2026-08-11 19:54:56 +0800
commit8b797159e6c8fe1294fd2d26de3bd0992c61ea24 (patch)
tree7cc00e81b3ea30ac90528cbeca6787b321549618 /backend/unittests
parentdee2d0ab83c60c3e86214656e2e7bcd7a1cdca0d (diff)
downloadrcc-project-8b797159e6c8fe1294fd2d26de3bd0992c61ea24.tar.gz
rcc-project-8b797159e6c8fe1294fd2d26de3bd0992c61ea24.tar.xz
[RISCV] Use canonical copies for full ABI values
Diffstat (limited to 'backend/unittests')
-rw-r--r--backend/unittests/Target/RISCVCallLoweringTest.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/backend/unittests/Target/RISCVCallLoweringTest.cpp b/backend/unittests/Target/RISCVCallLoweringTest.cpp
index 514c277..d3685ae 100644
--- a/backend/unittests/Target/RISCVCallLoweringTest.cpp
+++ b/backend/unittests/Target/RISCVCallLoweringTest.cpp
@@ -2,6 +2,7 @@
#include "rcc/Target/RISCV/RISCVCallLowering.h"
+#include "rcc/CodeGen/GenericOpcodes.h"
#include "rcc/CodeGen/MachineBasicBlock.h"
#include "rcc/CodeGen/MachineFrameInfo.h"
#include "rcc/CodeGen/MachineFunction.h"
@@ -486,15 +487,16 @@ void testOrdinaryAndIndirectEmission(TestContext &Context) {
Context.expect(Instructions.size() == 5 &&
Instructions.front()->opcode() ==
opcode(rcc::riscv::InstructionOpcode::ADJCALLSTACKDOWN) &&
- Instructions.back()->opcode() ==
- opcode(rcc::riscv::InstructionOpcode::PseudoCC_COPY) &&
+ Instructions[1]->opcode() == rcc::opcode(rcc::GenericOpcode::COPY) &&
+ Instructions.back()->opcode() == rcc::opcode(rcc::GenericOpcode::COPY) &&
Call != nullptr && Call->operandCount() >= 6 &&
Call->operandAt(0)->kind() == rcc::MachineOperand::Kind::ExternalSymbol &&
Call->operandAt(0)->targetFlags() ==
static_cast<std::uint32_t>(rcc::riscv::CallTargetFlag::DirectCall) &&
Call->operandAt(1)->kind() == rcc::MachineOperand::Kind::IntegerImmediate &&
Call->operandAt(2)->kind() == rcc::MachineOperand::Kind::RegisterMask,
- "ordinary emission must materialize call-frame, copies, target, ID, and RegMask");
+ "ordinary emission must materialize canonical full-value copies, call-frame, "
+ "target, ID, and RegMask");
bool HasArgumentUse = false;
bool HasResultDef = false;
for (const rcc::MachineOperand &Operand : Call->operands()) {