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/code-stubs-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: 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/utils.h ('k') | src/x64/lithium-codegen-x64.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 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/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
1558 } 1558 }
1559 1559
1560 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), 1560 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
1561 // so we do the second best thing - test it ourselves. 1561 // so we do the second best thing - test it ourselves.
1562 Label heap_number; 1562 Label heap_number;
1563 // If it's not a heap number, then return equal for (in)equality operator. 1563 // If it's not a heap number, then return equal for (in)equality operator.
1564 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset), 1564 __ Cmp(FieldOperand(rdx, HeapObject::kMapOffset),
1565 factory->heap_number_map()); 1565 factory->heap_number_map());
1566 __ j(equal, &heap_number, Label::kNear); 1566 __ j(equal, &heap_number, Label::kNear);
1567 if (cc != equal) { 1567 if (cc != equal) {
1568 Label not_simd;
1568 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset)); 1569 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset));
1569 __ movzxbl(rcx, FieldOperand(rcx, Map::kInstanceTypeOffset)); 1570 __ movzxbl(rcx, FieldOperand(rcx, Map::kInstanceTypeOffset));
1570 // Call runtime on identical objects. Otherwise return equal. 1571 // Call runtime on identical objects. Otherwise return equal.
1571 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE))); 1572 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE)));
1572 __ j(above_equal, &runtime_call, Label::kFar); 1573 __ j(above_equal, &runtime_call, Label::kFar);
1573 // Call runtime on identical symbols since we need to throw a TypeError. 1574 // Call runtime on identical symbols since we need to throw a TypeError.
1574 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SYMBOL_TYPE))); 1575 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SYMBOL_TYPE)));
1575 __ j(equal, &runtime_call, Label::kFar); 1576 __ j(equal, &runtime_call, Label::kFar);
1576 // Call runtime on identical SIMD values since we must throw a TypeError. 1577 // Call runtime on identical SIMD values since we must throw a TypeError.
1577 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FLOAT32X4_TYPE))); 1578 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_SIMD_VALUE_TYPE)));
1578 __ j(equal, &runtime_call, Label::kFar); 1579 __ j(less, &not_simd, Label::kFar);
1580 __ cmpb(rcx, Immediate(static_cast<uint8_t>(LAST_SIMD_VALUE_TYPE)));
1581 __ j(less_equal, &runtime_call, Label::kFar);
1582 __ bind(&not_simd);
1579 if (is_strong(strength())) { 1583 if (is_strong(strength())) {
1580 // We have already tested for smis and heap numbers, so if both 1584 // We have already tested for smis and heap numbers, so if both
1581 // arguments are not strings we must proceed to the slow case. 1585 // arguments are not strings we must proceed to the slow case.
1582 __ testb(rcx, Immediate(kIsNotStringMask)); 1586 __ testb(rcx, Immediate(kIsNotStringMask));
1583 __ j(not_zero, &runtime_call, Label::kFar); 1587 __ j(not_zero, &runtime_call, Label::kFar);
1584 } 1588 }
1585 } 1589 }
1586 __ Set(rax, EQUAL); 1590 __ Set(rax, EQUAL);
1587 __ ret(0); 1591 __ ret(0);
1588 1592
(...skipping 3994 matching lines...) Expand 10 before | Expand all | Expand 10 after
5583 kStackSpace, nullptr, return_value_operand, NULL); 5587 kStackSpace, nullptr, return_value_operand, NULL);
5584 } 5588 }
5585 5589
5586 5590
5587 #undef __ 5591 #undef __
5588 5592
5589 } // namespace internal 5593 } // namespace internal
5590 } // namespace v8 5594 } // namespace v8
5591 5595
5592 #endif // V8_TARGET_ARCH_X64 5596 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/utils.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698