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

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

Issue 1286313003: X87: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | 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/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
1383 __ bind(&check_for_nan); 1383 __ bind(&check_for_nan);
1384 } 1384 }
1385 } 1385 }
1386 1386
1387 // Test for NaN. Compare heap numbers in a general way, 1387 // Test for NaN. Compare heap numbers in a general way,
1388 // to handle NaNs correctly. 1388 // to handle NaNs correctly.
1389 __ cmp(FieldOperand(edx, HeapObject::kMapOffset), 1389 __ cmp(FieldOperand(edx, HeapObject::kMapOffset),
1390 Immediate(isolate()->factory()->heap_number_map())); 1390 Immediate(isolate()->factory()->heap_number_map()));
1391 __ j(equal, &generic_heap_number_comparison, Label::kNear); 1391 __ j(equal, &generic_heap_number_comparison, Label::kNear);
1392 if (cc != equal) { 1392 if (cc != equal) {
1393 Label not_simd;
1394 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); 1393 __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset));
1395 __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); 1394 __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset));
1396 // Call runtime on identical JSObjects. Otherwise return equal. 1395 // Call runtime on identical JSObjects. Otherwise return equal.
1397 __ cmpb(ecx, static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE)); 1396 __ cmpb(ecx, static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE));
1398 __ j(above_equal, &runtime_call, Label::kFar); 1397 __ j(above_equal, &runtime_call, Label::kFar);
1399 // Call runtime on identical symbols since we need to throw a TypeError. 1398 // Call runtime on identical symbols since we need to throw a TypeError.
1400 __ cmpb(ecx, static_cast<uint8_t>(SYMBOL_TYPE)); 1399 __ cmpb(ecx, static_cast<uint8_t>(SYMBOL_TYPE));
1401 __ j(equal, &runtime_call, Label::kFar); 1400 __ j(equal, &runtime_call, Label::kFar);
1402 // Call runtime on identical SIMD values since we must throw a TypeError. 1401 // Call runtime on identical SIMD values since we must throw a TypeError.
1403 __ cmpb(ecx, static_cast<uint8_t>(FIRST_SIMD_VALUE_TYPE)); 1402 __ cmpb(ecx, static_cast<uint8_t>(SIMD128_VALUE_TYPE));
1404 __ j(less, &not_simd, Label::kFar); 1403 __ j(equal, &runtime_call, Label::kFar);
1405 __ cmpb(ecx, static_cast<uint8_t>(LAST_SIMD_VALUE_TYPE));
1406 __ j(less_equal, &runtime_call, Label::kFar);
1407 __ bind(&not_simd);
1408 if (is_strong(strength())) { 1404 if (is_strong(strength())) {
1409 // We have already tested for smis and heap numbers, so if both 1405 // We have already tested for smis and heap numbers, so if both
1410 // arguments are not strings we must proceed to the slow case. 1406 // arguments are not strings we must proceed to the slow case.
1411 __ test(ecx, Immediate(kIsNotStringMask)); 1407 __ test(ecx, Immediate(kIsNotStringMask));
1412 __ j(not_zero, &runtime_call, Label::kFar); 1408 __ j(not_zero, &runtime_call, Label::kFar);
1413 } 1409 }
1414 } 1410 }
1415 __ Move(eax, Immediate(Smi::FromInt(EQUAL))); 1411 __ Move(eax, Immediate(Smi::FromInt(EQUAL)));
1416 __ ret(0); 1412 __ ret(0);
1417 1413
(...skipping 3921 matching lines...) Expand 10 before | Expand all | Expand 10 after
5339 Operand(ebp, 7 * kPointerSize), NULL); 5335 Operand(ebp, 7 * kPointerSize), NULL);
5340 } 5336 }
5341 5337
5342 5338
5343 #undef __ 5339 #undef __
5344 5340
5345 } // namespace internal 5341 } // namespace internal
5346 } // namespace v8 5342 } // namespace v8
5347 5343
5348 #endif // V8_TARGET_ARCH_X87 5344 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « src/full-codegen/x87/full-codegen-x87.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698