diff --git a/src/backend/RISCv64/RISCv64ISel.cpp b/src/backend/RISCv64/RISCv64ISel.cpp index fb9cbd6..0d1a201 100644 --- a/src/backend/RISCv64/RISCv64ISel.cpp +++ b/src/backend/RISCv64/RISCv64ISel.cpp @@ -673,6 +673,22 @@ void RISCv64ISel::selectNode(DAGNode* node) { CurMBB->addInstruction(std::move(xori)); break; } + case BinaryInst::kAnd: { + auto instr = std::make_unique(RVOpcodes::AND); + instr->addOperand(std::make_unique(dest_vreg)); + instr->addOperand(std::make_unique(lhs_vreg)); + instr->addOperand(std::make_unique(rhs_vreg)); + CurMBB->addInstruction(std::move(instr)); + break; + } + case BinaryInst::kOr: { + auto instr = std::make_unique(RVOpcodes::OR); + instr->addOperand(std::make_unique(dest_vreg)); + instr->addOperand(std::make_unique(lhs_vreg)); + instr->addOperand(std::make_unique(rhs_vreg)); + CurMBB->addInstruction(std::move(instr)); + break; + } default: throw std::runtime_error("Unsupported binary instruction in ISel"); }