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

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

Issue 1160443009: Add SIMD.Float32x4 functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tests working. Created 5 years, 5 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/full-codegen-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 2146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2157 __ jmp(instr->FalseLabel(chunk_)); 2157 __ jmp(instr->FalseLabel(chunk_));
2158 __ bind(&not_string); 2158 __ bind(&not_string);
2159 } 2159 }
2160 2160
2161 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2161 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2162 // Symbol value -> true. 2162 // Symbol value -> true.
2163 __ CmpInstanceType(map, SYMBOL_TYPE); 2163 __ CmpInstanceType(map, SYMBOL_TYPE);
2164 __ j(equal, instr->TrueLabel(chunk_)); 2164 __ j(equal, instr->TrueLabel(chunk_));
2165 } 2165 }
2166 2166
2167 if (expected.Contains(ToBooleanStub::SIMD_TYPE)) {
2168 // SIMD value -> true.
2169 __ CmpInstanceType(map, FLOAT32X4_TYPE);
2170 __ j(equal, instr->TrueLabel(chunk_));
2171 }
2172
2167 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2173 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2168 // heap number -> false iff +0, -0, or NaN. 2174 // heap number -> false iff +0, -0, or NaN.
2169 Label not_heap_number; 2175 Label not_heap_number;
2170 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 2176 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
2171 factory()->heap_number_map()); 2177 factory()->heap_number_map());
2172 __ j(not_equal, &not_heap_number, Label::kNear); 2178 __ j(not_equal, &not_heap_number, Label::kNear);
2173 XMMRegister xmm_scratch = double_scratch0(); 2179 XMMRegister xmm_scratch = double_scratch0();
2174 __ xorps(xmm_scratch, xmm_scratch); 2180 __ xorps(xmm_scratch, xmm_scratch);
2175 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset)); 2181 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset));
2176 __ j(zero, instr->FalseLabel(chunk_)); 2182 __ j(zero, instr->FalseLabel(chunk_));
(...skipping 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after
5478 __ j(equal, true_label, true_distance); 5484 __ j(equal, true_label, true_distance);
5479 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); 5485 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input);
5480 __ j(below, false_label, false_distance); 5486 __ j(below, false_label, false_distance);
5481 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 5487 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
5482 __ j(above, false_label, false_distance); 5488 __ j(above, false_label, false_distance);
5483 // Check for undetectable objects => false. 5489 // Check for undetectable objects => false.
5484 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5490 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5485 1 << Map::kIsUndetectable); 5491 1 << Map::kIsUndetectable);
5486 final_branch_condition = zero; 5492 final_branch_condition = zero;
5487 5493
5494 } else if (String::Equals(type_name, factory()->float32x4_string())) {
5495 __ JumpIfSmi(input, false_label, false_distance);
5496 __ CmpObjectType(input, FLOAT32X4_TYPE, input);
5497 final_branch_condition = equal;
5498
5488 } else { 5499 } else {
5489 __ jmp(false_label, false_distance); 5500 __ jmp(false_label, false_distance);
5490 } 5501 }
5491 return final_branch_condition; 5502 return final_branch_condition;
5492 } 5503 }
5493 5504
5494 5505
5495 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 5506 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5496 Register temp = ToRegister(instr->temp()); 5507 Register temp = ToRegister(instr->temp());
5497 5508
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
5783 RecordSafepoint(Safepoint::kNoLazyDeopt); 5794 RecordSafepoint(Safepoint::kNoLazyDeopt);
5784 } 5795 }
5785 5796
5786 5797
5787 #undef __ 5798 #undef __
5788 5799
5789 } // namespace internal 5800 } // namespace internal
5790 } // namespace v8 5801 } // namespace v8
5791 5802
5792 #endif // V8_TARGET_ARCH_IA32 5803 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | src/ic/handler-compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698