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

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

Issue 1250733005: SIMD.js Add the other SIMD Phase 1 types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Make _IsSimdObject an assembly intrinsic in fullcodegen. Created 5 years, 4 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3098 matching lines...) Expand 10 before | Expand all | Expand 10 after
3109 3109
3110 __ JumpIfSmi(x0, if_false); 3110 __ JumpIfSmi(x0, if_false);
3111 __ CompareObjectType(x0, x10, x11, FIRST_SPEC_OBJECT_TYPE); 3111 __ CompareObjectType(x0, x10, x11, FIRST_SPEC_OBJECT_TYPE);
3112 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3112 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3113 Split(ge, if_true, if_false, fall_through); 3113 Split(ge, if_true, if_false, fall_through);
3114 3114
3115 context()->Plug(if_true, if_false); 3115 context()->Plug(if_true, if_false);
3116 } 3116 }
3117 3117
3118 3118
3119 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) {
3120 ZoneList<Expression*>* args = expr->arguments();
3121 DCHECK(args->length() == 1);
3122
3123 VisitForAccumulatorValue(args->at(0));
3124
3125 Label materialize_true, materialize_false;
3126 Label* if_true = NULL;
3127 Label* if_false = NULL;
3128 Label* fall_through = NULL;
3129 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3130 &if_false, &fall_through);
3131
3132 __ JumpIfSmi(x0, if_false);
3133 Register map = x10;
3134 Register type_reg = x11;
3135 __ Ldr(map, FieldMemOperand(x0, HeapObject::kMapOffset));
3136 __ Ldrb(type_reg, FieldMemOperand(map, Map::kInstanceTypeOffset));
3137 __ Sub(type_reg, type_reg, Operand(FIRST_SIMD_VALUE_TYPE));
3138 __ Cmp(type_reg, Operand(LAST_SIMD_VALUE_TYPE - FIRST_SIMD_VALUE_TYPE));
3139 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3140 Split(ls, if_true, if_false, fall_through);
3141
3142 context()->Plug(if_true, if_false);
3143 }
3144
3145
3119 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { 3146 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
3120 ASM_LOCATION("FullCodeGenerator::EmitIsUndetectableObject"); 3147 ASM_LOCATION("FullCodeGenerator::EmitIsUndetectableObject");
3121 ZoneList<Expression*>* args = expr->arguments(); 3148 ZoneList<Expression*>* args = expr->arguments();
3122 DCHECK(args->length() == 1); 3149 DCHECK(args->length() == 1);
3123 3150
3124 VisitForAccumulatorValue(args->at(0)); 3151 VisitForAccumulatorValue(args->at(0));
3125 3152
3126 Label materialize_true, materialize_false; 3153 Label materialize_true, materialize_false;
3127 Label* if_true = NULL; 3154 Label* if_true = NULL;
3128 Label* if_false = NULL; 3155 Label* if_false = NULL;
(...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after
4748 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof symbol_string"); 4775 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof symbol_string");
4749 __ JumpIfSmi(x0, if_false); 4776 __ JumpIfSmi(x0, if_false);
4750 __ CompareObjectType(x0, x0, x1, SYMBOL_TYPE); 4777 __ CompareObjectType(x0, x0, x1, SYMBOL_TYPE);
4751 Split(eq, if_true, if_false, fall_through); 4778 Split(eq, if_true, if_false, fall_through);
4752 } else if (String::Equals(check, factory->float32x4_string())) { 4779 } else if (String::Equals(check, factory->float32x4_string())) {
4753 ASM_LOCATION( 4780 ASM_LOCATION(
4754 "FullCodeGenerator::EmitLiteralCompareTypeof float32x4_string"); 4781 "FullCodeGenerator::EmitLiteralCompareTypeof float32x4_string");
4755 __ JumpIfSmi(x0, if_false); 4782 __ JumpIfSmi(x0, if_false);
4756 __ CompareObjectType(x0, x0, x1, FLOAT32X4_TYPE); 4783 __ CompareObjectType(x0, x0, x1, FLOAT32X4_TYPE);
4757 Split(eq, if_true, if_false, fall_through); 4784 Split(eq, if_true, if_false, fall_through);
4785 } else if (String::Equals(check, factory->int32x4_string())) {
4786 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof int32x4_string");
4787 __ JumpIfSmi(x0, if_false);
4788 __ CompareObjectType(x0, x0, x1, INT32X4_TYPE);
4789 Split(eq, if_true, if_false, fall_through);
4790 } else if (String::Equals(check, factory->bool32x4_string())) {
4791 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof bool32x4_string");
4792 __ JumpIfSmi(x0, if_false);
4793 __ CompareObjectType(x0, x0, x1, BOOL32X4_TYPE);
4794 Split(eq, if_true, if_false, fall_through);
4795 } else if (String::Equals(check, factory->int16x8_string())) {
4796 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof int16x8_string");
4797 __ JumpIfSmi(x0, if_false);
4798 __ CompareObjectType(x0, x0, x1, INT16X8_TYPE);
4799 Split(eq, if_true, if_false, fall_through);
4800 } else if (String::Equals(check, factory->bool16x8_string())) {
4801 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof bool16x8_string");
4802 __ JumpIfSmi(x0, if_false);
4803 __ CompareObjectType(x0, x0, x1, BOOL16X8_TYPE);
4804 Split(eq, if_true, if_false, fall_through);
4805 } else if (String::Equals(check, factory->int8x16_string())) {
4806 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof int8x16_string");
4807 __ JumpIfSmi(x0, if_false);
4808 __ CompareObjectType(x0, x0, x1, INT8X16_TYPE);
4809 Split(eq, if_true, if_false, fall_through);
4810 } else if (String::Equals(check, factory->bool8x16_string())) {
4811 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof bool8x16_string");
4812 __ JumpIfSmi(x0, if_false);
4813 __ CompareObjectType(x0, x0, x1, BOOL8X16_TYPE);
4814 Split(eq, if_true, if_false, fall_through);
4758 } else if (String::Equals(check, factory->boolean_string())) { 4815 } else if (String::Equals(check, factory->boolean_string())) {
4759 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof boolean_string"); 4816 ASM_LOCATION("FullCodeGenerator::EmitLiteralCompareTypeof boolean_string");
4760 __ JumpIfRoot(x0, Heap::kTrueValueRootIndex, if_true); 4817 __ JumpIfRoot(x0, Heap::kTrueValueRootIndex, if_true);
4761 __ CompareRoot(x0, Heap::kFalseValueRootIndex); 4818 __ CompareRoot(x0, Heap::kFalseValueRootIndex);
4762 Split(eq, if_true, if_false, fall_through); 4819 Split(eq, if_true, if_false, fall_through);
4763 } else if (String::Equals(check, factory->undefined_string())) { 4820 } else if (String::Equals(check, factory->undefined_string())) {
4764 ASM_LOCATION( 4821 ASM_LOCATION(
4765 "FullCodeGenerator::EmitLiteralCompareTypeof undefined_string"); 4822 "FullCodeGenerator::EmitLiteralCompareTypeof undefined_string");
4766 __ JumpIfRoot(x0, Heap::kUndefinedValueRootIndex, if_true); 4823 __ JumpIfRoot(x0, Heap::kUndefinedValueRootIndex, if_true);
4767 __ JumpIfSmi(x0, if_false); 4824 __ JumpIfSmi(x0, if_false);
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
5436 } 5493 }
5437 5494
5438 return INTERRUPT; 5495 return INTERRUPT;
5439 } 5496 }
5440 5497
5441 5498
5442 } // namespace internal 5499 } // namespace internal
5443 } // namespace v8 5500 } // namespace v8
5444 5501
5445 #endif // V8_TARGET_ARCH_ARM64 5502 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698