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

Side by Side Diff: src/ia32/code-stubs-ia32.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/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.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/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1676 matching lines...) Expand 10 before | Expand all | Expand 10 after
1687 __ bind(&check_for_nan); 1687 __ bind(&check_for_nan);
1688 } 1688 }
1689 } 1689 }
1690 1690
1691 // Test for NaN. Compare heap numbers in a general way, 1691 // Test for NaN. Compare heap numbers in a general way,
1692 // to hanlde NaNs correctly. 1692 // to hanlde NaNs correctly.
1693 __ cmp(FieldOperand(edx, HeapObject::kMapOffset), 1693 __ cmp(FieldOperand(edx, HeapObject::kMapOffset),
1694 Immediate(isolate()->factory()->heap_number_map())); 1694 Immediate(isolate()->factory()->heap_number_map()));
1695 __ j(equal, &generic_heap_number_comparison, Label::kNear); 1695 __ j(equal, &generic_heap_number_comparison, Label::kNear);
1696 if (cc != equal) { 1696 if (cc != equal) {
1697 Label not_simd;
1697 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); 1698 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
1698 __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); 1699 __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset));
1699 // Call runtime on identical JSObjects. Otherwise return equal. 1700 // Call runtime on identical JSObjects. Otherwise return equal.
1700 __ cmpb(ecx, static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE)); 1701 __ cmpb(ecx, static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE));
1701 __ j(above_equal, &runtime_call, Label::kFar); 1702 __ j(above_equal, &runtime_call, Label::kFar);
1702 // Call runtime on identical symbols since we need to throw a TypeError. 1703 // Call runtime on identical symbols since we need to throw a TypeError.
1703 __ cmpb(ecx, static_cast<uint8_t>(SYMBOL_TYPE)); 1704 __ cmpb(ecx, static_cast<uint8_t>(SYMBOL_TYPE));
1704 __ j(equal, &runtime_call, Label::kFar); 1705 __ j(equal, &runtime_call, Label::kFar);
1705 // Call runtime on identical SIMD values since we must throw a TypeError. 1706 // Call runtime on identical SIMD values since we must throw a TypeError.
1706 __ cmpb(ecx, static_cast<uint8_t>(FLOAT32X4_TYPE)); 1707 __ cmpb(ecx, static_cast<uint8_t>(FIRST_SIMD_VALUE_TYPE));
1707 __ j(equal, &runtime_call, Label::kFar); 1708 __ j(less, &not_simd, Label::kFar);
1709 __ cmpb(ecx, static_cast<uint8_t>(LAST_SIMD_VALUE_TYPE));
1710 __ j(less_equal, &runtime_call, Label::kFar);
1711 __ bind(&not_simd);
1708 if (is_strong(strength())) { 1712 if (is_strong(strength())) {
1709 // We have already tested for smis and heap numbers, so if both 1713 // We have already tested for smis and heap numbers, so if both
1710 // arguments are not strings we must proceed to the slow case. 1714 // arguments are not strings we must proceed to the slow case.
1711 __ test(ecx, Immediate(kIsNotStringMask)); 1715 __ test(ecx, Immediate(kIsNotStringMask));
1712 __ j(not_zero, &runtime_call, Label::kFar); 1716 __ j(not_zero, &runtime_call, Label::kFar);
1713 } 1717 }
1714 } 1718 }
1715 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); 1719 __ Move(eax, Immediate(Smi::FromInt(EQUAL)));
1716 __ ret(0); 1720 __ ret(0);
1717 1721
(...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after
5654 Operand(ebp, 7 * kPointerSize), NULL); 5658 Operand(ebp, 7 * kPointerSize), NULL);
5655 } 5659 }
5656 5660
5657 5661
5658 #undef __ 5662 #undef __
5659 5663
5660 } // namespace internal 5664 } // namespace internal
5661 } // namespace v8 5665 } // namespace v8
5662 5666
5663 #endif // V8_TARGET_ARCH_IA32 5667 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698