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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 63423004: Introduce %_IsMinusZero. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: extended test case Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-minus-zero.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('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 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3034 matching lines...) Expand 10 before | Expand all | Expand 10 after
3045 3045
3046 __ JumpIfSmi(eax, if_false); 3046 __ JumpIfSmi(eax, if_false);
3047 __ CmpObjectType(eax, JS_FUNCTION_TYPE, ebx); 3047 __ CmpObjectType(eax, JS_FUNCTION_TYPE, ebx);
3048 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3048 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3049 Split(equal, if_true, if_false, fall_through); 3049 Split(equal, if_true, if_false, fall_through);
3050 3050
3051 context()->Plug(if_true, if_false); 3051 context()->Plug(if_true, if_false);
3052 } 3052 }
3053 3053
3054 3054
3055 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
3056 ZoneList<Expression*>* args = expr->arguments();
3057 ASSERT(args->length() == 1);
3058
3059 VisitForAccumulatorValue(args->at(0));
3060
3061 Label materialize_true, materialize_false;
3062 Label* if_true = NULL;
3063 Label* if_false = NULL;
3064 Label* fall_through = NULL;
3065 context()->PrepareTest(&materialize_true, &materialize_false,
3066 &if_true, &if_false, &fall_through);
3067
3068 Handle<Map> map = masm()->isolate()->factory()->heap_number_map();
3069 __ CheckMap(eax, map, if_false, DO_SMI_CHECK);
3070 __ cmp(FieldOperand(eax, HeapNumber::kExponentOffset), Immediate(0x80000000));
3071 __ j(not_equal, if_false);
3072 __ cmp(FieldOperand(eax, HeapNumber::kMantissaOffset), Immediate(0x00000000));
3073 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3074 Split(equal, if_true, if_false, fall_through);
3075
3076 context()->Plug(if_true, if_false);
3077 }
3078
3079
3080
3055 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { 3081 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
3056 ZoneList<Expression*>* args = expr->arguments(); 3082 ZoneList<Expression*>* args = expr->arguments();
3057 ASSERT(args->length() == 1); 3083 ASSERT(args->length() == 1);
3058 3084
3059 VisitForAccumulatorValue(args->at(0)); 3085 VisitForAccumulatorValue(args->at(0));
3060 3086
3061 Label materialize_true, materialize_false; 3087 Label materialize_true, materialize_false;
3062 Label* if_true = NULL; 3088 Label* if_true = NULL;
3063 Label* if_false = NULL; 3089 Label* if_false = NULL;
3064 Label* fall_through = NULL; 3090 Label* fall_through = NULL;
(...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after
4969 4995
4970 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4996 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4971 Assembler::target_address_at(call_target_address)); 4997 Assembler::target_address_at(call_target_address));
4972 return OSR_AFTER_STACK_CHECK; 4998 return OSR_AFTER_STACK_CHECK;
4973 } 4999 }
4974 5000
4975 5001
4976 } } // namespace v8::internal 5002 } } // namespace v8::internal
4977 5003
4978 #endif // V8_TARGET_ARCH_IA32 5004 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-minus-zero.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698