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

Side by Side Diff: src/crankshaft/arm/lithium-codegen-arm.cc

Issue 2684313003: Remove SIMD.js from V8. (Closed)
Patch Set: Rebase. Created 3 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
« no previous file with comments | « src/contexts.h ('k') | src/crankshaft/arm64/lithium-codegen-arm64.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 // 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/crankshaft/arm/lithium-codegen-arm.h" 5 #include "src/crankshaft/arm/lithium-codegen-arm.h"
6 6
7 #include "src/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/builtins/builtins-constructor.h" 8 #include "src/builtins/builtins-constructor.h"
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 2112 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 __ b(instr->FalseLabel(chunk_)); 2123 __ b(instr->FalseLabel(chunk_));
2124 __ bind(&not_string); 2124 __ bind(&not_string);
2125 } 2125 }
2126 2126
2127 if (expected & ToBooleanHint::kSymbol) { 2127 if (expected & ToBooleanHint::kSymbol) {
2128 // Symbol value -> true. 2128 // Symbol value -> true.
2129 __ CompareInstanceType(map, ip, SYMBOL_TYPE); 2129 __ CompareInstanceType(map, ip, SYMBOL_TYPE);
2130 __ b(eq, instr->TrueLabel(chunk_)); 2130 __ b(eq, instr->TrueLabel(chunk_));
2131 } 2131 }
2132 2132
2133 if (expected & ToBooleanHint::kSimdValue) {
2134 // SIMD value -> true.
2135 __ CompareInstanceType(map, ip, SIMD128_VALUE_TYPE);
2136 __ b(eq, instr->TrueLabel(chunk_));
2137 }
2138
2139 if (expected & ToBooleanHint::kHeapNumber) { 2133 if (expected & ToBooleanHint::kHeapNumber) {
2140 // heap number -> false iff +0, -0, or NaN. 2134 // heap number -> false iff +0, -0, or NaN.
2141 DwVfpRegister dbl_scratch = double_scratch0(); 2135 DwVfpRegister dbl_scratch = double_scratch0();
2142 Label not_heap_number; 2136 Label not_heap_number;
2143 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); 2137 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex);
2144 __ b(ne, &not_heap_number); 2138 __ b(ne, &not_heap_number);
2145 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); 2139 __ vldr(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset));
2146 __ VFPCompareAndSetFlags(dbl_scratch, 0.0); 2140 __ VFPCompareAndSetFlags(dbl_scratch, 0.0);
2147 __ cmp(r0, r0, vs); // NaN -> false. 2141 __ cmp(r0, r0, vs); // NaN -> false.
2148 __ b(eq, instr->FalseLabel(chunk_)); // +0, -0 -> false. 2142 __ b(eq, instr->FalseLabel(chunk_)); // +0, -0 -> false.
(...skipping 2980 matching lines...) Expand 10 before | Expand all | Expand 10 after
5129 __ b(eq, true_label); 5123 __ b(eq, true_label);
5130 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 5124 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
5131 __ CompareObjectType(input, scratch, ip, FIRST_JS_RECEIVER_TYPE); 5125 __ CompareObjectType(input, scratch, ip, FIRST_JS_RECEIVER_TYPE);
5132 __ b(lt, false_label); 5126 __ b(lt, false_label);
5133 // Check for callable or undetectable objects => false. 5127 // Check for callable or undetectable objects => false.
5134 __ ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset)); 5128 __ ldrb(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset));
5135 __ tst(scratch, 5129 __ tst(scratch,
5136 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); 5130 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
5137 final_branch_condition = eq; 5131 final_branch_condition = eq;
5138 5132
5139 // clang-format off
5140 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
5141 } else if (String::Equals(type_name, factory->type##_string())) { \
5142 __ JumpIfSmi(input, false_label); \
5143 __ ldr(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); \
5144 __ CompareRoot(scratch, Heap::k##Type##MapRootIndex); \
5145 final_branch_condition = eq;
5146 SIMD128_TYPES(SIMD128_TYPE)
5147 #undef SIMD128_TYPE
5148 // clang-format on
5149
5150 } else { 5133 } else {
5151 __ b(false_label); 5134 __ b(false_label);
5152 } 5135 }
5153 5136
5154 return final_branch_condition; 5137 return final_branch_condition;
5155 } 5138 }
5156 5139
5157 5140
5158 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 5141 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
5159 if (info()->ShouldEnsureSpaceForLazyDeopt()) { 5142 if (info()->ShouldEnsureSpaceForLazyDeopt()) {
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
5402 __ ldr(result, FieldMemOperand(scratch, 5385 __ ldr(result, FieldMemOperand(scratch,
5403 FixedArray::kHeaderSize - kPointerSize)); 5386 FixedArray::kHeaderSize - kPointerSize));
5404 __ bind(deferred->exit()); 5387 __ bind(deferred->exit());
5405 __ bind(&done); 5388 __ bind(&done);
5406 } 5389 }
5407 5390
5408 #undef __ 5391 #undef __
5409 5392
5410 } // namespace internal 5393 } // namespace internal
5411 } // namespace v8 5394 } // namespace v8
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/crankshaft/arm64/lithium-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698