summaryrefslogtreecommitdiff
path: root/compiler/optimizing/locations.h
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing/locations.h')
-rw-r--r--compiler/optimizing/locations.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/compiler/optimizing/locations.h b/compiler/optimizing/locations.h
index 198cc15cce..566c0daf1e 100644
--- a/compiler/optimizing/locations.h
+++ b/compiler/optimizing/locations.h
@@ -211,15 +211,25 @@ class Location : public ValueObject {
}
Location ToLow() const {
- return IsRegisterPair()
- ? Location::RegisterLocation(low())
- : Location::FpuRegisterLocation(low());
+ if (IsRegisterPair()) {
+ return Location::RegisterLocation(low());
+ } else if (IsFpuRegisterPair()) {
+ return Location::FpuRegisterLocation(low());
+ } else {
+ DCHECK(IsDoubleStackSlot());
+ return Location::StackSlot(GetStackIndex());
+ }
}
Location ToHigh() const {
- return IsRegisterPair()
- ? Location::RegisterLocation(high())
- : Location::FpuRegisterLocation(high());
+ if (IsRegisterPair()) {
+ return Location::RegisterLocation(high());
+ } else if (IsFpuRegisterPair()) {
+ return Location::FpuRegisterLocation(high());
+ } else {
+ DCHECK(IsDoubleStackSlot());
+ return Location::StackSlot(GetHighStackIndex(4));
+ }
}
static uintptr_t EncodeStackIndex(intptr_t stack_index) {