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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 #if V8_TARGET_ARCH_MIPS 5 #if V8_TARGET_ARCH_MIPS
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 2992 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 3003
3004 __ JumpIfSmi(v0, if_false); 3004 __ JumpIfSmi(v0, if_false);
3005 __ GetObjectType(v0, a1, a1); 3005 __ GetObjectType(v0, a1, a1);
3006 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3006 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3007 Split(eq, a1, Operand(SIMD128_VALUE_TYPE), if_true, if_false, fall_through); 3007 Split(eq, a1, Operand(SIMD128_VALUE_TYPE), if_true, if_false, fall_through);
3008 3008
3009 context()->Plug(if_true, if_false); 3009 context()->Plug(if_true, if_false);
3010 } 3010 }
3011 3011
3012 3012
3013 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
3014 ZoneList<Expression*>* args = expr->arguments();
3015 DCHECK(args->length() == 1);
3016
3017 VisitForAccumulatorValue(args->at(0));
3018
3019 Label materialize_true, materialize_false;
3020 Label* if_true = NULL;
3021 Label* if_false = NULL;
3022 Label* fall_through = NULL;
3023 context()->PrepareTest(&materialize_true, &materialize_false,
3024 &if_true, &if_false, &fall_through);
3025
3026 __ CheckMap(v0, a1, Heap::kHeapNumberMapRootIndex, if_false, DO_SMI_CHECK);
3027 __ lw(a2, FieldMemOperand(v0, HeapNumber::kExponentOffset));
3028 __ lw(a1, FieldMemOperand(v0, HeapNumber::kMantissaOffset));
3029 __ li(t0, 0x80000000);
3030 Label not_nan;
3031 __ Branch(&not_nan, ne, a2, Operand(t0));
3032 __ mov(t0, zero_reg);
3033 __ mov(a2, a1);
3034 __ bind(&not_nan);
3035
3036 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3037 Split(eq, a2, Operand(t0), if_true, if_false, fall_through);
3038
3039 context()->Plug(if_true, if_false);
3040 }
3041
3042
3043 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { 3013 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
3044 ZoneList<Expression*>* args = expr->arguments(); 3014 ZoneList<Expression*>* args = expr->arguments();
3045 DCHECK(args->length() == 1); 3015 DCHECK(args->length() == 1);
3046 3016
3047 VisitForAccumulatorValue(args->at(0)); 3017 VisitForAccumulatorValue(args->at(0));
3048 3018
3049 Label materialize_true, materialize_false; 3019 Label materialize_true, materialize_false;
3050 Label* if_true = NULL; 3020 Label* if_true = NULL;
3051 Label* if_false = NULL; 3021 Label* if_false = NULL;
3052 Label* fall_through = NULL; 3022 Label* fall_through = NULL;
(...skipping 1615 matching lines...) Expand 10 before | Expand all | Expand 10 after
4668 reinterpret_cast<uint32_t>( 4638 reinterpret_cast<uint32_t>(
4669 isolate->builtins()->OsrAfterStackCheck()->entry())); 4639 isolate->builtins()->OsrAfterStackCheck()->entry()));
4670 return OSR_AFTER_STACK_CHECK; 4640 return OSR_AFTER_STACK_CHECK;
4671 } 4641 }
4672 4642
4673 4643
4674 } // namespace internal 4644 } // namespace internal
4675 } // namespace v8 4645 } // namespace v8
4676 4646
4677 #endif // V8_TARGET_ARCH_MIPS 4647 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/full-codegen/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698