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

Side by Side Diff: src/ia32/lithium-codegen-ia32.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: Don't run downloaded SIMD value type tests. 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
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/handler-compiler.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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 2152 matching lines...) Expand 10 before | Expand all | Expand 10 after
2163 } 2163 }
2164 2164
2165 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2165 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2166 // Symbol value -> true. 2166 // Symbol value -> true.
2167 __ CmpInstanceType(map, SYMBOL_TYPE); 2167 __ CmpInstanceType(map, SYMBOL_TYPE);
2168 __ j(equal, instr->TrueLabel(chunk_)); 2168 __ j(equal, instr->TrueLabel(chunk_));
2169 } 2169 }
2170 2170
2171 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { 2171 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2172 // SIMD value -> true. 2172 // SIMD value -> true.
2173 __ CmpInstanceType(map, FLOAT32X4_TYPE); 2173 Label not_simd;
2174 __ j(equal, instr->TrueLabel(chunk_)); 2174 __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
2175 __ j(less, &not_simd, Label::kNear);
2176 __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
2177 __ j(less_equal, instr->TrueLabel(chunk_));
2178 __ bind(&not_simd);
2175 } 2179 }
2176 2180
2177 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2181 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2178 // heap number -> false iff +0, -0, or NaN. 2182 // heap number -> false iff +0, -0, or NaN.
2179 Label not_heap_number; 2183 Label not_heap_number;
2180 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 2184 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
2181 factory()->heap_number_map()); 2185 factory()->heap_number_map());
2182 __ j(not_equal, &not_heap_number, Label::kNear); 2186 __ j(not_equal, &not_heap_number, Label::kNear);
2183 XMMRegister xmm_scratch = double_scratch0(); 2187 XMMRegister xmm_scratch = double_scratch0();
2184 __ xorps(xmm_scratch, xmm_scratch); 2188 __ xorps(xmm_scratch, xmm_scratch);
(...skipping 3352 matching lines...) Expand 10 before | Expand all | Expand 10 after
5537 // Check for undetectable objects => false. 5541 // Check for undetectable objects => false.
5538 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5542 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5539 1 << Map::kIsUndetectable); 5543 1 << Map::kIsUndetectable);
5540 final_branch_condition = zero; 5544 final_branch_condition = zero;
5541 5545
5542 } else if (String::Equals(type_name, factory()->float32x4_string())) { 5546 } else if (String::Equals(type_name, factory()->float32x4_string())) {
5543 __ JumpIfSmi(input, false_label, false_distance); 5547 __ JumpIfSmi(input, false_label, false_distance);
5544 __ CmpObjectType(input, FLOAT32X4_TYPE, input); 5548 __ CmpObjectType(input, FLOAT32X4_TYPE, input);
5545 final_branch_condition = equal; 5549 final_branch_condition = equal;
5546 5550
5551 } else if (String::Equals(type_name, factory()->int32x4_string())) {
5552 __ JumpIfSmi(input, false_label, false_distance);
5553 __ CmpObjectType(input, INT32X4_TYPE, input);
5554 final_branch_condition = equal;
5555
5556 } else if (String::Equals(type_name, factory()->bool32x4_string())) {
5557 __ JumpIfSmi(input, false_label, false_distance);
5558 __ CmpObjectType(input, BOOL32X4_TYPE, input);
5559 final_branch_condition = equal;
5560
5561 } else if (String::Equals(type_name, factory()->int16x8_string())) {
5562 __ JumpIfSmi(input, false_label, false_distance);
5563 __ CmpObjectType(input, INT16X8_TYPE, input);
5564 final_branch_condition = equal;
5565
5566 } else if (String::Equals(type_name, factory()->bool16x8_string())) {
5567 __ JumpIfSmi(input, false_label, false_distance);
5568 __ CmpObjectType(input, BOOL16X8_TYPE, input);
5569 final_branch_condition = equal;
5570
5571 } else if (String::Equals(type_name, factory()->int8x16_string())) {
5572 __ JumpIfSmi(input, false_label, false_distance);
5573 __ CmpObjectType(input, INT8X16_TYPE, input);
5574 final_branch_condition = equal;
5575
5576 } else if (String::Equals(type_name, factory()->bool8x16_string())) {
5577 __ JumpIfSmi(input, false_label, false_distance);
5578 __ CmpObjectType(input, BOOL8X16_TYPE, input);
5579 final_branch_condition = equal;
5580
5547 } else { 5581 } else {
5548 __ jmp(false_label, false_distance); 5582 __ jmp(false_label, false_distance);
5549 } 5583 }
5550 return final_branch_condition; 5584 return final_branch_condition;
5551 } 5585 }
5552 5586
5553 5587
5554 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 5588 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5555 Register temp = ToRegister(instr->temp()); 5589 Register temp = ToRegister(instr->temp());
5556 5590
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
5842 RecordSafepoint(Safepoint::kNoLazyDeopt); 5876 RecordSafepoint(Safepoint::kNoLazyDeopt);
5843 } 5877 }
5844 5878
5845 5879
5846 #undef __ 5880 #undef __
5847 5881
5848 } // namespace internal 5882 } // namespace internal
5849 } // namespace v8 5883 } // namespace v8
5850 5884
5851 #endif // V8_TARGET_ARCH_IA32 5885 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698