Skip to content

Commit

Permalink
<cachelookup4> :buildin function fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
NanQin555 committed Aug 20, 2024
1 parent 6b614a6 commit 159b7b2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions backend/RISCVISel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,9 +769,9 @@ void RISCVISel::LowerCallInstCacheLookUp4(CallInst* inst){
this->asmprinter->set_use_cachelookup4(true);
RISCVMIR* call = new RISCVMIR(RISCVMIR::call);
// the call inst is: call CacheLookUp(int/float, int/float)
// the size of uselist is 3, and the first use is called function
// the size of uselist is 5, and the first use is called function
BuildInFunction* buildinfunc = BuildInFunction::GetBuildInFunction(inst->GetOperand(0)->GetName());
call->AddOperand(M(buildinfunc)); // "CacheLookUp"
call->AddOperand(M(buildinfunc)); // "CacheLookUp4"
int regint=PhyRegister::PhyReg::a0;
for(int index=1; index<5; index++) {
Operand op = inst->GetOperand(index);
Expand Down
3 changes: 2 additions & 1 deletion lib/CFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,8 @@ BuildInFunction *BuildInFunction::GetBuildInFunction(std::string _id) {
return VoidType::NewVoidTypeGet();
if(_id == "CacheLookUp")
return VoidType::NewVoidTypeGet();

if(_id == "CacheLookUp4")
return VoidType::NewVoidTypeGet();
assert(0);
};
if (mp.find(_id) == mp.end()) {
Expand Down

0 comments on commit 159b7b2

Please sign in to comment.