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

Side by Side Diff: src/crankshaft/x87/lithium-codegen-x87.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/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/deoptimizer.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 #if V8_TARGET_ARCH_X87 5 #if V8_TARGET_ARCH_X87
6 6
7 #include "src/crankshaft/x87/lithium-codegen-x87.h" 7 #include "src/crankshaft/x87/lithium-codegen-x87.h"
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/builtins/builtins-constructor.h" 10 #include "src/builtins/builtins-constructor.h"
(...skipping 2180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2191 __ jmp(instr->FalseLabel(chunk_)); 2191 __ jmp(instr->FalseLabel(chunk_));
2192 __ bind(&not_string); 2192 __ bind(&not_string);
2193 } 2193 }
2194 2194
2195 if (expected & ToBooleanHint::kSymbol) { 2195 if (expected & ToBooleanHint::kSymbol) {
2196 // Symbol value -> true. 2196 // Symbol value -> true.
2197 __ CmpInstanceType(map, SYMBOL_TYPE); 2197 __ CmpInstanceType(map, SYMBOL_TYPE);
2198 __ j(equal, instr->TrueLabel(chunk_)); 2198 __ j(equal, instr->TrueLabel(chunk_));
2199 } 2199 }
2200 2200
2201 if (expected & ToBooleanHint::kSimdValue) {
2202 // SIMD value -> true.
2203 __ CmpInstanceType(map, SIMD128_VALUE_TYPE);
2204 __ j(equal, instr->TrueLabel(chunk_));
2205 }
2206
2207 if (expected & ToBooleanHint::kHeapNumber) { 2201 if (expected & ToBooleanHint::kHeapNumber) {
2208 // heap number -> false iff +0, -0, or NaN. 2202 // heap number -> false iff +0, -0, or NaN.
2209 Label not_heap_number; 2203 Label not_heap_number;
2210 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 2204 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
2211 factory()->heap_number_map()); 2205 factory()->heap_number_map());
2212 __ j(not_equal, &not_heap_number, Label::kNear); 2206 __ j(not_equal, &not_heap_number, Label::kNear);
2213 __ fldz(); 2207 __ fldz();
2214 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset)); 2208 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset));
2215 __ FCmp(); 2209 __ FCmp();
2216 __ j(zero, instr->FalseLabel(chunk_)); 2210 __ j(zero, instr->FalseLabel(chunk_));
(...skipping 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
5399 __ cmp(input, factory()->null_value()); 5393 __ cmp(input, factory()->null_value());
5400 __ j(equal, true_label, true_distance); 5394 __ j(equal, true_label, true_distance);
5401 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 5395 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
5402 __ CmpObjectType(input, FIRST_JS_RECEIVER_TYPE, input); 5396 __ CmpObjectType(input, FIRST_JS_RECEIVER_TYPE, input);
5403 __ j(below, false_label, false_distance); 5397 __ j(below, false_label, false_distance);
5404 // Check for callable or undetectable objects => false. 5398 // Check for callable or undetectable objects => false.
5405 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5399 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5406 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); 5400 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
5407 final_branch_condition = zero; 5401 final_branch_condition = zero;
5408 5402
5409 // clang-format off
5410 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
5411 } else if (String::Equals(type_name, factory()->type##_string())) { \
5412 __ JumpIfSmi(input, false_label, false_distance); \
5413 __ cmp(FieldOperand(input, HeapObject::kMapOffset), \
5414 factory()->type##_map()); \
5415 final_branch_condition = equal;
5416 SIMD128_TYPES(SIMD128_TYPE)
5417 #undef SIMD128_TYPE
5418 // clang-format on
5419
5420 } else { 5403 } else {
5421 __ jmp(false_label, false_distance); 5404 __ jmp(false_label, false_distance);
5422 } 5405 }
5423 return final_branch_condition; 5406 return final_branch_condition;
5424 } 5407 }
5425 5408
5426 5409
5427 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 5410 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
5428 if (info()->ShouldEnsureSpaceForLazyDeopt()) { 5411 if (info()->ShouldEnsureSpaceForLazyDeopt()) {
5429 // Ensure that we have enough space after the previous lazy-bailout 5412 // Ensure that we have enough space after the previous lazy-bailout
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
5666 __ bind(deferred->exit()); 5649 __ bind(deferred->exit());
5667 __ bind(&done); 5650 __ bind(&done);
5668 } 5651 }
5669 5652
5670 #undef __ 5653 #undef __
5671 5654
5672 } // namespace internal 5655 } // namespace internal
5673 } // namespace v8 5656 } // namespace v8
5674 5657
5675 #endif // V8_TARGET_ARCH_X87 5658 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/crankshaft/x64/lithium-codegen-x64.cc ('k') | src/deoptimizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698