diff options
| author | 2016-09-05 10:44:04 +0100 | |
|---|---|---|
| committer | 2016-09-06 17:37:41 +0100 | |
| commit | 239d6eaff0cbb5c4c0139f7053a012758799f186 (patch) | |
| tree | 8de26b30a2dfd94f849a38c8901437facbbc53b3 /runtime/stack.cc | |
| parent | 9d185da3bef8caf015d3dbf4ad79c520af7ce3b1 (diff) | |
Change deoptimize entrypoint to save everything.
And implement FPU register retrieval from stack on x86.
On Nexus 9, AOSP ToT, the boot.oat size reduction is
prebuilt multi-part boot image:
- 32-bit boot.oat: -20KiB (-0.03%)
- 64-bit boot.oat: -45KiB (-0.06%)
on-device built single boot image:
- 32-bit boot.oat: -24KiB (-0.04%)
- 64-bit boot.oat: -36KiB (-0.05%)
Test: Run ART test suite on host and Nexus 9.
Bug: 30212852
Change-Id: I5d98e2a24363136d73dfec6100ab02f8eb101911
Diffstat (limited to 'runtime/stack.cc')
| -rw-r--r-- | runtime/stack.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/stack.cc b/runtime/stack.cc index ec492edc4e..4678ac6e50 100644 --- a/runtime/stack.cc +++ b/runtime/stack.cc @@ -319,8 +319,11 @@ bool StackVisitor::GetVRegFromOptimizedCode(ArtMethod* m, uint16_t vreg, VRegKin bool StackVisitor::GetRegisterIfAccessible(uint32_t reg, VRegKind kind, uint32_t* val) const { const bool is_float = (kind == kFloatVReg) || (kind == kDoubleLoVReg) || (kind == kDoubleHiVReg); - // X86 float registers are 64-bit and the logic below does not apply. - DCHECK(!is_float || kRuntimeISA != InstructionSet::kX86); + if (kRuntimeISA == InstructionSet::kX86 && is_float) { + // X86 float registers are 64-bit and each XMM register is provided as two separate + // 32-bit registers by the context. + reg = (kind == kDoubleHiVReg) ? (2 * reg + 1) : (2 * reg); + } if (!IsAccessibleRegister(reg, is_float)) { return false; |