diff options
author | Roland Levillain <rpl@google.com> | 2014-12-04 12:10:50 +0000 |
---|---|---|
committer | Roland Levillain <rpl@google.com> | 2014-12-04 12:10:50 +0000 |
commit | 8964e2b689d80fe546604ac8c724078645095cf1 (patch) | |
tree | 9909dfb2f891d12cc9ad6aabebfba9f535014609 /compiler/optimizing/code_generator_arm.cc | |
parent | 833e903b7a9063f37bea3c505cf134fc4a4e2084 (diff) | |
download | android_art-8964e2b689d80fe546604ac8c724078645095cf1.tar.gz android_art-8964e2b689d80fe546604ac8c724078645095cf1.tar.bz2 android_art-8964e2b689d80fe546604ac8c724078645095cf1.zip |
Add support for float-to-double & double-to-float in optimizing.
Change-Id: I41b0fee5a28c83757697c8d000b7e224cf5a4534
Diffstat (limited to 'compiler/optimizing/code_generator_arm.cc')
-rw-r--r-- | compiler/optimizing/code_generator_arm.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/compiler/optimizing/code_generator_arm.cc b/compiler/optimizing/code_generator_arm.cc index f0506051ca..5076c85885 100644 --- a/compiler/optimizing/code_generator_arm.cc +++ b/compiler/optimizing/code_generator_arm.cc @@ -1501,8 +1501,9 @@ void LocationsBuilderARM::VisitTypeConversion(HTypeConversion* conversion) { break; case Primitive::kPrimDouble: - LOG(FATAL) << "Type conversion from " << input_type - << " to " << result_type << " not yet implemented"; + // Processing a Dex `double-to-float' instruction. + locations->SetInAt(0, Location::RequiresFpuRegister()); + locations->SetOut(Location::RequiresFpuRegister(), Location::kNoOutputOverlap); break; default: @@ -1532,8 +1533,9 @@ void LocationsBuilderARM::VisitTypeConversion(HTypeConversion* conversion) { break; case Primitive::kPrimFloat: - LOG(FATAL) << "Type conversion from " << input_type - << " to " << result_type << " not yet implemented"; + // Processing a Dex `float-to-double' instruction. + locations->SetInAt(0, Location::RequiresFpuRegister()); + locations->SetOut(Location::RequiresFpuRegister(), Location::kNoOutputOverlap); break; default: @@ -1728,8 +1730,9 @@ void InstructionCodeGeneratorARM::VisitTypeConversion(HTypeConversion* conversio } case Primitive::kPrimDouble: - LOG(FATAL) << "Type conversion from " << input_type - << " to " << result_type << " not yet implemented"; + // Processing a Dex `double-to-float' instruction. + __ vcvtsd(out.AsFpuRegister<SRegister>(), + FromLowSToD(in.AsFpuRegisterPairLow<SRegister>())); break; default: @@ -1784,8 +1787,9 @@ void InstructionCodeGeneratorARM::VisitTypeConversion(HTypeConversion* conversio } case Primitive::kPrimFloat: - LOG(FATAL) << "Type conversion from " << input_type - << " to " << result_type << " not yet implemented"; + // Processing a Dex `float-to-double' instruction. + __ vcvtds(FromLowSToD(out.AsFpuRegisterPairLow<SRegister>()), + in.AsFpuRegister<SRegister>()); break; default: |