OSDN Git Service

MIPS: Support register pairs in CodeGeneratorMIPS::AddLocationAsTemp().
authorAlexey Frunze <Alexey.Frunze@imgtec.com>
Mon, 26 Oct 2015 23:11:39 +0000 (16:11 -0700)
committerAlexey Frunze <Alexey.Frunze@imgtec.com>
Mon, 26 Oct 2015 23:11:39 +0000 (16:11 -0700)
Change-Id: I8584c150cae27353b57f3dccc78a68d6cd6fc2c1

compiler/optimizing/code_generator_mips.cc

index 8ba4556..60b20ca 100644 (file)
@@ -1000,6 +1000,9 @@ void CodeGeneratorMIPS::Move(HInstruction* instruction,
 void CodeGeneratorMIPS::AddLocationAsTemp(Location location, LocationSummary* locations) {
   if (location.IsRegister()) {
     locations->AddTemp(location);
+  } else if (location.IsRegisterPair()) {
+    locations->AddTemp(Location::RegisterLocation(location.AsRegisterPairLow<Register>()));
+    locations->AddTemp(Location::RegisterLocation(location.AsRegisterPairHigh<Register>()));
   } else {
     UNIMPLEMENTED(FATAL) << "AddLocationAsTemp not implemented for location " << location;
   }