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

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

Issue 2765323002: [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
Index: src/ia32/deoptimizer-ia32.cc
diff --git a/src/ia32/deoptimizer-ia32.cc b/src/ia32/deoptimizer-ia32.cc
index b3f6187809dd6608f0bd3c03ef457f1f52ec60f2..25c76885c1eeb2ed6a9f65c6ca50e1991ef5352d 100644
--- a/src/ia32/deoptimizer-ia32.cc
+++ b/src/ia32/deoptimizer-ia32.cc
@@ -204,13 +204,23 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ movsd(Operand(esp, offset), xmm_reg);
}
+ STATIC_ASSERT(kFloatSize == kPointerSize);
+ const int kFloatRegsSize = kFloatSize * XMMRegister::kMaxNumRegisters;
+ __ sub(esp, Immediate(kFloatRegsSize));
+ for (int i = 0; i < config->num_allocatable_float_registers(); ++i) {
+ int code = config->GetAllocatableFloatCode(i);
+ XMMRegister xmm_reg = XMMRegister::from_code(code);
+ int offset = code * kFloatSize;
+ __ movss(Operand(esp, offset), xmm_reg);
+ }
+
__ pushad();
ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress, isolate());
__ mov(Operand::StaticVariable(c_entry_fp_address), ebp);
- const int kSavedRegistersAreaSize = kNumberOfRegisters * kPointerSize +
- kDoubleRegsSize;
+ const int kSavedRegistersAreaSize =
+ kNumberOfRegisters * kPointerSize + kDoubleRegsSize + kFloatRegsSize;
// Get the bailout id from the stack.
__ mov(ebx, Operand(esp, kSavedRegistersAreaSize));
@@ -253,6 +263,13 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ pop(Operand(ebx, offset));
}
+ int float_regs_offset = FrameDescription::float_registers_offset();
+ // Fill in the float input registers.
+ for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) {
+ int dst_offset = i * kFloatSize + float_regs_offset;
+ __ pop(Operand(ebx, dst_offset));
+ }
+
int double_regs_offset = FrameDescription::double_registers_offset();
// Fill in the double input registers.
for (int i = 0; i < config->num_allocatable_double_registers(); ++i) {

Powered by Google App Engine
This is Rietveld 408576698