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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 1273353003: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow check failures. REBASE. 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/types.cc ('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;
1569 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset)); 1568 __ movp(rcx, FieldOperand(rax, HeapObject::kMapOffset));
1570 __ movzxbl(rcx, FieldOperand(rcx, Map::kInstanceTypeOffset)); 1569 __ movzxbl(rcx, FieldOperand(rcx, Map::kInstanceTypeOffset));
1571 // Call runtime on identical objects. Otherwise return equal. 1570 // Call runtime on identical objects. Otherwise return equal.
1572 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE))); 1571 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE)));
1573 __ j(above_equal, &runtime_call, Label::kFar); 1572 __ j(above_equal, &runtime_call, Label::kFar);
1574 // Call runtime on identical symbols since we need to throw a TypeError. 1573 // Call runtime on identical symbols since we need to throw a TypeError.
1575 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SYMBOL_TYPE))); 1574 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SYMBOL_TYPE)));
1576 __ j(equal, &runtime_call, Label::kFar); 1575 __ j(equal, &runtime_call, Label::kFar);
1577 // Call runtime on identical SIMD values since we must throw a TypeError. 1576 // Call runtime on identical SIMD values since we must throw a TypeError.
1578 __ cmpb(rcx, Immediate(static_cast<uint8_t>(FIRST_SIMD_VALUE_TYPE))); 1577 __ cmpb(rcx, Immediate(static_cast<uint8_t>(SIMD128_VALUE_TYPE)));
1579 __ j(less, &not_simd, Label::kFar); 1578 __ j(equal, &runtime_call, 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);
1583 if (is_strong(strength())) { 1579 if (is_strong(strength())) {
1584 // We have already tested for smis and heap numbers, so if both 1580 // We have already tested for smis and heap numbers, so if both
1585 // arguments are not strings we must proceed to the slow case. 1581 // arguments are not strings we must proceed to the slow case.
1586 __ testb(rcx, Immediate(kIsNotStringMask)); 1582 __ testb(rcx, Immediate(kIsNotStringMask));
1587 __ j(not_zero, &runtime_call, Label::kFar); 1583 __ j(not_zero, &runtime_call, Label::kFar);
1588 } 1584 }
1589 } 1585 }
1590 __ Set(rax, EQUAL); 1586 __ Set(rax, EQUAL);
1591 __ ret(0); 1587 __ ret(0);
1592 1588
(...skipping 3994 matching lines...) Expand 10 before | Expand all | Expand 10 after
5587 kStackSpace, nullptr, return_value_operand, NULL); 5583 kStackSpace, nullptr, return_value_operand, NULL);
5588 } 5584 }
5589 5585
5590 5586
5591 #undef __ 5587 #undef __
5592 5588
5593 } // namespace internal 5589 } // namespace internal
5594 } // namespace v8 5590 } // namespace v8
5595 5591
5596 #endif // V8_TARGET_ARCH_X64 5592 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/types.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698