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

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

Issue 1648353002: PPC: [builtins] Make Math.max and Math.min fast by default. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start)); 176 DCHECK_EQ(expected_size, SizeOfCodeGeneratedSince(&start));
177 } 177 }
178 178
179 179
180 void MacroAssembler::Drop(int count) { 180 void MacroAssembler::Drop(int count) {
181 if (count > 0) { 181 if (count > 0) {
182 Add(sp, sp, count * kPointerSize, r0); 182 Add(sp, sp, count * kPointerSize, r0);
183 } 183 }
184 } 184 }
185 185
186 void MacroAssembler::Drop(Register count, Register scratch) {
187 ShiftLeftImm(scratch, count, Operand(kPointerSizeLog2));
188 add(sp, sp, scratch);
189 }
186 190
187 void MacroAssembler::Call(Label* target) { b(target, SetLK); } 191 void MacroAssembler::Call(Label* target) { b(target, SetLK); }
188 192
189 193
190 void MacroAssembler::Push(Handle<Object> handle) { 194 void MacroAssembler::Push(Handle<Object> handle) {
191 mov(r0, Operand(handle)); 195 mov(r0, Operand(handle));
192 push(r0); 196 push(r0);
193 } 197 }
194 198
195 199
(...skipping 4130 matching lines...) Expand 10 before | Expand all | Expand 10 after
4326 } 4330 }
4327 if (mag.shift > 0) srawi(result, result, mag.shift); 4331 if (mag.shift > 0) srawi(result, result, mag.shift);
4328 ExtractBit(r0, dividend, 31); 4332 ExtractBit(r0, dividend, 31);
4329 add(result, result, r0); 4333 add(result, result, r0);
4330 } 4334 }
4331 4335
4332 } // namespace internal 4336 } // namespace internal
4333 } // namespace v8 4337 } // namespace v8
4334 4338
4335 #endif // V8_TARGET_ARCH_PPC 4339 #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