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

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

Issue 1947263006: Version 5.1.281.30 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.1
Patch Set: 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 5184 matching lines...) Expand 10 before | Expand all | Expand 10 after
5195 // smi 5195 // smi
5196 __ bind(&is_smi); 5196 __ bind(&is_smi);
5197 __ ClampUint8(result_reg, result_reg); 5197 __ ClampUint8(result_reg, result_reg);
5198 5198
5199 __ bind(&done); 5199 __ bind(&done);
5200 } 5200 }
5201 5201
5202 void LCodeGen::DoDoubleBits(LDoubleBits* instr) { 5202 void LCodeGen::DoDoubleBits(LDoubleBits* instr) {
5203 DoubleRegister value_reg = ToDoubleRegister(instr->value()); 5203 DoubleRegister value_reg = ToDoubleRegister(instr->value());
5204 Register result_reg = ToRegister(instr->result()); 5204 Register result_reg = ToRegister(instr->result());
5205 // TODO(joransiu): Use non-memory version. 5205 __ lgdr(result_reg, value_reg);
5206 __ stdy(value_reg, MemOperand(sp, -kDoubleSize));
5207 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) { 5206 if (instr->hydrogen()->bits() == HDoubleBits::HIGH) {
5208 __ LoadlW(result_reg, 5207 __ srlg(result_reg, result_reg, Operand(32));
5209 MemOperand(sp, -kDoubleSize + Register::kExponentOffset));
5210 } else { 5208 } else {
5211 __ LoadlW(result_reg, 5209 __ llgfr(result_reg, result_reg);
5212 MemOperand(sp, -kDoubleSize + Register::kMantissaOffset));
5213 } 5210 }
5214 } 5211 }
5215 5212
5216 void LCodeGen::DoConstructDouble(LConstructDouble* instr) { 5213 void LCodeGen::DoConstructDouble(LConstructDouble* instr) {
5217 Register hi_reg = ToRegister(instr->hi()); 5214 Register hi_reg = ToRegister(instr->hi());
5218 Register lo_reg = ToRegister(instr->lo()); 5215 Register lo_reg = ToRegister(instr->lo());
5219 DoubleRegister result_reg = ToDoubleRegister(instr->result()); 5216 DoubleRegister result_reg = ToDoubleRegister(instr->result());
5220 // TODO(joransiu): Construct with ldgr
5221 Register scratch = scratch0(); 5217 Register scratch = scratch0();
5222 5218
5223 // Combine hi_reg:lo_reg into a single 64-bit register. 5219 // Combine hi_reg:lo_reg into a single 64-bit register.
5224 __ sllg(scratch, hi_reg, Operand(32)); 5220 __ sllg(scratch, hi_reg, Operand(32));
5225 __ lr(scratch, lo_reg); 5221 __ lr(scratch, lo_reg);
5226 5222
5227 // Bitwise convert from GPR to FPR 5223 // Bitwise convert from GPR to FPR
5228 __ ldgr(result_reg, scratch); 5224 __ ldgr(result_reg, scratch);
5229 } 5225 }
5230 5226
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
5662 __ LoadP(result, 5658 __ LoadP(result,
5663 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5659 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5664 __ bind(deferred->exit()); 5660 __ bind(deferred->exit());
5665 __ bind(&done); 5661 __ bind(&done);
5666 } 5662 }
5667 5663
5668 #undef __ 5664 #undef __
5669 5665
5670 } // namespace internal 5666 } // namespace internal
5671 } // namespace v8 5667 } // 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