Fix mac build: cast fpr callee save addresses.
Bring back reinterpret_cast<>s removed by
https://android-review.googlesource.com/151309 .
They are needed for mac builds.
Bug : 13925192
Change-Id: I7728c39a867a278000c84d75440b31e818c3bfcf
diff --git a/runtime/arch/x86/context_x86.cc b/runtime/arch/x86/context_x86.cc
index 7a5d0c5..06bae75 100644
--- a/runtime/arch/x86/context_x86.cc
+++ b/runtime/arch/x86/context_x86.cc
@@ -54,8 +54,10 @@
DCHECK_EQ(0u, fp_regs & (static_cast<uint32_t>(-1) << kNumberOfFloatRegisters));
for (uint32_t fp_reg : HighToLowBits(fp_regs)) {
// Two void* per XMM register.
- fprs_[2 * fp_reg] = fr.CalleeSaveAddress(spill_pos + 1, frame_info.FrameSizeInBytes());
- fprs_[2 * fp_reg + 1] = fr.CalleeSaveAddress(spill_pos, frame_info.FrameSizeInBytes());
+ fprs_[2 * fp_reg] = reinterpret_cast<uint32_t*>(
+ fr.CalleeSaveAddress(spill_pos + 1, frame_info.FrameSizeInBytes()));
+ fprs_[2 * fp_reg + 1] = reinterpret_cast<uint32_t*>(
+ fr.CalleeSaveAddress(spill_pos, frame_info.FrameSizeInBytes()));
spill_pos += 2;
}
DCHECK_EQ(spill_pos,
diff --git a/runtime/arch/x86_64/context_x86_64.cc b/runtime/arch/x86_64/context_x86_64.cc
index de54e14..2c4532c 100644
--- a/runtime/arch/x86_64/context_x86_64.cc
+++ b/runtime/arch/x86_64/context_x86_64.cc
@@ -53,7 +53,8 @@
uint32_t fp_regs = frame_info.FpSpillMask();
DCHECK_EQ(0u, fp_regs & (static_cast<uint32_t>(-1) << kNumberOfFloatRegisters));
for (uint32_t fp_reg : HighToLowBits(fp_regs)) {
- fprs_[fp_reg] = fr.CalleeSaveAddress(spill_pos, frame_info.FrameSizeInBytes());
+ fprs_[fp_reg] = reinterpret_cast<uint64_t*>(
+ fr.CalleeSaveAddress(spill_pos, frame_info.FrameSizeInBytes()));
++spill_pos;
}
DCHECK_EQ(spill_pos,