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

Side by Side Diff: src/crankshaft/s390/lithium-codegen-s390.cc

Issue 1936953004: S390: Fix storing to below stack to avoid sampler handler corrupting stored value (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove insertdoublehigh/low Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | src/s390/assembler-s390.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5192 matching lines...) Expand 10 before | Expand all | Expand 10 after
5203 // smi 5203 // smi
5204 __ bind(&is_smi); 5204 __ bind(&is_smi);
5205 __ ClampUint8(result_reg, result_reg); 5205 __ ClampUint8(result_reg, result_reg);
5206 5206
5207 __ bind(&done); 5207 __ bind(&done);
5208 } 5208 }
5209 5209
5210 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { 5210 void LCodeGen::DoDoubleBits(LDoubleBits* instr) {
5211 DoubleRegister value_reg = ToDoubleRegister(instr->value()); 5211 DoubleRegister value_reg = ToDoubleRegister(instr->value());
5212 Register result_reg = ToRegister(instr->result()); 5212 Register result_reg = ToRegister(instr->result());
5213 // TODO(joransiu): Use non-memory version. 5213 __ lgdr(result_reg, value_reg);
5214 __ stdy(value_reg, MemOperand(sp, -kDoubleSize));
5215 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { 5214 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) {
5216 __ LoadlW(result_reg, 5215 __ srlg(result_reg, result_reg, Operand(32));
5217 MemOperand(sp, -kDoubleSize + Register::kExponentOffset));
5218 } else { 5216 } else {
5219 __ LoadlW(result_reg, 5217 __ llgfr(result_reg, result_reg);
5220 MemOperand(sp, -kDoubleSize + Register::kMantissaOffset));
5221 } 5218 }
5222 } 5219 }
5223 5220
5224 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { 5221 void LCodeGen::DoConstructDouble(LConstructDouble* instr) {
5225 Register hi_reg = ToRegister(instr->hi()); 5222 Register hi_reg = ToRegister(instr->hi());
5226 Register lo_reg = ToRegister(instr->lo()); 5223 Register lo_reg = ToRegister(instr->lo());
5227 DoubleRegister result_reg = ToDoubleRegister(instr->result()); 5224 DoubleRegister result_reg = ToDoubleRegister(instr->result());
5228 // TODO(joransiu): Construct with ldgr
5229 Register scratch = scratch0(); 5225 Register scratch = scratch0();
5230 5226
5231 // Combine hi_reg:lo_reg into a single 64-bit register. 5227 // Combine hi_reg:lo_reg into a single 64-bit register.
5232 __ sllg(scratch, hi_reg, Operand(32)); 5228 __ sllg(scratch, hi_reg, Operand(32));
5233 __ lr(scratch, lo_reg); 5229 __ lr(scratch, lo_reg);
5234 5230
5235 // Bitwise convert from GPR to FPR 5231 // Bitwise convert from GPR to FPR
5236 __ ldgr(result_reg, scratch); 5232 __ ldgr(result_reg, scratch);
5237 } 5233 }
5238 5234
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
5670 __ LoadP(result, 5666 __ LoadP(result,
5671 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5667 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5672 __ bind(deferred->exit()); 5668 __ bind(deferred->exit());
5673 __ bind(&done); 5669 __ bind(&done);
5674 } 5670 }
5675 5671
5676 #undef __ 5672 #undef __
5677 5673
5678 } // namespace internal 5674 } // namespace internal
5679 } // namespace v8 5675 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/s390/code-generator-s390.cc ('k') | src/s390/assembler-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698