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

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

Issue 149133004: A64: Synchronize with r17807. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/ia32/ic-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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
3695 3721
3696 VisitForStackValue(args->at(0)); 3722 VisitForStackValue(args->at(0));
3697 VisitForStackValue(args->at(1)); 3723 VisitForStackValue(args->at(1));
3698 3724
3699 StringCompareStub stub; 3725 StringCompareStub stub;
3700 __ CallStub(&stub); 3726 __ CallStub(&stub);
3701 context()->Plug(eax); 3727 context()->Plug(eax);
3702 } 3728 }
3703 3729
3704 3730
3705 void FullCodeGenerator::EmitMathSin(CallRuntime* expr) {
3706 // Load the argument on the stack and call the stub.
3707 TranscendentalCacheStub stub(TranscendentalCache::SIN,
3708 TranscendentalCacheStub::TAGGED);
3709 ZoneList<Expression*>* args = expr->arguments();
3710 ASSERT(args->length() == 1);
3711 VisitForStackValue(args->at(0));
3712 __ CallStub(&stub);
3713 context()->Plug(eax);
3714 }
3715
3716
3717 void FullCodeGenerator::EmitMathCos(CallRuntime* expr) {
3718 // Load the argument on the stack and call the stub.
3719 TranscendentalCacheStub stub(TranscendentalCache::COS,
3720 TranscendentalCacheStub::TAGGED);
3721 ZoneList<Expression*>* args = expr->arguments();
3722 ASSERT(args->length() == 1);
3723 VisitForStackValue(args->at(0));
3724 __ CallStub(&stub);
3725 context()->Plug(eax);
3726 }
3727
3728
3729 void FullCodeGenerator::EmitMathTan(CallRuntime* expr) {
3730 // Load the argument on the stack and call the stub.
3731 TranscendentalCacheStub stub(TranscendentalCache::TAN,
3732 TranscendentalCacheStub::TAGGED);
3733 ZoneList<Expression*>* args = expr->arguments();
3734 ASSERT(args->length() == 1);
3735 VisitForStackValue(args->at(0));
3736 __ CallStub(&stub);
3737 context()->Plug(eax);
3738 }
3739
3740
3741 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { 3731 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) {
3742 // Load the argument on the stack and call the stub. 3732 // Load the argument on the stack and call the stub.
3743 TranscendentalCacheStub stub(TranscendentalCache::LOG, 3733 TranscendentalCacheStub stub(TranscendentalCache::LOG,
3744 TranscendentalCacheStub::TAGGED); 3734 TranscendentalCacheStub::TAGGED);
3745 ZoneList<Expression*>* args = expr->arguments(); 3735 ZoneList<Expression*>* args = expr->arguments();
3746 ASSERT(args->length() == 1); 3736 ASSERT(args->length() == 1);
3747 VisitForStackValue(args->at(0)); 3737 VisitForStackValue(args->at(0));
3748 __ CallStub(&stub); 3738 __ CallStub(&stub);
3749 context()->Plug(eax); 3739 context()->Plug(eax);
3750 } 3740 }
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
4978 4968
4979 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4969 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4980 Assembler::target_address_at(call_target_address)); 4970 Assembler::target_address_at(call_target_address));
4981 return OSR_AFTER_STACK_CHECK; 4971 return OSR_AFTER_STACK_CHECK;
4982 } 4972 }
4983 4973
4984 4974
4985 } } // namespace v8::internal 4975 } } // namespace v8::internal
4986 4976
4987 #endif // V8_TARGET_ARCH_IA32 4977 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/deoptimizer-ia32.cc ('k') | src/ia32/ic-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698