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

Side by Side Diff: src/crankshaft/ppc/lithium-codegen-ppc.cc

Issue 1680783002: [intrinsics] Kill the %_IsMinusZero intrinsic. (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/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/ppc/lithium-ppc.h » ('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 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 "src/crankshaft/ppc/lithium-codegen-ppc.h" 5 #include "src/crankshaft/ppc/lithium-codegen-ppc.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/crankshaft/hydrogen-osr.h" 10 #include "src/crankshaft/hydrogen-osr.h"
(...skipping 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after
2367 __ fcmpu(input_reg, input_reg); 2367 __ fcmpu(input_reg, input_reg);
2368 EmitFalseBranch(instr, ordered); 2368 EmitFalseBranch(instr, ordered);
2369 2369
2370 Register scratch = scratch0(); 2370 Register scratch = scratch0();
2371 __ MovDoubleHighToInt(scratch, input_reg); 2371 __ MovDoubleHighToInt(scratch, input_reg);
2372 __ Cmpi(scratch, Operand(kHoleNanUpper32), r0); 2372 __ Cmpi(scratch, Operand(kHoleNanUpper32), r0);
2373 EmitBranch(instr, eq); 2373 EmitBranch(instr, eq);
2374 } 2374 }
2375 2375
2376 2376
2377 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) {
2378 Representation rep = instr->hydrogen()->value()->representation();
2379 DCHECK(!rep.IsInteger32());
2380 Register scratch = ToRegister(instr->temp());
2381
2382 if (rep.IsDouble()) {
2383 DoubleRegister value = ToDoubleRegister(instr->value());
2384 __ fcmpu(value, kDoubleRegZero);
2385 EmitFalseBranch(instr, ne);
2386 __ TestDoubleSign(value, scratch);
2387 EmitBranch(instr, lt);
2388 } else {
2389 Register value = ToRegister(instr->value());
2390 __ CheckMap(value, scratch, Heap::kHeapNumberMapRootIndex,
2391 instr->FalseLabel(chunk()), DO_SMI_CHECK);
2392 __ TestHeapNumberIsMinusZero(value, scratch, ip);
2393 EmitBranch(instr, eq);
2394 }
2395 }
2396
2397
2398 Condition LCodeGen::EmitIsString(Register input, Register temp1, 2377 Condition LCodeGen::EmitIsString(Register input, Register temp1,
2399 Label* is_not_string, 2378 Label* is_not_string,
2400 SmiCheck check_needed = INLINE_SMI_CHECK) { 2379 SmiCheck check_needed = INLINE_SMI_CHECK) {
2401 if (check_needed == INLINE_SMI_CHECK) { 2380 if (check_needed == INLINE_SMI_CHECK) {
2402 __ JumpIfSmi(input, is_not_string); 2381 __ JumpIfSmi(input, is_not_string);
2403 } 2382 }
2404 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE); 2383 __ CompareObjectType(input, temp1, temp1, FIRST_NONSTRING_TYPE);
2405 2384
2406 return lt; 2385 return lt;
2407 } 2386 }
(...skipping 3394 matching lines...) Expand 10 before | Expand all | Expand 10 after
5802 __ Push(scope_info); 5781 __ Push(scope_info);
5803 __ push(ToRegister(instr->function())); 5782 __ push(ToRegister(instr->function()));
5804 CallRuntime(Runtime::kPushBlockContext, instr); 5783 CallRuntime(Runtime::kPushBlockContext, instr);
5805 RecordSafepoint(Safepoint::kNoLazyDeopt); 5784 RecordSafepoint(Safepoint::kNoLazyDeopt);
5806 } 5785 }
5807 5786
5808 5787
5809 #undef __ 5788 #undef __
5810 } // namespace internal 5789 } // namespace internal
5811 } // namespace v8 5790 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/mips64/lithium-mips64.cc ('k') | src/crankshaft/ppc/lithium-ppc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698