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

Side by Side Diff: src/x87/lithium-codegen-x87.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/x87/code-stubs-x87.cc ('k') | test/cctest/test-heap.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_X87 7 #if V8_TARGET_ARCH_X87
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 2422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2433 } 2433 }
2434 2434
2435 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2435 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2436 // Symbol value -> true. 2436 // Symbol value -> true.
2437 __ CmpInstanceType(map, SYMBOL_TYPE); 2437 __ CmpInstanceType(map, SYMBOL_TYPE);
2438 __ j(equal, instr->TrueLabel(chunk_)); 2438 __ j(equal, instr->TrueLabel(chunk_));
2439 } 2439 }
2440 2440
2441 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { 2441 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2442 // SIMD value -> true. 2442 // SIMD value -> true.
2443 __ CmpInstanceType(map, FLOAT32X4_TYPE); 2443 Label not_simd;
2444 __ j(equal, instr->TrueLabel(chunk_)); 2444 __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
2445 __ j(less, &not_simd, Label::kNear);
2446 __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
2447 __ j(less_equal, instr->TrueLabel(chunk_));
2448 __ bind(&not_simd);
2445 } 2449 }
2446 2450
2447 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2451 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2448 // heap number -> false iff +0, -0, or NaN. 2452 // heap number -> false iff +0, -0, or NaN.
2449 Label not_heap_number; 2453 Label not_heap_number;
2450 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 2454 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
2451 factory()->heap_number_map()); 2455 factory()->heap_number_map());
2452 __ j(not_equal, &not_heap_number, Label::kNear); 2456 __ j(not_equal, &not_heap_number, Label::kNear);
2453 __ fldz(); 2457 __ fldz();
2454 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset)); 2458 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset));
(...skipping 3693 matching lines...) Expand 10 before | Expand all | Expand 10 after
6148 // Check for undetectable objects => false. 6152 // Check for undetectable objects => false.
6149 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 6153 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
6150 1 << Map::kIsUndetectable); 6154 1 << Map::kIsUndetectable);
6151 final_branch_condition = zero; 6155 final_branch_condition = zero;
6152 6156
6153 } else if (String::Equals(type_name, factory()->float32x4_string())) { 6157 } else if (String::Equals(type_name, factory()->float32x4_string())) {
6154 __ JumpIfSmi(input, false_label, false_distance); 6158 __ JumpIfSmi(input, false_label, false_distance);
6155 __ CmpObjectType(input, FLOAT32X4_TYPE, input); 6159 __ CmpObjectType(input, FLOAT32X4_TYPE, input);
6156 final_branch_condition = equal; 6160 final_branch_condition = equal;
6157 6161
6162 } else if (String::Equals(type_name, factory()->int32x4_string())) {
6163 __ JumpIfSmi(input, false_label, false_distance);
6164 __ CmpObjectType(input, INT32X4_TYPE, input);
6165 final_branch_condition = equal;
6166
6167 } else if (String::Equals(type_name, factory()->bool32x4_string())) {
6168 __ JumpIfSmi(input, false_label, false_distance);
6169 __ CmpObjectType(input, BOOL32X4_TYPE, input);
6170 final_branch_condition = equal;
6171
6172 } else if (String::Equals(type_name, factory()->int16x8_string())) {
6173 __ JumpIfSmi(input, false_label, false_distance);
6174 __ CmpObjectType(input, INT16X8_TYPE, input);
6175 final_branch_condition = equal;
6176
6177 } else if (String::Equals(type_name, factory()->bool16x8_string())) {
6178 __ JumpIfSmi(input, false_label, false_distance);
6179 __ CmpObjectType(input, BOOL16X8_TYPE, input);
6180 final_branch_condition = equal;
6181
6182 } else if (String::Equals(type_name, factory()->int8x16_string())) {
6183 __ JumpIfSmi(input, false_label, false_distance);
6184 __ CmpObjectType(input, INT8X16_TYPE, input);
6185 final_branch_condition = equal;
6186
6187 } else if (String::Equals(type_name, factory()->bool8x16_string())) {
6188 __ JumpIfSmi(input, false_label, false_distance);
6189 __ CmpObjectType(input, BOOL8X16_TYPE, input);
6190 final_branch_condition = equal;
6191
6158 } else { 6192 } else {
6159 __ jmp(false_label, false_distance); 6193 __ jmp(false_label, false_distance);
6160 } 6194 }
6161 return final_branch_condition; 6195 return final_branch_condition;
6162 } 6196 }
6163 6197
6164 6198
6165 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 6199 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
6166 Register temp = ToRegister(instr->temp()); 6200 Register temp = ToRegister(instr->temp());
6167 6201
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
6456 RecordSafepoint(Safepoint::kNoLazyDeopt); 6490 RecordSafepoint(Safepoint::kNoLazyDeopt);
6457 } 6491 }
6458 6492
6459 6493
6460 #undef __ 6494 #undef __
6461 6495
6462 } // namespace internal 6496 } // namespace internal
6463 } // namespace v8 6497 } // namespace v8
6464 6498
6465 #endif // V8_TARGET_ARCH_X87 6499 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/code-stubs-x87.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698