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

Side by Side Diff: src/full-codegen/x87/full-codegen-x87.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/full-codegen/x64/full-codegen-x64.cc ('k') | src/js/runtime.js » ('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 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_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/ast/scopes.h" 7 #include "src/ast/scopes.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/codegen.h" 10 #include "src/codegen.h"
(...skipping 2885 matching lines...) Expand 10 before | Expand all | Expand 10 after
2896 2896
2897 __ JumpIfSmi(eax, if_false); 2897 __ JumpIfSmi(eax, if_false);
2898 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx); 2898 __ CmpObjectType(eax, SIMD128_VALUE_TYPE, ebx);
2899 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 2899 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
2900 Split(equal, if_true, if_false, fall_through); 2900 Split(equal, if_true, if_false, fall_through);
2901 2901
2902 context()->Plug(if_true, if_false); 2902 context()->Plug(if_true, if_false);
2903 } 2903 }
2904 2904
2905 2905
2906 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
2907 ZoneList<Expression*>* args = expr->arguments();
2908 DCHECK(args->length() == 1);
2909
2910 VisitForAccumulatorValue(args->at(0));
2911
2912 Label materialize_true, materialize_false;
2913 Label* if_true = NULL;
2914 Label* if_false = NULL;
2915 Label* fall_through = NULL;
2916 context()->PrepareTest(&materialize_true, &materialize_false,
2917 &if_true, &if_false, &fall_through);
2918
2919 Handle<Map> map = masm()->isolate()->factory()->heap_number_map();
2920 __ CheckMap(eax, map, if_false, DO_SMI_CHECK);
2921 // Check if the exponent half is 0x80000000. Comparing against 1 and
2922 // checking for overflow is the shortest possible encoding.
2923 __ cmp(FieldOperand(eax, HeapNumber::kExponentOffset), Immediate(0x1));
2924 __ j(no_overflow, if_false);
2925 __ cmp(FieldOperand(eax, HeapNumber::kMantissaOffset), Immediate(0x0));
2926 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
2927 Split(equal, if_true, if_false, fall_through);
2928
2929 context()->Plug(if_true, if_false);
2930 }
2931
2932
2933 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { 2906 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
2934 ZoneList<Expression*>* args = expr->arguments(); 2907 ZoneList<Expression*>* args = expr->arguments();
2935 DCHECK(args->length() == 1); 2908 DCHECK(args->length() == 1);
2936 2909
2937 VisitForAccumulatorValue(args->at(0)); 2910 VisitForAccumulatorValue(args->at(0));
2938 2911
2939 Label materialize_true, materialize_false; 2912 Label materialize_true, materialize_false;
2940 Label* if_true = NULL; 2913 Label* if_true = NULL;
2941 Label* if_false = NULL; 2914 Label* if_false = NULL;
2942 Label* fall_through = NULL; 2915 Label* fall_through = NULL;
(...skipping 1648 matching lines...) Expand 10 before | Expand all | Expand 10 after
4591 Assembler::target_address_at(call_target_address, 4564 Assembler::target_address_at(call_target_address,
4592 unoptimized_code)); 4565 unoptimized_code));
4593 return OSR_AFTER_STACK_CHECK; 4566 return OSR_AFTER_STACK_CHECK;
4594 } 4567 }
4595 4568
4596 4569
4597 } // namespace internal 4570 } // namespace internal
4598 } // namespace v8 4571 } // namespace v8
4599 4572
4600 #endif // V8_TARGET_ARCH_X87 4573 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x64/full-codegen-x64.cc ('k') | src/js/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698