diff options
| author | 2014-12-08 18:07:32 +0000 | |
|---|---|---|
| committer | 2014-12-08 18:07:32 +0000 | |
| commit | c4925d4c02dc8f8d51cb2653b5e7a99f6c9fd7d7 (patch) | |
| tree | c315141775be96ba80f8efd9112f196c0364ded2 /compiler/optimizing/code_generator.cc | |
| parent | 1495a8e6409238bca28a33fd47913e382a85ea79 (diff) | |
| parent | d2ec87d84057174d4884ee16f652cbcfd31362e9 (diff) | |
Merge "[optimizing compiler] Add REM_FLOAT and REM_DOUBLE"
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
| -rw-r--r-- | compiler/optimizing/code_generator.cc | 16 | 
1 files changed, 12 insertions, 4 deletions
| diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 7f358eaa6b..461409ddca 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -499,19 +499,27 @@ void CodeGenerator::BuildStackMaps(std::vector<uint8_t>* data) {  }  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. |