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

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

Issue 2773583003: MIPS[64]: Port `[deoptimizer] Fill the single precision registers in the deoptimizer entry stub.` (Closed)
Patch Set: Address typo 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/mips64/deoptimizer-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/deoptimizer-mips.cc
diff --git a/src/mips/deoptimizer-mips.cc b/src/mips/deoptimizer-mips.cc
index 40490018c7f345db1abe09873b7266b53251c229..c96eb67724b01b35be30198a9497e14ff89c4d1c 100644
--- a/src/mips/deoptimizer-mips.cc
+++ b/src/mips/deoptimizer-mips.cc
@@ -114,6 +114,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
RegList saved_regs = restored_regs | sp.bit() | ra.bit();
const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kMaxNumRegisters;
+ const int kFloatRegsSize = kFloatSize * FloatRegister::kMaxNumRegisters;
// Save all FPU registers before messing with them.
__ Subu(sp, sp, Operand(kDoubleRegsSize));
@@ -125,6 +126,14 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ Sdc1(fpu_reg, MemOperand(sp, offset));
}
+ __ Subu(sp, sp, Operand(kFloatRegsSize));
+ for (int i = 0; i < config->num_allocatable_float_registers(); ++i) {
+ int code = config->GetAllocatableFloatCode(i);
+ const FloatRegister fpu_reg = FloatRegister::from_code(code);
+ int offset = code * kFloatSize;
+ __ swc1(fpu_reg, MemOperand(sp, offset));
+ }
+
// Push saved_regs (needed to populate FrameDescription::registers_).
// Leave gaps for other registers.
__ Subu(sp, sp, kNumberOfRegisters * kPointerSize);
@@ -138,7 +147,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ sw(fp, MemOperand(a2));
const int kSavedRegistersAreaSize =
- (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize;
+ (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize + kFloatRegsSize;
// Get the bailout id from the stack.
__ lw(a2, MemOperand(sp, kSavedRegistersAreaSize));
@@ -198,11 +207,23 @@ 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;
__ Ldc1(f0, MemOperand(sp, src_offset));
__ Sdc1(f0, MemOperand(a1, dst_offset));
}
+ // Copy FPU registers to
+ // float_registers_[FloatRegister::kNumAllocatableRegisters]
+ int float_regs_offset = FrameDescription::float_registers_offset();
+ 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;
+ __ lwc1(f0, MemOperand(sp, src_offset));
+ __ swc1(f0, MemOperand(a1, dst_offset));
+ }
+
// Remove the bailout id and the saved registers from the stack.
__ Addu(sp, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize)));
« no previous file with comments | « no previous file | src/mips64/deoptimizer-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698