summaryrefslogtreecommitdiff
path: root/runtime/stack.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/stack.cc')
-rw-r--r--runtime/stack.cc7
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;