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

Unified Diff: src/arm/deoptimizer-arm.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
« no previous file with comments | « no previous file | src/arm64/deoptimizer-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/deoptimizer-arm.cc
diff --git a/src/arm/deoptimizer-arm.cc b/src/arm/deoptimizer-arm.cc
index 3d8133830496d6b8b41ad34a0098871a209fa956..37687f0d55bb95ec17c44e1465b2147aa6b032b3 100644
--- a/src/arm/deoptimizer-arm.cc
+++ b/src/arm/deoptimizer-arm.cc
@@ -121,6 +121,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
RegList restored_regs = kJSCallerSaved | kCalleeSaved | ip.bit();
const int kDoubleRegsSize = kDoubleSize * DwVfpRegister::kMaxNumRegisters;
+ const int kFloatRegsSize = kFloatSize * SwVfpRegister::kMaxNumRegisters;
// Save all allocatable VFP registers before messing with them.
DCHECK(kDoubleRegZero.code() == 14);
@@ -139,6 +140,12 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ vstm(db_w, sp, d16, d31, ne);
__ sub(sp, sp, Operand(16 * kDoubleSize), LeaveCC, eq);
__ vstm(db_w, sp, d0, d15);
+
+ // Push registers s0-s15, and possibly s16-s31, on the stack.
bbudge 2017/03/22 17:08:02 I think all ARM targets have 32 single precision r
+ // If s16-s31 are not pushed, decrease the stack pointer instead.
+ __ vstm(db_w, sp, s16, s31, ne);
+ __ sub(sp, sp, Operand(16 * kFloatSize), LeaveCC, eq);
+ __ vstm(db_w, sp, s0, s15);
}
// Push all 16 registers (needed to populate FrameDescription::registers_).
@@ -150,7 +157,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
__ str(fp, MemOperand(ip));
const int kSavedRegistersAreaSize =
- (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize;
+ (kNumberOfRegisters * kPointerSize) + kDoubleRegsSize + kFloatRegsSize;
// Get the bailout id from the stack.
__ ldr(r2, MemOperand(sp, kSavedRegistersAreaSize));
@@ -203,11 +210,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;
__ vldr(d0, sp, src_offset);
__ vstr(d0, r1, dst_offset);
}
+ // Copy VFP registers to
+ // float_registers_[FloatRegister::kMaxNumAllocatableRegisters]
+ 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;
+ __ ldr(r2, MemOperand(sp, src_offset));
+ __ str(r2, MemOperand(r1, dst_offset));
+ }
+
// Remove the bailout id and the saved registers from the stack.
__ add(sp, sp, Operand(kSavedRegistersAreaSize + (1 * kPointerSize)));
« no previous file with comments | « no previous file | src/arm64/deoptimizer-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698