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

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

Issue 2692933002: 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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license that can be 3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file. 4 // found in the LICENSE file.
5 5
6 #include "src/crankshaft/s390/lithium-codegen-s390.h" 6 #include "src/crankshaft/s390/lithium-codegen-s390.h"
7 7
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/builtins/builtins-constructor.h" 9 #include "src/builtins/builtins-constructor.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2186 __ b(instr->FalseLabel(chunk_)); 2186 __ b(instr->FalseLabel(chunk_));
2187 __ bind(&not_string); 2187 __ bind(&not_string);
2188 } 2188 }
2189 2189
2190 if (expected & ToBooleanHint::kSymbol) { 2190 if (expected & ToBooleanHint::kSymbol) {
2191 // Symbol value -> true. 2191 // Symbol value -> true.
2192 __ CompareInstanceType(map, ip, SYMBOL_TYPE); 2192 __ CompareInstanceType(map, ip, SYMBOL_TYPE);
2193 __ beq(instr->TrueLabel(chunk_)); 2193 __ beq(instr->TrueLabel(chunk_));
2194 } 2194 }
2195 2195
2196 if (expected & ToBooleanHint::kSimdValue) {
2197 // SIMD value -> true.
2198 Label not_simd;
2199 __ CompareInstanceType(map, ip, SIMD128_VALUE_TYPE);
2200 __ beq(instr->TrueLabel(chunk_));
2201 }
2202
2196 if (expected & ToBooleanHint::kHeapNumber) { 2203 if (expected & ToBooleanHint::kHeapNumber) {
2197 // heap number -> false iff +0, -0, or NaN. 2204 // heap number -> false iff +0, -0, or NaN.
2198 Label not_heap_number; 2205 Label not_heap_number;
2199 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); 2206 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex);
2200 __ bne(&not_heap_number, Label::kNear); 2207 __ bne(&not_heap_number, Label::kNear);
2201 __ LoadDouble(dbl_scratch, 2208 __ LoadDouble(dbl_scratch,
2202 FieldMemOperand(reg, HeapNumber::kValueOffset)); 2209 FieldMemOperand(reg, HeapNumber::kValueOffset));
2203 __ lzdr(kDoubleRegZero); 2210 __ lzdr(kDoubleRegZero);
2204 __ cdbr(dbl_scratch, kDoubleRegZero); 2211 __ cdbr(dbl_scratch, kDoubleRegZero);
2205 __ bunordered(instr->FalseLabel(chunk_)); // NaN -> false. 2212 __ bunordered(instr->FalseLabel(chunk_)); // NaN -> false.
(...skipping 3139 matching lines...) Expand 10 before | Expand all | Expand 10 after
5345 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE); 5352 STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
5346 __ CompareObjectType(input, scratch, ip, FIRST_JS_RECEIVER_TYPE); 5353 __ CompareObjectType(input, scratch, ip, FIRST_JS_RECEIVER_TYPE);
5347 __ blt(false_label); 5354 __ blt(false_label);
5348 // Check for callable or undetectable objects => false. 5355 // Check for callable or undetectable objects => false.
5349 __ LoadlB(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset)); 5356 __ LoadlB(scratch, FieldMemOperand(scratch, Map::kBitFieldOffset));
5350 __ AndP(r0, scratch, 5357 __ AndP(r0, scratch,
5351 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable))); 5358 Operand((1 << Map::kIsCallable) | (1 << Map::kIsUndetectable)));
5352 __ CmpP(r0, Operand::Zero()); 5359 __ CmpP(r0, Operand::Zero());
5353 final_branch_condition = eq; 5360 final_branch_condition = eq;
5354 5361
5362 // clang-format off
5363 #define SIMD128_TYPE(TYPE, Type, type, lane_count, lane_type) \
5364 } else if (String::Equals(type_name, factory->type##_string())) { \
5365 __ JumpIfSmi(input, false_label); \
5366 __ LoadP(scratch, FieldMemOperand(input, HeapObject::kMapOffset)); \
5367 __ CompareRoot(scratch, Heap::k##Type##MapRootIndex); \
5368 final_branch_condition = eq;
5369 SIMD128_TYPES(SIMD128_TYPE)
5370 #undef SIMD128_TYPE
5371 // clang-format on
5372
5355 } else { 5373 } else {
5356 __ b(false_label); 5374 __ b(false_label);
5357 } 5375 }
5358 5376
5359 return final_branch_condition; 5377 return final_branch_condition;
5360 } 5378 }
5361 5379
5362 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) { 5380 void LCodeGen::EnsureSpaceForLazyDeopt(int space_needed) {
5363 if (info()->ShouldEnsureSpaceForLazyDeopt()) { 5381 if (info()->ShouldEnsureSpaceForLazyDeopt()) {
5364 // Ensure that we have enough space after the previous lazy-bailout 5382 // Ensure that we have enough space after the previous lazy-bailout
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
5581 __ LoadP(result, 5599 __ LoadP(result,
5582 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize)); 5600 FieldMemOperand(scratch, FixedArray::kHeaderSize - kPointerSize));
5583 __ bind(deferred->exit()); 5601 __ bind(deferred->exit());
5584 __ bind(&done); 5602 __ bind(&done);
5585 } 5603 }
5586 5604
5587 #undef __ 5605 #undef __
5588 5606
5589 } // namespace internal 5607 } // namespace internal
5590 } // namespace v8 5608 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698