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

Side by Side Diff: src/crankshaft/arm64/lithium-codegen-arm64.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/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/arm64/lithium-codegen-arm64.h" 5 #include "src/crankshaft/arm64/lithium-codegen-arm64.h"
6 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2309 matching lines...) Expand 10 before | Expand all | Expand 10 after
2320 2320
2321 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { 2321 void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) {
2322 Register value = ToRegister(instr->value()); 2322 Register value = ToRegister(instr->value());
2323 Register map = ToRegister(instr->temp()); 2323 Register map = ToRegister(instr->temp());
2324 2324
2325 __ Ldr(map, FieldMemOperand(value, HeapObject::kMapOffset)); 2325 __ Ldr(map, FieldMemOperand(value, HeapObject::kMapOffset));
2326 EmitCompareAndBranch(instr, eq, map, Operand(instr->map())); 2326 EmitCompareAndBranch(instr, eq, map, Operand(instr->map()));
2327 } 2327 }
2328 2328
2329 2329
2330 void LCodeGen::DoCompareMinusZeroAndBranch(LCompareMinusZeroAndBranch* instr) {
2331 Representation rep = instr->hydrogen()->value()->representation();
2332 DCHECK(!rep.IsInteger32());
2333 Register scratch = ToRegister(instr->temp());
2334
2335 if (rep.IsDouble()) {
2336 __ JumpIfMinusZero(ToDoubleRegister(instr->value()),
2337 instr->TrueLabel(chunk()));
2338 } else {
2339 Register value = ToRegister(instr->value());
2340 __ JumpIfNotHeapNumber(value, instr->FalseLabel(chunk()), DO_SMI_CHECK);
2341 __ Ldr(scratch, FieldMemOperand(value, HeapNumber::kValueOffset));
2342 __ JumpIfMinusZero(scratch, instr->TrueLabel(chunk()));
2343 }
2344 EmitGoto(instr->FalseDestination(chunk()));
2345 }
2346
2347
2348 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) { 2330 void LCodeGen::DoCompareNumericAndBranch(LCompareNumericAndBranch* instr) {
2349 LOperand* left = instr->left(); 2331 LOperand* left = instr->left();
2350 LOperand* right = instr->right(); 2332 LOperand* right = instr->right();
2351 bool is_unsigned = 2333 bool is_unsigned =
2352 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) || 2334 instr->hydrogen()->left()->CheckFlag(HInstruction::kUint32) ||
2353 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32); 2335 instr->hydrogen()->right()->CheckFlag(HInstruction::kUint32);
2354 Condition cond = TokenToCondition(instr->op(), is_unsigned); 2336 Condition cond = TokenToCondition(instr->op(), is_unsigned);
2355 2337
2356 if (left->IsConstantOperand() && right->IsConstantOperand()) { 2338 if (left->IsConstantOperand() && right->IsConstantOperand()) {
2357 // We can statically evaluate the comparison. 2339 // We can statically evaluate the comparison.
(...skipping 3405 matching lines...) Expand 10 before | Expand all | Expand 10 after
5763 Handle<ScopeInfo> scope_info = instr->scope_info(); 5745 Handle<ScopeInfo> scope_info = instr->scope_info();
5764 __ Push(scope_info); 5746 __ Push(scope_info);
5765 __ Push(ToRegister(instr->function())); 5747 __ Push(ToRegister(instr->function()));
5766 CallRuntime(Runtime::kPushBlockContext, instr); 5748 CallRuntime(Runtime::kPushBlockContext, instr);
5767 RecordSafepoint(Safepoint::kNoLazyDeopt); 5749 RecordSafepoint(Safepoint::kNoLazyDeopt);
5768 } 5750 }
5769 5751
5770 5752
5771 } // namespace internal 5753 } // namespace internal
5772 } // namespace v8 5754 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-arm64.cc ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698