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

Side by Side Diff: src/ppc/macro-assembler-ppc.cc

Issue 1327093002: PPC: [builtins] Unify the various versions of [[Call]] with a Call builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 | « src/ppc/macro-assembler-ppc.h ('k') | no next file » | 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 <assert.h> // For assert 5 #include <assert.h> // For assert
6 #include <limits.h> // For LONG_MIN, LONG_MAX. 6 #include <limits.h> // For LONG_MIN, LONG_MAX.
7 7
8 #if V8_TARGET_ARCH_PPC 8 #if V8_TARGET_ARCH_PPC
9 9
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 2381 matching lines...) Expand 10 before | Expand all | Expand 10 after
2392 } 2392 }
2393 } else { 2393 } else {
2394 // Slot is in the current function context. Move it into the 2394 // Slot is in the current function context. Move it into the
2395 // destination register in case we store into it (the write barrier 2395 // destination register in case we store into it (the write barrier
2396 // cannot be allowed to destroy the context in esi). 2396 // cannot be allowed to destroy the context in esi).
2397 mr(dst, cp); 2397 mr(dst, cp);
2398 } 2398 }
2399 } 2399 }
2400 2400
2401 2401
2402 void MacroAssembler::LoadGlobalProxy(Register dst) {
2403 LoadP(dst, GlobalObjectOperand());
2404 LoadP(dst, FieldMemOperand(dst, GlobalObject::kGlobalProxyOffset));
2405 }
2406
2407
2402 void MacroAssembler::LoadTransitionedArrayMapConditional( 2408 void MacroAssembler::LoadTransitionedArrayMapConditional(
2403 ElementsKind expected_kind, ElementsKind transitioned_kind, 2409 ElementsKind expected_kind, ElementsKind transitioned_kind,
2404 Register map_in_out, Register scratch, Label* no_map_match) { 2410 Register map_in_out, Register scratch, Label* no_map_match) {
2405 // Load the global or builtins object from the current context. 2411 // Load the global or builtins object from the current context.
2406 LoadP(scratch, 2412 LoadP(scratch,
2407 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX))); 2413 MemOperand(cp, Context::SlotOffset(Context::GLOBAL_OBJECT_INDEX)));
2408 LoadP(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset)); 2414 LoadP(scratch, FieldMemOperand(scratch, GlobalObject::kNativeContextOffset));
2409 2415
2410 // Check that the function's map is the same as the expected cached map. 2416 // Check that the function's map is the same as the expected cached map.
2411 LoadP(scratch, 2417 LoadP(scratch,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
2568 Check(ne, kOperandIsASmiAndNotAName, cr0); 2574 Check(ne, kOperandIsASmiAndNotAName, cr0);
2569 push(object); 2575 push(object);
2570 LoadP(object, FieldMemOperand(object, HeapObject::kMapOffset)); 2576 LoadP(object, FieldMemOperand(object, HeapObject::kMapOffset));
2571 CompareInstanceType(object, object, LAST_NAME_TYPE); 2577 CompareInstanceType(object, object, LAST_NAME_TYPE);
2572 pop(object); 2578 pop(object);
2573 Check(le, kOperandIsNotAName); 2579 Check(le, kOperandIsNotAName);
2574 } 2580 }
2575 } 2581 }
2576 2582
2577 2583
2584 void MacroAssembler::AssertFunction(Register object) {
2585 if (emit_debug_code()) {
2586 STATIC_ASSERT(kSmiTag == 0);
2587 TestIfSmi(object, r0);
2588 Check(ne, kOperandIsASmiAndNotAFunction, cr0);
2589 CompareObjectType(object, r0, r0, JS_FUNCTION_TYPE);
2590 Check(eq, kOperandIsNotAFunction);
2591 }
2592 }
2593
2594
2578 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object, 2595 void MacroAssembler::AssertUndefinedOrAllocationSite(Register object,
2579 Register scratch) { 2596 Register scratch) {
2580 if (emit_debug_code()) { 2597 if (emit_debug_code()) {
2581 Label done_checking; 2598 Label done_checking;
2582 AssertNotSmi(object); 2599 AssertNotSmi(object);
2583 CompareRoot(object, Heap::kUndefinedValueRootIndex); 2600 CompareRoot(object, Heap::kUndefinedValueRootIndex);
2584 beq(&done_checking); 2601 beq(&done_checking);
2585 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset)); 2602 LoadP(scratch, FieldMemOperand(object, HeapObject::kMapOffset));
2586 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex); 2603 CompareRoot(scratch, Heap::kAllocationSiteMapRootIndex);
2587 Assert(eq, kExpectedUndefinedOrCell); 2604 Assert(eq, kExpectedUndefinedOrCell);
(...skipping 1821 matching lines...) Expand 10 before | Expand all | Expand 10 after
4409 } 4426 }
4410 if (mag.shift > 0) srawi(result, result, mag.shift); 4427 if (mag.shift > 0) srawi(result, result, mag.shift);
4411 ExtractBit(r0, dividend, 31); 4428 ExtractBit(r0, dividend, 31);
4412 add(result, result, r0); 4429 add(result, result, r0);
4413 } 4430 }
4414 4431
4415 } // namespace internal 4432 } // namespace internal
4416 } // namespace v8 4433 } // namespace v8
4417 4434
4418 #endif // V8_TARGET_ARCH_PPC 4435 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/ppc/macro-assembler-ppc.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698