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/ppc/macro-assembler-ppc.cc

Issue 1826483002: PPC: [stubs] Split ToNumberStub into reusable subparts. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 9 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 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
2902 } 2902 }
2903 2903
2904 2904
2905 void MacroAssembler::JumpIfEitherSmi(Register reg1, Register reg2, 2905 void MacroAssembler::JumpIfEitherSmi(Register reg1, Register reg2,
2906 Label* on_either_smi) { 2906 Label* on_either_smi) {
2907 STATIC_ASSERT(kSmiTag == 0); 2907 STATIC_ASSERT(kSmiTag == 0);
2908 JumpIfSmi(reg1, on_either_smi); 2908 JumpIfSmi(reg1, on_either_smi);
2909 JumpIfSmi(reg2, on_either_smi); 2909 JumpIfSmi(reg2, on_either_smi);
2910 } 2910 }
2911 2911
2912 void MacroAssembler::AssertNotNumber(Register object) {
2913 if (emit_debug_code()) {
2914 STATIC_ASSERT(kSmiTag == 0);
2915 TestIfSmi(object, r0);
2916 Check(ne, kOperandIsANumber, cr0);
2917 push(object);
2918 CompareObjectType(object, object, object, HEAP_NUMBER_TYPE);
2919 pop(object);
2920 Check(ne, kOperandIsANumber);
2921 }
2922 }
2912 2923
2913 void MacroAssembler::AssertNotSmi(Register object) { 2924 void MacroAssembler::AssertNotSmi(Register object) {
2914 if (emit_debug_code()) { 2925 if (emit_debug_code()) {
2915 STATIC_ASSERT(kSmiTag == 0); 2926 STATIC_ASSERT(kSmiTag == 0);
2916 TestIfSmi(object, r0); 2927 TestIfSmi(object, r0);
2917 Check(ne, kOperandIsASmi, cr0); 2928 Check(ne, kOperandIsASmi, cr0);
2918 } 2929 }
2919 } 2930 }
2920 2931
2921 2932
(...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after
4630 } 4641 }
4631 if (mag.shift > 0) srawi(result, result, mag.shift); 4642 if (mag.shift > 0) srawi(result, result, mag.shift);
4632 ExtractBit(r0, dividend, 31); 4643 ExtractBit(r0, dividend, 31);
4633 add(result, result, r0); 4644 add(result, result, r0);
4634 } 4645 }
4635 4646
4636 } // namespace internal 4647 } // namespace internal
4637 } // namespace v8 4648 } // namespace v8
4638 4649
4639 #endif // V8_TARGET_ARCH_PPC 4650 #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