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

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

Issue 1241533004: Revert of Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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_VALUE)) {
2168 // SIMD value -> true.
2169 __ CmpInstanceType(map, FLOAT32X4_TYPE);
2170 __ j(equal, instr->TrueLabel(chunk_));
2171 }
2172
2173 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2167 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2174 // heap number -> false iff +0, -0, or NaN. 2168 // heap number -> false iff +0, -0, or NaN.
2175 Label not_heap_number; 2169 Label not_heap_number;
2176 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 2170 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
2177 factory()->heap_number_map()); 2171 factory()->heap_number_map());
2178 __ j(not_equal, &not_heap_number, Label::kNear); 2172 __ j(not_equal, &not_heap_number, Label::kNear);
2179 XMMRegister xmm_scratch = double_scratch0(); 2173 XMMRegister xmm_scratch = double_scratch0();
2180 __ xorps(xmm_scratch, xmm_scratch); 2174 __ xorps(xmm_scratch, xmm_scratch);
2181 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset)); 2175 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset));
2182 __ j(zero, instr->FalseLabel(chunk_)); 2176 __ j(zero, instr->FalseLabel(chunk_));
(...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after
5509 __ j(equal, true_label, true_distance); 5503 __ j(equal, true_label, true_distance);
5510 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); 5504 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input);
5511 __ j(below, false_label, false_distance); 5505 __ j(below, false_label, false_distance);
5512 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 5506 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
5513 __ j(above, false_label, false_distance); 5507 __ j(above, false_label, false_distance);
5514 // Check for undetectable objects => false. 5508 // Check for undetectable objects => false.
5515 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 5509 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
5516 1 << Map::kIsUndetectable); 5510 1 << Map::kIsUndetectable);
5517 final_branch_condition = zero; 5511 final_branch_condition = zero;
5518 5512
5519 } else if (String::Equals(type_name, factory()->float32x4_string())) {
5520 __ JumpIfSmi(input, false_label, false_distance);
5521 __ CmpObjectType(input, FLOAT32X4_TYPE, input);
5522 final_branch_condition = equal;
5523
5524 } else { 5513 } else {
5525 __ jmp(false_label, false_distance); 5514 __ jmp(false_label, false_distance);
5526 } 5515 }
5527 return final_branch_condition; 5516 return final_branch_condition;
5528 } 5517 }
5529 5518
5530 5519
5531 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 5520 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5532 Register temp = ToRegister(instr->temp()); 5521 Register temp = ToRegister(instr->temp());
5533 5522
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
5819 RecordSafepoint(Safepoint::kNoLazyDeopt); 5808 RecordSafepoint(Safepoint::kNoLazyDeopt);
5820 } 5809 }
5821 5810
5822 5811
5823 #undef __ 5812 #undef __
5824 5813
5825 } // namespace internal 5814 } // namespace internal
5826 } // namespace v8 5815 } // namespace v8
5827 5816
5828 #endif // V8_TARGET_ARCH_IA32 5817 #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