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

Side by Side Diff: src/compiler/mips/code-generator-mips.cc

Issue 2364903002: MIPS: Port [turbofan] ARM64: Use zr for zeroing stack slots (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | src/compiler/mips64/code-generator-mips64.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 #include "src/compilation-info.h" 6 #include "src/compilation-info.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 break; 2055 break;
2056 } 2056 }
2057 case Constant::kRpoNumber: 2057 case Constant::kRpoNumber:
2058 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips. 2058 UNREACHABLE(); // TODO(titzer): loading RPO numbers on mips.
2059 break; 2059 break;
2060 } 2060 }
2061 if (destination->IsStackSlot()) __ sw(dst, g.ToMemOperand(destination)); 2061 if (destination->IsStackSlot()) __ sw(dst, g.ToMemOperand(destination));
2062 } else if (src.type() == Constant::kFloat32) { 2062 } else if (src.type() == Constant::kFloat32) {
2063 if (destination->IsFPStackSlot()) { 2063 if (destination->IsFPStackSlot()) {
2064 MemOperand dst = g.ToMemOperand(destination); 2064 MemOperand dst = g.ToMemOperand(destination);
2065 __ li(at, Operand(bit_cast<int32_t>(src.ToFloat32()))); 2065 if (bit_cast<int32_t>(src.ToFloat32()) == 0) {
2066 __ sw(at, dst); 2066 __ sw(zero_reg, dst);
2067 } else {
2068 __ li(at, Operand(bit_cast<int32_t>(src.ToFloat32())));
2069 __ sw(at, dst);
2070 }
2067 } else { 2071 } else {
2072 DCHECK(destination->IsFPRegister());
2068 FloatRegister dst = g.ToSingleRegister(destination); 2073 FloatRegister dst = g.ToSingleRegister(destination);
2069 __ Move(dst, src.ToFloat32()); 2074 __ Move(dst, src.ToFloat32());
2070 } 2075 }
2071 } else { 2076 } else {
2072 DCHECK_EQ(Constant::kFloat64, src.type()); 2077 DCHECK_EQ(Constant::kFloat64, src.type());
2073 DoubleRegister dst = destination->IsFPRegister() 2078 DoubleRegister dst = destination->IsFPRegister()
2074 ? g.ToDoubleRegister(destination) 2079 ? g.ToDoubleRegister(destination)
2075 : kScratchDoubleReg; 2080 : kScratchDoubleReg;
2076 __ Move(dst, src.ToFloat64()); 2081 __ Move(dst, src.ToFloat64());
2077 if (destination->IsFPStackSlot()) { 2082 if (destination->IsFPStackSlot()) {
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 padding_size -= v8::internal::Assembler::kInstrSize; 2248 padding_size -= v8::internal::Assembler::kInstrSize;
2244 } 2249 }
2245 } 2250 }
2246 } 2251 }
2247 2252
2248 #undef __ 2253 #undef __
2249 2254
2250 } // namespace compiler 2255 } // namespace compiler
2251 } // namespace internal 2256 } // namespace internal
2252 } // namespace v8 2257 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698