[optimizing compiler] Add REM_FLOAT and REM_DOUBLE
- for arm, x86, x86_64 backends
- reinstated fmod quick entry points for x86. This is a partial revert
of bd3682eada753de52975ae2b4a712bd87dc139a6 which added inline assembly
for floting point rem on x86. Note that Quick still uses the inline
version.
- fix rem tests for longs
Change-Id: I73be19a9f2f2bcf3f718d9ca636e67bdd72b5440
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 7f358ea..461409d 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -499,19 +499,27 @@
}
void CodeGenerator::RecordPcInfo(HInstruction* instruction, uint32_t dex_pc) {
- if (instruction != nullptr && instruction->IsTypeConversion()) {
+ if (instruction != nullptr) {
// The code generated for some type conversions may call the
// runtime, thus normally requiring a subsequent call to this
// method. However, the method verifier does not produce PC
- // information for Dex type conversion instructions, as it
- // considers them as "atomic" (they cannot join a GC).
+ // information for certain instructions, which are considered "atomic"
+ // (they cannot join a GC).
// Therefore we do not currently record PC information for such
// instructions. As this may change later, we added this special
// case so that code generators may nevertheless call
// CodeGenerator::RecordPcInfo without triggering an error in
// CodeGenerator::BuildNativeGCMap ("Missing ref for dex pc 0x")
// thereafter.
- return;
+ if (instruction->IsTypeConversion()) {
+ return;
+ }
+ if (instruction->IsRem()) {
+ Primitive::Type type = instruction->AsRem()->GetResultType();
+ if ((type == Primitive::kPrimFloat) || (type == Primitive::kPrimDouble)) {
+ return;
+ }
+ }
}
// Collect PC infos for the mapping table.