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

Unified Diff: src/x64/deoptimizer-x64.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/x64/deoptimizer-x64.cc
diff --git a/src/x64/deoptimizer-x64.cc b/src/x64/deoptimizer-x64.cc
index 1664a1570fdbba3c956c6785dbc7bd889a6ef2dd..46176b13c6b9c45aea7087dd6f3f4d8a49c6f80d 100644
--- a/src/x64/deoptimizer-x64.cc
+++ b/src/x64/deoptimizer-x64.cc
@@ -125,6 +125,16 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ Movsd(Operand(rsp, offset), xmm_reg);
}
+ const int kFloatRegsSize = kFloatSize * XMMRegister::kMaxNumRegisters;
+ __ subp(rsp, 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(rsp, offset), xmm_reg);
+ }
+
// We push all registers onto the stack, even though we do not need
// to restore all later.
for (int i = 0; i < kNumberOfRegisters; i++) {
@@ -132,8 +142,8 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ pushq(r);
}
- const int kSavedRegistersAreaSize = kNumberOfRegisters * kRegisterSize +
- kDoubleRegsSize;
+ const int kSavedRegistersAreaSize =
+ kNumberOfRegisters * kRegisterSize + kDoubleRegsSize + kFloatRegsSize;
__ Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp);
@@ -190,6 +200,16 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ PopQuad(Operand(rbx, offset));
}
+ // Fill in the float input registers.
+ int float_regs_offset = FrameDescription::float_registers_offset();
+ for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) {
+ int src_offset = i * kFloatSize;
+ int dst_offset = i * kFloatSize + float_regs_offset;
+ __ movl(rcx, Operand(rsp, src_offset));
+ __ movl(Operand(rbx, dst_offset), rcx);
+ }
+ __ addp(rsp, Immediate(kFloatRegsSize));
+
// Fill in the double input registers.
int double_regs_offset = FrameDescription::double_registers_offset();
for (int i = 0; i < XMMRegister::kMaxNumRegisters; i++) {

Powered by Google App Engine
This is Rietveld 408576698