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

Side by Side Diff: src/full-codegen/x64/full-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: 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/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 3297 matching lines...) Expand 10 before | Expand all | Expand 10 after
3308 3308
3309 __ JumpIfSmi(rax, if_false); 3309 __ JumpIfSmi(rax, if_false);
3310 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rbx); 3310 __ CmpObjectType(rax, FIRST_SPEC_OBJECT_TYPE, rbx);
3311 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false); 3311 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3312 Split(above_equal, if_true, if_false, fall_through); 3312 Split(above_equal, if_true, if_false, fall_through);
3313 3313
3314 context()->Plug(if_true, if_false); 3314 context()->Plug(if_true, if_false);
3315 } 3315 }
3316 3316
3317 3317
3318 void FullCodeGenerator::EmitIsSimdObject(CallRuntime* expr) {
3319 ZoneList<Expression*>* args = expr->arguments();
3320 DCHECK(args->length() == 1);
3321
3322 VisitForAccumulatorValue(args->at(0));
3323
3324 Label materialize_true, materialize_false;
3325 Label* if_true = NULL;
3326 Label* if_false = NULL;
3327 Label* fall_through = NULL;
3328 context()->PrepareTest(&materialize_true, &materialize_false, &if_true,
3329 &if_false, &fall_through);
3330
3331 __ JumpIfSmi(rax, if_false);
3332 Register map = rbx;
3333 __ movp(map, FieldOperand(rax, HeapObject::kMapOffset));
3334 __ CmpInstanceType(map, FIRST_SIMD_VALUE_TYPE);
3335 __ j(less, if_false);
3336 __ CmpInstanceType(map, LAST_SIMD_VALUE_TYPE);
3337 PrepareForBailoutBeforeSplit(expr, true, if_true, if_false);
3338 Split(less_equal, if_true, if_false, fall_through);
3339
3340 context()->Plug(if_true, if_false);
3341 }
3342
3343
3318 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) { 3344 void FullCodeGenerator::EmitIsUndetectableObject(CallRuntime* expr) {
3319 ZoneList<Expression*>* args = expr->arguments(); 3345 ZoneList<Expression*>* args = expr->arguments();
3320 DCHECK(args->length() == 1); 3346 DCHECK(args->length() == 1);
3321 3347
3322 VisitForAccumulatorValue(args->at(0)); 3348 VisitForAccumulatorValue(args->at(0));
3323 3349
3324 Label materialize_true, materialize_false; 3350 Label materialize_true, materialize_false;
3325 Label* if_true = NULL; 3351 Label* if_true = NULL;
3326 Label* if_false = NULL; 3352 Label* if_false = NULL;
3327 Label* fall_through = NULL; 3353 Label* fall_through = NULL;
(...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after
5026 Immediate(1 << Map::kIsUndetectable)); 5052 Immediate(1 << Map::kIsUndetectable));
5027 Split(zero, if_true, if_false, fall_through); 5053 Split(zero, if_true, if_false, fall_through);
5028 } else if (String::Equals(check, factory->symbol_string())) { 5054 } else if (String::Equals(check, factory->symbol_string())) {
5029 __ JumpIfSmi(rax, if_false); 5055 __ JumpIfSmi(rax, if_false);
5030 __ CmpObjectType(rax, SYMBOL_TYPE, rdx); 5056 __ CmpObjectType(rax, SYMBOL_TYPE, rdx);
5031 Split(equal, if_true, if_false, fall_through); 5057 Split(equal, if_true, if_false, fall_through);
5032 } else if (String::Equals(check, factory->float32x4_string())) { 5058 } else if (String::Equals(check, factory->float32x4_string())) {
5033 __ JumpIfSmi(rax, if_false); 5059 __ JumpIfSmi(rax, if_false);
5034 __ CmpObjectType(rax, FLOAT32X4_TYPE, rdx); 5060 __ CmpObjectType(rax, FLOAT32X4_TYPE, rdx);
5035 Split(equal, if_true, if_false, fall_through); 5061 Split(equal, if_true, if_false, fall_through);
5062 } else if (String::Equals(check, factory->int32x4_string())) {
5063 __ JumpIfSmi(rax, if_false);
5064 __ CmpObjectType(rax, INT32X4_TYPE, rdx);
5065 Split(equal, if_true, if_false, fall_through);
5066 } else if (String::Equals(check, factory->bool32x4_string())) {
5067 __ JumpIfSmi(rax, if_false);
5068 __ CmpObjectType(rax, BOOL32X4_TYPE, rdx);
5069 Split(equal, if_true, if_false, fall_through);
5070 } else if (String::Equals(check, factory->int16x8_string())) {
5071 __ JumpIfSmi(rax, if_false);
5072 __ CmpObjectType(rax, INT16X8_TYPE, rdx);
5073 Split(equal, if_true, if_false, fall_through);
5074 } else if (String::Equals(check, factory->bool16x8_string())) {
5075 __ JumpIfSmi(rax, if_false);
5076 __ CmpObjectType(rax, BOOL16X8_TYPE, rdx);
5077 Split(equal, if_true, if_false, fall_through);
5078 } else if (String::Equals(check, factory->int8x16_string())) {
5079 __ JumpIfSmi(rax, if_false);
5080 __ CmpObjectType(rax, INT8X16_TYPE, rdx);
5081 Split(equal, if_true, if_false, fall_through);
5082 } else if (String::Equals(check, factory->bool8x16_string())) {
5083 __ JumpIfSmi(rax, if_false);
5084 __ CmpObjectType(rax, BOOL8X16_TYPE, rdx);
5085 Split(equal, if_true, if_false, fall_through);
5036 } else if (String::Equals(check, factory->boolean_string())) { 5086 } else if (String::Equals(check, factory->boolean_string())) {
5037 __ CompareRoot(rax, Heap::kTrueValueRootIndex); 5087 __ CompareRoot(rax, Heap::kTrueValueRootIndex);
5038 __ j(equal, if_true); 5088 __ j(equal, if_true);
5039 __ CompareRoot(rax, Heap::kFalseValueRootIndex); 5089 __ CompareRoot(rax, Heap::kFalseValueRootIndex);
5040 Split(equal, if_true, if_false, fall_through); 5090 Split(equal, if_true, if_false, fall_through);
5041 } else if (String::Equals(check, factory->undefined_string())) { 5091 } else if (String::Equals(check, factory->undefined_string())) {
5042 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex); 5092 __ CompareRoot(rax, Heap::kUndefinedValueRootIndex);
5043 __ j(equal, if_true); 5093 __ j(equal, if_true);
5044 __ JumpIfSmi(rax, if_false); 5094 __ JumpIfSmi(rax, if_false);
5045 // Check for undetectable objects => true. 5095 // Check for undetectable objects => true.
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
5362 Assembler::target_address_at(call_target_address, 5412 Assembler::target_address_at(call_target_address,
5363 unoptimized_code)); 5413 unoptimized_code));
5364 return OSR_AFTER_STACK_CHECK; 5414 return OSR_AFTER_STACK_CHECK;
5365 } 5415 }
5366 5416
5367 5417
5368 } // namespace internal 5418 } // namespace internal
5369 } // namespace v8 5419 } // namespace v8
5370 5420
5371 #endif // V8_TARGET_ARCH_X64 5421 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698