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

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

Issue 1219943002: Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Back out changes to include/v8.h 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/x87/full-codegen-x87.cc ('k') | test/cctest/cctest.gyp » ('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 2416 matching lines...) Expand 10 before | Expand all | Expand 10 after
2427 __ jmp(instr->FalseLabel(chunk_)); 2427 __ jmp(instr->FalseLabel(chunk_));
2428 __ bind(&not_string); 2428 __ bind(&not_string);
2429 } 2429 }
2430 2430
2431 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2431 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2432 // Symbol value -> true. 2432 // Symbol value -> true.
2433 __ CmpInstanceType(map, SYMBOL_TYPE); 2433 __ CmpInstanceType(map, SYMBOL_TYPE);
2434 __ j(equal, instr->TrueLabel(chunk_)); 2434 __ j(equal, instr->TrueLabel(chunk_));
2435 } 2435 }
2436 2436
2437 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2438 // SIMD value -> true.
2439 __ CmpInstanceType(map, FLOAT32X4_TYPE);
2440 __ j(equal, instr->TrueLabel(chunk_));
2441 }
2442
2437 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2443 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2438 // heap number -> false iff +0, -0, or NaN. 2444 // heap number -> false iff +0, -0, or NaN.
2439 Label not_heap_number; 2445 Label not_heap_number;
2440 __ cmp(FieldOperand(reg, HeapObject::kMapOffset), 2446 __ cmp(FieldOperand(reg, HeapObject::kMapOffset),
2441 factory()->heap_number_map()); 2447 factory()->heap_number_map());
2442 __ j(not_equal, &not_heap_number, Label::kNear); 2448 __ j(not_equal, &not_heap_number, Label::kNear);
2443 __ fldz(); 2449 __ fldz();
2444 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset)); 2450 __ fld_d(FieldOperand(reg, HeapNumber::kValueOffset));
2445 __ FCmp(); 2451 __ FCmp();
2446 __ j(zero, instr->FalseLabel(chunk_)); 2452 __ j(zero, instr->FalseLabel(chunk_));
(...skipping 3667 matching lines...) Expand 10 before | Expand all | Expand 10 after
6114 __ j(equal, true_label, true_distance); 6120 __ j(equal, true_label, true_distance);
6115 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input); 6121 __ CmpObjectType(input, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, input);
6116 __ j(below, false_label, false_distance); 6122 __ j(below, false_label, false_distance);
6117 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE); 6123 __ CmpInstanceType(input, LAST_NONCALLABLE_SPEC_OBJECT_TYPE);
6118 __ j(above, false_label, false_distance); 6124 __ j(above, false_label, false_distance);
6119 // Check for undetectable objects => false. 6125 // Check for undetectable objects => false.
6120 __ test_b(FieldOperand(input, Map::kBitFieldOffset), 6126 __ test_b(FieldOperand(input, Map::kBitFieldOffset),
6121 1 << Map::kIsUndetectable); 6127 1 << Map::kIsUndetectable);
6122 final_branch_condition = zero; 6128 final_branch_condition = zero;
6123 6129
6130 } else if (String::Equals(type_name, factory()->float32x4_string())) {
6131 __ JumpIfSmi(input, false_label, false_distance);
6132 __ CmpObjectType(input, FLOAT32X4_TYPE, input);
6133 final_branch_condition = equal;
6134
6124 } else { 6135 } else {
6125 __ jmp(false_label, false_distance); 6136 __ jmp(false_label, false_distance);
6126 } 6137 }
6127 return final_branch_condition; 6138 return final_branch_condition;
6128 } 6139 }
6129 6140
6130 6141
6131 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 6142 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
6132 Register temp = ToRegister(instr->temp()); 6143 Register temp = ToRegister(instr->temp());
6133 6144
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
6422 RecordSafepoint(Safepoint::kNoLazyDeopt); 6433 RecordSafepoint(Safepoint::kNoLazyDeopt);
6423 } 6434 }
6424 6435
6425 6436
6426 #undef __ 6437 #undef __
6427 6438
6428 } // namespace internal 6439 } // namespace internal
6429 } // namespace v8 6440 } // namespace v8
6430 6441
6431 #endif // V8_TARGET_ARCH_X87 6442 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/x87/full-codegen-x87.cc ('k') | test/cctest/cctest.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698