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

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

Issue 2695653005: Revert of Remove SIMD.js from V8. (Closed)
Patch Set: 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/hydrogen-instructions.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.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_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/crankshaft/ia32/lithium-codegen-ia32.h" 7 #include "src/crankshaft/ia32/lithium-codegen-ia32.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 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after
1920 __ jmp(instr->FalseLabel(chunk_)); 1920 __ jmp(instr->FalseLabel(chunk_));
1921 __ bind(&not_string); 1921 __ bind(&not_string);
1922 } 1922 }
1923 1923
1924 if (expected & ToBooleanHint::kSymbol) { 1924 if (expected & ToBooleanHint::kSymbol) {
1925 // Symbol value -> true. 1925 // Symbol value -> true.
1926 __ CmpInstanceType(map, SYMBOL_TYPE); 1926 __ CmpInstanceType(map, SYMBOL_TYPE);
1927 __ j(equal, instr->TrueLabel(chunk_)); 1927 __ j(equal, instr->TrueLabel(chunk_));
1928 } 1928 }
1929 1929
1930 if (expected & ToBooleanHint::kSimdValue) {
1931 // SIMD value -> true.
1932 __ CmpInstanceType(map, SIMD128_VALUE_TYPE);
1933 __ j(equal, instr->TrueLabel(chunk_));
1934 }
1935
1930 if (expected & ToBooleanHint::kHeapNumber) { 1936 if (expected & ToBooleanHint::kHeapNumber) {
1931 // heap number -> false iff +0, -0, or NaN. 1937 // heap number -> false iff +0, -0, or NaN.
1932 Label not_heap_number; 1938 Label not_heap_number;
1933 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 1939 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
1934 factory()->heap_number_map()); 1940 factory()->heap_number_map());
1935 __ j(not_equal, &not_heap_number, Label::kNear); 1941 __ j(not_equal, &not_heap_number, Label::kNear);
1936 XMMRegister xmm_scratch = double_scratch0(); 1942 XMMRegister xmm_scratch = double_scratch0();
1937 __ xorps(xmm_scratch, xmm_scratch); 1943 __ xorps(xmm_scratch, xmm_scratch);
1938 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset)); 1944 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset));
1939 __ j(zero, instr->FalseLabel(chunk_)); 1945 __ j(zero, instr->FalseLabel(chunk_));
(...skipping 2960 matching lines...) Expand 10 before | Expand all | Expand 10 after
4900 __ JumpIfSmi(input, false_label, false_distance); 4906 __ JumpIfSmi(input, false_label, false_distance);
4901 __ cmp(input, factory()->null_value()); 4907 __ cmp(input, factory()->null_value());
4902 __ j(equal, true_label, true_distance); 4908 __ j(equal, true_label, true_distance);
4903 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 4909 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
4904 __ CmpObjectType(input, FIRST_JS_RECEIVER_TYPE, input); 4910 __ CmpObjectType(input, FIRST_JS_RECEIVER_TYPE, input);
4905 __ j(below, false_label, false_distance); 4911 __ j(below, false_label, false_distance);
4906 // Check for callable or undetectable objects => false. 4912 // Check for callable or undetectable objects => false.
4907 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 4913 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
4908 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); 4914 Immediate((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
4909 final_branch_condition = zero; 4915 final_branch_condition = zero;
4916
4917 // clang-format off
4918 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
4919 } else if (String::Equals(type_name, factory()->type##_string())) { \
4920 __ JumpIfSmi(input, false_label, false_distance); \
4921 __ cmp(FieldOperand(input, HeapObject::kMapOffset), \
4922 factory()->type##_map()); \
4923 final_branch_condition = equal;
4924 SIMD128_TYPES(SIMD128_TYPE)
4925 #undef SIMD128_TYPE
4926 // clang-format on
4927
4910 } else { 4928 } else {
4911 __ jmp(false_label, false_distance); 4929 __ jmp(false_label, false_distance);
4912 } 4930 }
4913 return final_branch_condition; 4931 return final_branch_condition;
4914 } 4932 }
4915 4933
4916 4934
4917 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 4935 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
4918 if (info()->ShouldEnsureSpaceForLazyDeopt()) { 4936 if (info()->ShouldEnsureSpaceForLazyDeopt()) {
4919 // Ensure that we have enough space after the previous lazy-bailout 4937 // Ensure that we have enough space after the previous lazy-bailout
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
5153 __ bind(deferred->exit()); 5171 __ bind(deferred->exit());
5154 __ bind(&done); 5172 __ bind(&done);
5155 } 5173 }
5156 5174
5157 #undef __ 5175 #undef __
5158 5176
5159 } // namespace internal 5177 } // namespace internal
5160 } // namespace v8 5178 } // namespace v8
5161 5179
5162 #endif // V8_TARGET_ARCH_IA32 5180 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | src/crankshaft/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698