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

Side by Side Diff: src/x64/lithium-codegen-x64.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: Make _IsSimdObject an assembly intrinsic in fullcodegen. 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 7 #if V8_TARGET_ARCH_X64
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 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after
2208 } 2208 }
2209 2209
2210 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2210 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2211 // Symbol value -> true. 2211 // Symbol value -> true.
2212 __ CmpInstanceType(map, SYMBOL_TYPE); 2212 __ CmpInstanceType(map, SYMBOL_TYPE);
2213 __ j(equal, instr->TrueLabel(chunk_)); 2213 __ j(equal, instr->TrueLabel(chunk_));
2214 } 2214 }
2215 2215
2216 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) { 2216 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2217 // SIMD value -> true. 2217 // SIMD value -> true.
2218 __ CmpInstanceType(map, FLOAT32X4_TYPE); 2218 Label not_simd;
2219 __ j(equal, instr->TrueLabel(chunk_)); 2219 __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
2220 __ j(less, &not_simd, Label::kNear);
2221 __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
2222 __ j(less_equal, instr->TrueLabel(chunk_));
2223 __ bind(&not_simd);
2220 } 2224 }
2221 2225
2222 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2226 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2223 // heap number -> false iff +0, -0, or NaN. 2227 // heap number -> false iff +0, -0, or NaN.
2224 Label not_heap_number; 2228 Label not_heap_number;
2225 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); 2229 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex);
2226 __ j(not_equal, &not_heap_number, Label::kNear); 2230 __ j(not_equal, &not_heap_number, Label::kNear);
2227 XMMRegister xmm_scratch = double_scratch0(); 2231 XMMRegister xmm_scratch = double_scratch0();
2228 __ xorps(xmm_scratch, xmm_scratch); 2232 __ xorps(xmm_scratch, xmm_scratch);
2229 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset)); 2233 __ ucomisd(xmm_scratch, FieldOperand(reg, HeapNumber::kValueOffset));
(...skipping 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after
5742 // Check for undetectable objects => false. 5746 // Check for undetectable objects => false.
5743 __ testb(FieldOperand(input, Map::kBitFieldOffset), 5747 __ testb(FieldOperand(input, Map::kBitFieldOffset),
5744 Immediate(1 << Map::kIsUndetectable)); 5748 Immediate(1 << Map::kIsUndetectable));
5745 final_branch_condition = zero; 5749 final_branch_condition = zero;
5746 5750
5747 } else if (String::Equals(type_name, factory->float32x4_string())) { 5751 } else if (String::Equals(type_name, factory->float32x4_string())) {
5748 __ JumpIfSmi(input, false_label, false_distance); 5752 __ JumpIfSmi(input, false_label, false_distance);
5749 __ CmpObjectType(input, FLOAT32X4_TYPE, input); 5753 __ CmpObjectType(input, FLOAT32X4_TYPE, input);
5750 final_branch_condition = equal; 5754 final_branch_condition = equal;
5751 5755
5756 } else if (String::Equals(type_name, factory->int32x4_string())) {
5757 __ JumpIfSmi(input, false_label, false_distance);
5758 __ CmpObjectType(input, INT32X4_TYPE, input);
5759 final_branch_condition = equal;
5760
5761 } else if (String::Equals(type_name, factory->bool32x4_string())) {
5762 __ JumpIfSmi(input, false_label, false_distance);
5763 __ CmpObjectType(input, BOOL32X4_TYPE, input);
5764 final_branch_condition = equal;
5765
5766 } else if (String::Equals(type_name, factory->int16x8_string())) {
5767 __ JumpIfSmi(input, false_label, false_distance);
5768 __ CmpObjectType(input, INT16X8_TYPE, input);
5769 final_branch_condition = equal;
5770
5771 } else if (String::Equals(type_name, factory->bool16x8_string())) {
5772 __ JumpIfSmi(input, false_label, false_distance);
5773 __ CmpObjectType(input, BOOL16X8_TYPE, input);
5774 final_branch_condition = equal;
5775
5776 } else if (String::Equals(type_name, factory->int8x16_string())) {
5777 __ JumpIfSmi(input, false_label, false_distance);
5778 __ CmpObjectType(input, INT8X16_TYPE, input);
5779 final_branch_condition = equal;
5780
5781 } else if (String::Equals(type_name, factory->bool8x16_string())) {
5782 __ JumpIfSmi(input, false_label, false_distance);
5783 __ CmpObjectType(input, BOOL8X16_TYPE, input);
5784 final_branch_condition = equal;
5785
5752 } else { 5786 } else {
5753 __ jmp(false_label, false_distance); 5787 __ jmp(false_label, false_distance);
5754 } 5788 }
5755 5789
5756 return final_branch_condition; 5790 return final_branch_condition;
5757 } 5791 }
5758 5792
5759 5793
5760 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 5794 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5761 Register temp = ToRegister(instr->temp()); 5795 Register temp = ToRegister(instr->temp());
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
6046 RecordSafepoint(Safepoint::kNoLazyDeopt); 6080 RecordSafepoint(Safepoint::kNoLazyDeopt);
6047 } 6081 }
6048 6082
6049 6083
6050 #undef __ 6084 #undef __
6051 6085
6052 } // namespace internal 6086 } // namespace internal
6053 } // namespace v8 6087 } // namespace v8
6054 6088
6055 #endif // V8_TARGET_ARCH_X64 6089 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/macros.py ('K') | « src/x64/code-stubs-x64.cc ('k') | src/x87/code-stubs-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698