From a474f7d209e8bcc51d70a17d22f34f7574e0150c Mon Sep 17 00:00:00 2001 From: Lifang Xia Date: Mon, 19 Jun 2023 17:12:35 +0800 Subject: RISCV: [Codegen] Add VisitBooleanNot Test: m test-art-host-gtest Bug: 283082089 Signed-off-by: Lifang Xia Signed-off-by: Wendong Wang Change-Id: If7bfe77fb0ca20d5b52d9b1333276c3aa0ab7432 --- compiler/optimizing/code_generator_riscv64.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'compiler') diff --git a/compiler/optimizing/code_generator_riscv64.cc b/compiler/optimizing/code_generator_riscv64.cc index 0bf639ce74..a58378b501 100644 --- a/compiler/optimizing/code_generator_riscv64.cc +++ b/compiler/optimizing/code_generator_riscv64.cc @@ -1117,13 +1117,14 @@ void InstructionCodeGeneratorRISCV64::VisitBelowOrEqual(HBelowOrEqual* instructi } void LocationsBuilderRISCV64::VisitBooleanNot(HBooleanNot* instruction) { - UNUSED(instruction); - LOG(FATAL) << "Unimplemented"; + LocationSummary* locations = new (GetGraph()->GetAllocator()) LocationSummary(instruction); + locations->SetInAt(0, Location::RequiresRegister()); + locations->SetOut(Location::RequiresRegister(), Location::kNoOutputOverlap); } void InstructionCodeGeneratorRISCV64::VisitBooleanNot(HBooleanNot* instruction) { - UNUSED(instruction); - LOG(FATAL) << "Unimplemented"; + LocationSummary* locations = instruction->GetLocations(); + __ Xori(locations->Out().AsRegister(), locations->InAt(0).AsRegister(), 1); } void LocationsBuilderRISCV64::VisitBoundsCheck(HBoundsCheck* instruction) { -- cgit v1.2.3-59-g8ed1b