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

Side by Side Diff: src/x64/full-codegen-x64.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/runtime.h ('k') | src/x64/lithium-codegen-x64.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 3008 matching lines...) Expand 10 before | Expand all | Expand 10 after
3019 3019
3020 __ JumpIfSmi(rax, if_false); 3020 __ JumpIfSmi(rax, if_false);
3021 __ CmpObjectType(rax, JS_FUNCTION_TYPE, rbx); 3021 __ CmpObjectType(rax, JS_FUNCTION_TYPE, rbx);
3022 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3022 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3023 Split(equal, if_true, if_false, fall_through); 3023 Split(equal, if_true, if_false, fall_through);
3024 3024
3025 context()->Plug(if_true, if_false); 3025 context()->Plug(if_true, if_false);
3026 } 3026 }
3027 3027
3028 3028
3029 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
3030 ZoneList<Expression*>* args = expr->arguments();
3031 ASSERT(args->length() == 1);
3032
3033 VisitForAccumulatorValue(args->at(0));
3034
3035 Label materialize_true, materialize_false;
3036 Label* if_true = NULL;
3037 Label* if_false = NULL;
3038 Label* fall_through = NULL;
3039 context()->PrepareTest(&materialize_true, &materialize_false,
3040 &if_true, &if_false, &fall_through);
3041
3042 Handle<Map> map = masm()->isolate()->factory()->heap_number_map();
3043 __ CheckMap(rax, map, if_false, DO_SMI_CHECK);
3044 __ cmpl(FieldOperand(rax, HeapNumber::kExponentOffset),
3045 Immediate(0x80000000));
3046 __ j(not_equal, if_false);
3047 __ cmpl(FieldOperand(rax, HeapNumber::kMantissaOffset),
3048 Immediate(0x00000000));
3049 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3050 Split(equal, if_true, if_false, fall_through);
3051
3052 context()->Plug(if_true, if_false);
3053 }
3054
3055
3029 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { 3056 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
3030 ZoneList<Expression*>* args = expr->arguments(); 3057 ZoneList<Expression*>* args = expr->arguments();
3031 ASSERT(args->length() == 1); 3058 ASSERT(args->length() == 1);
3032 3059
3033 VisitForAccumulatorValue(args->at(0)); 3060 VisitForAccumulatorValue(args->at(0));
3034 3061
3035 Label materialize_true, materialize_false; 3062 Label materialize_true, materialize_false;
3036 Label* if_true = NULL; 3063 Label* if_true = NULL;
3037 Label* if_false = NULL; 3064 Label* if_false = NULL;
3038 Label* fall_through = NULL; 3065 Label* fall_through = NULL;
(...skipping 1912 matching lines...) Expand 10 before | Expand all | Expand 10 after
4951 4978
4952 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4979 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4953 Assembler::target_address_at(call_target_address)); 4980 Assembler::target_address_at(call_target_address));
4954 return OSR_AFTER_STACK_CHECK; 4981 return OSR_AFTER_STACK_CHECK;
4955 } 4982 }
4956 4983
4957 4984
4958 } } // namespace v8::internal 4985 } } // namespace v8::internal
4959 4986
4960 #endif // V8_TARGET_ARCH_X64 4987 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/runtime.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698