diff options
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/optimizing/code_generator_riscv64.cc | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/compiler/optimizing/code_generator_riscv64.cc b/compiler/optimizing/code_generator_riscv64.cc index 9d74d15ca4..e4160bdddd 100644 --- a/compiler/optimizing/code_generator_riscv64.cc +++ b/compiler/optimizing/code_generator_riscv64.cc @@ -2498,13 +2498,23 @@ void InstructionCodeGeneratorRISCV64::VisitNop(HNop* instruction) { } void LocationsBuilderRISCV64::VisitNot(HNot* 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::VisitNot(HNot* instruction) { - UNUSED(instruction); - LOG(FATAL) << "Unimplemented"; + LocationSummary* locations = instruction->GetLocations(); + switch (instruction->GetResultType()) { + case DataType::Type::kInt32: + case DataType::Type::kInt64: + __ Not(locations->Out().AsRegister<XRegister>(), locations->InAt(0).AsRegister<XRegister>()); + break; + + default: + LOG(FATAL) << "Unexpected type for not operation " << instruction->GetResultType(); + UNREACHABLE(); + } } void LocationsBuilderRISCV64::VisitNotEqual(HNotEqual* instruction) { |