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

Side by Side Diff: src/a64/full-codegen-a64.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/a64/deoptimizer-a64.cc ('k') | src/a64/ic-a64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after
2861 2861
2862 __ JumpIfSmi(x0, if_false); 2862 __ JumpIfSmi(x0, if_false);
2863 __ CompareObjectType(x0, x10, x11, JS_FUNCTION_TYPE); 2863 __ CompareObjectType(x0, x10, x11, JS_FUNCTION_TYPE);
2864 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 2864 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
2865 Split(eq, if_true, if_false, fall_through); 2865 Split(eq, if_true, if_false, fall_through);
2866 2866
2867 context()->Plug(if_true, if_false); 2867 context()->Plug(if_true, if_false);
2868 } 2868 }
2869 2869
2870 2870
2871 void FullCodeGenerator::EmitIsMinusZero(CallRuntime* expr) {
2872 ZoneList<Expression*>* args = expr->arguments();
2873 ASSERT(args->length() == 1);
2874
2875 VisitForAccumulatorValue(args->at(0));
2876
2877 Label materialize_true, materialize_false;
2878 Label* if_true = NULL;
2879 Label* if_false = NULL;
2880 Label* fall_through = NULL;
2881 context()->PrepareTest(&materialize_true, &materialize_false,
2882 &if_true, &if_false, &fall_through);
2883
2884 // Only a HeapNumber can be -0.0, so return false if we have something else.
2885 __ CheckMap(x0, x1, Heap::kHeapNumberMapRootIndex, if_false, DO_SMI_CHECK);
2886
2887 // Test the bit pattern.
2888 __ Ldr(x10, FieldMemOperand(x0, HeapNumber::kValueOffset));
2889 __ Cmp(x10, 1); // Set V on 0x8000000000000000.
2890
2891 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
2892 Split(vs, if_true, if_false, fall_through);
2893
2894 context()->Plug(if_true, if_false);
2895 }
2896
2897
2871 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) { 2898 void FullCodeGenerator::EmitIsArray(CallRuntime* expr) {
2872 ZoneList<Expression*>* args = expr->arguments(); 2899 ZoneList<Expression*>* args = expr->arguments();
2873 ASSERT(args->length() == 1); 2900 ASSERT(args->length() == 1);
2874 2901
2875 VisitForAccumulatorValue(args->at(0)); 2902 VisitForAccumulatorValue(args->at(0));
2876 2903
2877 Label materialize_true, materialize_false; 2904 Label materialize_true, materialize_false;
2878 Label* if_true = NULL; 2905 Label* if_true = NULL;
2879 Label* if_false = NULL; 2906 Label* if_false = NULL;
2880 Label* fall_through = NULL; 2907 Label* fall_through = NULL;
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
3491 ASSERT_EQ(2, args->length()); 3518 ASSERT_EQ(2, args->length());
3492 VisitForStackValue(args->at(0)); 3519 VisitForStackValue(args->at(0));
3493 VisitForStackValue(args->at(1)); 3520 VisitForStackValue(args->at(1));
3494 3521
3495 StringCompareStub stub; 3522 StringCompareStub stub;
3496 __ CallStub(&stub); 3523 __ CallStub(&stub);
3497 context()->Plug(x0); 3524 context()->Plug(x0);
3498 } 3525 }
3499 3526
3500 3527
3501 void FullCodeGenerator::EmitMathSin(CallRuntime* expr) {
3502 // Load the argument on the stack and call the stub.
3503 TranscendentalCacheStub stub(TranscendentalCache::SIN,
3504 TranscendentalCacheStub::TAGGED);
3505 ZoneList<Expression*>* args = expr->arguments();
3506 ASSERT(args->length() == 1);
3507 VisitForStackValue(args->at(0));
3508 __ CallStub(&stub);
3509 context()->Plug(x0);
3510 }
3511
3512
3513 void FullCodeGenerator::EmitMathCos(CallRuntime* expr) {
3514 // Load the argument on the stack and call the stub.
3515 TranscendentalCacheStub stub(TranscendentalCache::COS,
3516 TranscendentalCacheStub::TAGGED);
3517 ZoneList<Expression*>* args = expr->arguments();
3518 ASSERT(args->length() == 1);
3519 VisitForStackValue(args->at(0));
3520 __ CallStub(&stub);
3521 context()->Plug(x0);
3522 }
3523
3524
3525 void FullCodeGenerator::EmitMathTan(CallRuntime* expr) {
3526 // Load the argument on the stack and call the stub.
3527 TranscendentalCacheStub stub(TranscendentalCache::TAN,
3528 TranscendentalCacheStub::TAGGED);
3529 ZoneList<Expression*>* args = expr->arguments();
3530 ASSERT(args->length() == 1);
3531 VisitForStackValue(args->at(0));
3532 __ CallStub(&stub);
3533 context()->Plug(x0);
3534 }
3535
3536
3537 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) { 3528 void FullCodeGenerator::EmitMathLog(CallRuntime* expr) {
3538 // Load the argument on the stack and call the stub. 3529 // Load the argument on the stack and call the stub.
3539 TranscendentalCacheStub stub(TranscendentalCache::LOG, 3530 TranscendentalCacheStub stub(TranscendentalCache::LOG,
3540 TranscendentalCacheStub::TAGGED); 3531 TranscendentalCacheStub::TAGGED);
3541 ZoneList<Expression*>* args = expr->arguments(); 3532 ZoneList<Expression*>* args = expr->arguments();
3542 ASSERT(args->length() == 1); 3533 ASSERT(args->length() == 1);
3543 VisitForStackValue(args->at(0)); 3534 VisitForStackValue(args->at(0));
3544 __ CallStub(&stub); 3535 __ CallStub(&stub);
3545 context()->Plug(x0); 3536 context()->Plug(x0);
3546 } 3537 }
(...skipping 1541 matching lines...) Expand 10 before | Expand all | Expand 10 after
5088 return previous_; 5079 return previous_;
5089 } 5080 }
5090 5081
5091 5082
5092 #undef __ 5083 #undef __
5093 5084
5094 5085
5095 } } // namespace v8::internal 5086 } } // namespace v8::internal
5096 5087
5097 #endif // V8_TARGET_ARCH_A64 5088 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/deoptimizer-a64.cc ('k') | src/a64/ic-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698