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

Side by Side Diff: src/x64/lithium-gap-resolver-x64.cc

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/x64/lithium-codegen-x64.h" 9 #include "src/x64/lithium-codegen-x64.h"
10 #include "src/x64/lithium-gap-resolver-x64.h" 10 #include "src/x64/lithium-gap-resolver-x64.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (cgen_->IsDehoistedKeyConstant(constant_source)) { 181 if (cgen_->IsDehoistedKeyConstant(constant_source)) {
182 __ Set(dst, constant); 182 __ Set(dst, constant);
183 } else { 183 } else {
184 __ Set(dst, static_cast<uint32_t>(constant)); 184 __ Set(dst, static_cast<uint32_t>(constant));
185 } 185 }
186 } else { 186 } else {
187 __ Move(dst, cgen_->ToHandle(constant_source)); 187 __ Move(dst, cgen_->ToHandle(constant_source));
188 } 188 }
189 } else if (destination->IsDoubleRegister()) { 189 } else if (destination->IsDoubleRegister()) {
190 double v = cgen_->ToDouble(constant_source); 190 double v = cgen_->ToDouble(constant_source);
191 uint64_t int_val = BitCast<uint64_t, double>(v); 191 uint64_t int_val = bit_cast<uint64_t, double>(v);
192 XMMRegister dst = cgen_->ToDoubleRegister(destination); 192 XMMRegister dst = cgen_->ToDoubleRegister(destination);
193 if (int_val == 0) { 193 if (int_val == 0) {
194 __ xorps(dst, dst); 194 __ xorps(dst, dst);
195 } else { 195 } else {
196 __ Set(kScratchRegister, int_val); 196 __ Set(kScratchRegister, int_val);
197 __ movq(dst, kScratchRegister); 197 __ movq(dst, kScratchRegister);
198 } 198 }
199 } else { 199 } else {
200 DCHECK(destination->IsStackSlot()); 200 DCHECK(destination->IsStackSlot());
201 Operand dst = cgen_->ToOperand(destination); 201 Operand dst = cgen_->ToOperand(destination);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 moves_[i].set_source(source); 310 moves_[i].set_source(source);
311 } 311 }
312 } 312 }
313 } 313 }
314 314
315 #undef __ 315 #undef __
316 316
317 } } // namespace v8::internal 317 } } // namespace v8::internal
318 318
319 #endif // V8_TARGET_ARCH_X64 319 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/lithium-codegen-x64.cc ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698