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

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

Issue 2645693003: Revert of [wasm] Fix I32ReinterpretF32 and I64ReinterpretF64 on ia32. (Closed)
Patch Set: Created 3 years, 11 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/instruction.h » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 6
7 #include "src/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 2088 matching lines...) Expand 10 before | Expand all | Expand 10 after
2099 } 2099 }
2100 } 2100 }
2101 } else if (destination->IsRegister()) { 2101 } else if (destination->IsRegister()) {
2102 Register dst = g.ToRegister(destination); 2102 Register dst = g.ToRegister(destination);
2103 __ Move(dst, g.ToImmediate(source)); 2103 __ Move(dst, g.ToImmediate(source));
2104 } else if (destination->IsStackSlot()) { 2104 } else if (destination->IsStackSlot()) {
2105 Operand dst = g.ToOperand(destination); 2105 Operand dst = g.ToOperand(destination);
2106 __ Move(dst, g.ToImmediate(source)); 2106 __ Move(dst, g.ToImmediate(source));
2107 } else if (src_constant.type() == Constant::kFloat32) { 2107 } else if (src_constant.type() == Constant::kFloat32) {
2108 // TODO(turbofan): Can we do better here? 2108 // TODO(turbofan): Can we do better here?
2109 uint32_t src = src_constant.ToFloat32AsInt(); 2109 uint32_t src = bit_cast<uint32_t>(src_constant.ToFloat32());
2110 if (destination->IsFPRegister()) { 2110 if (destination->IsFPRegister()) {
2111 XMMRegister dst = g.ToDoubleRegister(destination); 2111 XMMRegister dst = g.ToDoubleRegister(destination);
2112 __ Move(dst, src); 2112 __ Move(dst, src);
2113 } else { 2113 } else {
2114 DCHECK(destination->IsFPStackSlot()); 2114 DCHECK(destination->IsFPStackSlot());
2115 Operand dst = g.ToOperand(destination); 2115 Operand dst = g.ToOperand(destination);
2116 __ Move(dst, Immediate(src)); 2116 __ Move(dst, Immediate(src));
2117 } 2117 }
2118 } else { 2118 } else {
2119 DCHECK_EQ(Constant::kFloat64, src_constant.type()); 2119 DCHECK_EQ(Constant::kFloat64, src_constant.type());
2120 uint64_t src = src_constant.ToFloat64AsInt(); 2120 uint64_t src = bit_cast<uint64_t>(src_constant.ToFloat64());
2121 uint32_t lower = static_cast<uint32_t>(src); 2121 uint32_t lower = static_cast<uint32_t>(src);
2122 uint32_t upper = static_cast<uint32_t>(src >> 32); 2122 uint32_t upper = static_cast<uint32_t>(src >> 32);
2123 if (destination->IsFPRegister()) { 2123 if (destination->IsFPRegister()) {
2124 XMMRegister dst = g.ToDoubleRegister(destination); 2124 XMMRegister dst = g.ToDoubleRegister(destination);
2125 __ Move(dst, src); 2125 __ Move(dst, src);
2126 } else { 2126 } else {
2127 DCHECK(destination->IsFPStackSlot()); 2127 DCHECK(destination->IsFPStackSlot());
2128 Operand dst0 = g.ToOperand(destination); 2128 Operand dst0 = g.ToOperand(destination);
2129 Operand dst1 = g.HighOperand(destination); 2129 Operand dst1 = g.HighOperand(destination);
2130 __ Move(dst0, Immediate(lower)); 2130 __ Move(dst0, Immediate(lower));
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2301 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2302 __ Nop(padding_size); 2302 __ Nop(padding_size);
2303 } 2303 }
2304 } 2304 }
2305 2305
2306 #undef __ 2306 #undef __
2307 2307
2308 } // namespace compiler 2308 } // namespace compiler
2309 } // namespace internal 2309 } // namespace internal
2310 } // namespace v8 2310 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698