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

Side by Side Diff: src/ia32/lithium-ia32.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/ia32/lithium-gap-resolver-ia32.cc ('k') | src/ia32/macro-assembler-ia32.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/hydrogen-osr.h" 9 #include "src/hydrogen-osr.h"
10 #include "src/ia32/lithium-codegen-ia32.h" 10 #include "src/ia32/lithium-codegen-ia32.h"
(...skipping 2064 matching lines...) Expand 10 before | Expand all | Expand 10 after
2075 2075
2076 2076
2077 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) { 2077 LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
2078 Representation r = instr->representation(); 2078 Representation r = instr->representation();
2079 if (r.IsSmi()) { 2079 if (r.IsSmi()) {
2080 return DefineAsRegister(new(zone()) LConstantS); 2080 return DefineAsRegister(new(zone()) LConstantS);
2081 } else if (r.IsInteger32()) { 2081 } else if (r.IsInteger32()) {
2082 return DefineAsRegister(new(zone()) LConstantI); 2082 return DefineAsRegister(new(zone()) LConstantI);
2083 } else if (r.IsDouble()) { 2083 } else if (r.IsDouble()) {
2084 double value = instr->DoubleValue(); 2084 double value = instr->DoubleValue();
2085 bool value_is_zero = BitCast<uint64_t, double>(value) == 0; 2085 bool value_is_zero = bit_cast<uint64_t, double>(value) == 0;
2086 LOperand* temp = value_is_zero ? NULL : TempRegister(); 2086 LOperand* temp = value_is_zero ? NULL : TempRegister();
2087 return DefineAsRegister(new(zone()) LConstantD(temp)); 2087 return DefineAsRegister(new(zone()) LConstantD(temp));
2088 } else if (r.IsExternal()) { 2088 } else if (r.IsExternal()) {
2089 return DefineAsRegister(new(zone()) LConstantE); 2089 return DefineAsRegister(new(zone()) LConstantE);
2090 } else if (r.IsTagged()) { 2090 } else if (r.IsTagged()) {
2091 return DefineAsRegister(new(zone()) LConstantT); 2091 return DefineAsRegister(new(zone()) LConstantT);
2092 } else { 2092 } else {
2093 UNREACHABLE(); 2093 UNREACHABLE();
2094 return NULL; 2094 return NULL;
2095 } 2095 }
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
2701 LOperand* function = UseRegisterAtStart(instr->function()); 2701 LOperand* function = UseRegisterAtStart(instr->function());
2702 LAllocateBlockContext* result = 2702 LAllocateBlockContext* result =
2703 new(zone()) LAllocateBlockContext(context, function); 2703 new(zone()) LAllocateBlockContext(context, function);
2704 return MarkAsCall(DefineFixed(result, esi), instr); 2704 return MarkAsCall(DefineFixed(result, esi), instr);
2705 } 2705 }
2706 2706
2707 2707
2708 } } // namespace v8::internal 2708 } } // namespace v8::internal
2709 2709
2710 #endif // V8_TARGET_ARCH_IA32 2710 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-gap-resolver-ia32.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698