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

Side by Side Diff: src/ia32/code-stubs-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/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 Register object = eax; // Object (lhs). 2523 Register object = eax; // Object (lhs).
2524 Register map = ebx; // Map of the object. 2524 Register map = ebx; // Map of the object.
2525 Register function = edx; // Function (rhs). 2525 Register function = edx; // Function (rhs).
2526 Register prototype = edi; // Prototype of the function. 2526 Register prototype = edi; // Prototype of the function.
2527 Register scratch = ecx; 2527 Register scratch = ecx;
2528 2528
2529 // Constants describing the call site code to patch. 2529 // Constants describing the call site code to patch.
2530 static const int kDeltaToCmpImmediate = 2; 2530 static const int kDeltaToCmpImmediate = 2;
2531 static const int kDeltaToMov = 8; 2531 static const int kDeltaToMov = 8;
2532 static const int kDeltaToMovImmediate = 9; 2532 static const int kDeltaToMovImmediate = 9;
2533 static const int8_t kCmpEdiOperandByte1 = BitCast<int8_t, uint8_t>(0x3b); 2533 static const int8_t kCmpEdiOperandByte1 = bit_cast<int8_t, uint8_t>(0x3b);
2534 static const int8_t kCmpEdiOperandByte2 = BitCast<int8_t, uint8_t>(0x3d); 2534 static const int8_t kCmpEdiOperandByte2 = bit_cast<int8_t, uint8_t>(0x3d);
2535 static const int8_t kMovEaxImmediateByte = BitCast<int8_t, uint8_t>(0xb8); 2535 static const int8_t kMovEaxImmediateByte = bit_cast<int8_t, uint8_t>(0xb8);
2536 2536
2537 DCHECK_EQ(object.code(), InstanceofStub::left().code()); 2537 DCHECK_EQ(object.code(), InstanceofStub::left().code());
2538 DCHECK_EQ(function.code(), InstanceofStub::right().code()); 2538 DCHECK_EQ(function.code(), InstanceofStub::right().code());
2539 2539
2540 // Get the object and function - they are always both needed. 2540 // Get the object and function - they are always both needed.
2541 Label slow, not_js_object; 2541 Label slow, not_js_object;
2542 if (!HasArgsInRegisters()) { 2542 if (!HasArgsInRegisters()) {
2543 __ mov(object, Operand(esp, 2 * kPointerSize)); 2543 __ mov(object, Operand(esp, 2 * kPointerSize));
2544 __ mov(function, Operand(esp, 1 * kPointerSize)); 2544 __ mov(function, Operand(esp, 1 * kPointerSize));
2545 } 2545 }
(...skipping 2133 matching lines...) Expand 10 before | Expand all | Expand 10 after
4679 Operand(ebp, 7 * kPointerSize), 4679 Operand(ebp, 7 * kPointerSize),
4680 NULL); 4680 NULL);
4681 } 4681 }
4682 4682
4683 4683
4684 #undef __ 4684 #undef __
4685 4685
4686 } } // namespace v8::internal 4686 } } // namespace v8::internal
4687 4687
4688 #endif // V8_TARGET_ARCH_IA32 4688 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698