Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: src/ppc/deoptimizer-ppc.cc

Issue 2774883003: PPC/s390: [deoptimizer] Fill the single precision registers in the deoptimizer entry stub. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/s390/deoptimizer-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ppc/deoptimizer-ppc.cc
diff --git a/src/ppc/deoptimizer-ppc.cc b/src/ppc/deoptimizer-ppc.cc
index b96dc6fece90e3d9de6d8d0ce02b582d6732b300..c8ad31cf2ab14216163bbc918c215ec0c8f8f614 100644
--- a/src/ppc/deoptimizer-ppc.cc
+++ b/src/ppc/deoptimizer-ppc.cc
@@ -121,6 +121,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
RegList saved_regs = restored_regs | sp.bit();
const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kNumRegisters;
+ const int kFloatRegsSize = kFloatSize * FloatRegister::kNumRegisters;
// Save all double registers before messing with them.
__ subi(sp, sp, Operand(kDoubleRegsSize));
@@ -131,6 +132,14 @@ void Deoptimizer::TableEntryGenerator::Generate() {
int offset = code * kDoubleSize;
__ stfd(dreg, MemOperand(sp, offset));
}
+ // Save all float registers before messing with them.
+ __ subi(sp, sp, Operand(kFloatRegsSize));
+ for (int i = 0; i < config->num_allocatable_float_registers(); ++i) {
+ int code = config->GetAllocatableFloatCode(i);
+ const FloatRegister freg = FloatRegister::from_code(code);
+ int offset = code * kFloatSize;
+ __ stfs(freg, MemOperand(sp, offset));
+ }
// Push saved_regs (needed to populate FrameDescription::registers_).
// Leave gaps for other registers.
@@ -145,7 +154,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ StoreP(fp, MemOperand(ip));
const int kSavedRegistersAreaSize =
- (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize;
+ (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize + kFloatRegsSize;
// Get the bailout id from the stack.
__ LoadP(r5, MemOperand(sp, kSavedRegistersAreaSize));
@@ -196,11 +205,21 @@ void Deoptimizer::TableEntryGenerator::Generate() {
for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {
int code = config->GetAllocatableDoubleCode(i);
int dst_offset = code * kDoubleSize + double_regs_offset;
- int src_offset = code * kDoubleSize + kNumberOfRegisters * kPointerSize;
+ int src_offset =
+ code * kDoubleSize + kNumberOfRegisters * kPointerSize + kFloatRegsSize;
__ lfd(d0, MemOperand(sp, src_offset));
__ stfd(d0, MemOperand(r4, dst_offset));
}
-
+ int float_regs_offset = FrameDescription::float_registers_offset();
+ // Copy float registers to
+ // float_registers_[FloatRegister::kNumRegisters]
+ for (int i = 0; i < config->num_allocatable_float_registers(); ++i) {
+ int code = config->GetAllocatableFloatCode(i);
+ int dst_offset = code * kFloatSize + float_regs_offset;
+ int src_offset = code * kFloatSize + kNumberOfRegisters * kPointerSize;
+ __ lfs(d0, MemOperand(sp, src_offset));
+ __ stfs(d0, MemOperand(r4, dst_offset));
+ }
// Remove the bailout id and the saved registers from the stack.
__ addi(sp, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize)));
« no previous file with comments | « no previous file | src/s390/deoptimizer-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698