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

Unified Diff: src/s390/deoptimizer-s390.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 | « src/ppc/deoptimizer-ppc.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/s390/deoptimizer-s390.cc
diff --git a/src/s390/deoptimizer-s390.cc b/src/s390/deoptimizer-s390.cc
index 46d939128aea5d5c71d7db53292ea9b4f2c59f0c..a1c46dc2db89eaa85ce38a1d6bccc2b2d8d11cc4 100644
--- a/src/s390/deoptimizer-s390.cc
+++ b/src/s390/deoptimizer-s390.cc
@@ -113,6 +113,7 @@ void Deoptimizer::TableEntryGenerator::Generate() {
RegList restored_regs = kJSCallerSaved | kCalleeSaved;
const int kDoubleRegsSize = kDoubleSize * DoubleRegister::kNumRegisters;
+ const int kFloatRegsSize = kFloatSize * FloatRegister::kNumRegisters;
// Save all double registers before messing with them.
__ lay(sp, MemOperand(sp, -kDoubleRegsSize));
@@ -123,6 +124,14 @@ void Deoptimizer::TableEntryGenerator::Generate() {
int offset = code * kDoubleSize;
__ StoreDouble(dreg, MemOperand(sp, offset));
}
+ // Save all float registers before messing with them.
+ __ lay(sp, MemOperand(sp, -kFloatRegsSize));
+ for (int i = 0; i < config->num_allocatable_float_registers(); ++i) {
+ int code = config->GetAllocatableFloatCode(i);
+ const FloatRegister dreg = FloatRegister::from_code(code);
+ int offset = code * kFloatSize;
+ __ StoreFloat32(dreg, MemOperand(sp, offset));
+ }
// Push all GPRs onto the stack
__ lay(sp, MemOperand(sp, -kNumberOfRegisters * kPointerSize));
@@ -132,7 +141,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(r4, MemOperand(sp, kSavedRegistersAreaSize));
@@ -193,12 +202,24 @@ 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;
// TODO(joransiu): MVC opportunity
__ LoadDouble(d0, MemOperand(sp, src_offset));
__ StoreDouble(d0, MemOperand(r3, 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;
+ // TODO(joransiu): MVC opportunity
+ __ LoadFloat32(d0, MemOperand(sp, src_offset));
+ __ StoreFloat32(d0, MemOperand(r3, dst_offset));
+ }
// Remove the bailout id and the saved registers from the stack.
__ la(sp, MemOperand(sp, kSavedRegistersAreaSize + (1 * kPointerSize)));
« no previous file with comments | « src/ppc/deoptimizer-ppc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698