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

Side by Side Diff: src/mips64/lithium-codegen-mips64.cc

Issue 1219943002: Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Back out changes to include/v8.h Created 5 years, 5 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/mips64/full-codegen-mips64.cc ('k') | src/objects.h » ('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 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/cpu-profiler.h" 9 #include "src/cpu-profiler.h"
10 #include "src/hydrogen-osr.h" 10 #include "src/hydrogen-osr.h"
(...skipping 2264 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 __ bind(&not_string); 2275 __ bind(&not_string);
2276 } 2276 }
2277 2277
2278 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2278 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2279 // Symbol value -> true. 2279 // Symbol value -> true.
2280 const Register scratch = scratch1(); 2280 const Register scratch = scratch1();
2281 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset)); 2281 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
2282 __ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE)); 2282 __ Branch(instr->TrueLabel(chunk_), eq, scratch, Operand(SYMBOL_TYPE));
2283 } 2283 }
2284 2284
2285 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2286 // Symbol value -> true.
2287 const Register scratch = scratch1();
2288 __ lbu(scratch, FieldMemOperand(map, Map::kInstanceTypeOffset));
2289 __ Branch(instr->TrueLabel(chunk_), eq, scratch,
2290 Operand(FLOAT32X4_TYPE));
2291 }
2292
2285 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2293 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2286 // heap number -> false iff +0, -0, or NaN. 2294 // heap number -> false iff +0, -0, or NaN.
2287 DoubleRegister dbl_scratch = double_scratch0(); 2295 DoubleRegister dbl_scratch = double_scratch0();
2288 Label not_heap_number; 2296 Label not_heap_number;
2289 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex); 2297 __ LoadRoot(at, Heap::kHeapNumberMapRootIndex);
2290 __ Branch(&not_heap_number, ne, map, Operand(at)); 2298 __ Branch(&not_heap_number, ne, map, Operand(at));
2291 __ ldc1(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); 2299 __ ldc1(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset));
2292 __ BranchF(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_), 2300 __ BranchF(instr->TrueLabel(chunk_), instr->FalseLabel(chunk_),
2293 ne, dbl_scratch, kDoubleRegZero); 2301 ne, dbl_scratch, kDoubleRegZero);
2294 // Falls through if dbl_scratch == 0. 2302 // Falls through if dbl_scratch == 0.
(...skipping 3550 matching lines...) Expand 10 before | Expand all | Expand 10 after
5845 *cmp2 = Operand(zero_reg); 5853 *cmp2 = Operand(zero_reg);
5846 final_branch_condition = eq; 5854 final_branch_condition = eq;
5847 5855
5848 } else if (String::Equals(type_name, factory->symbol_string())) { 5856 } else if (String::Equals(type_name, factory->symbol_string())) {
5849 __ JumpIfSmi(input, false_label); 5857 __ JumpIfSmi(input, false_label);
5850 __ GetObjectType(input, input, scratch); 5858 __ GetObjectType(input, input, scratch);
5851 *cmp1 = scratch; 5859 *cmp1 = scratch;
5852 *cmp2 = Operand(SYMBOL_TYPE); 5860 *cmp2 = Operand(SYMBOL_TYPE);
5853 final_branch_condition = eq; 5861 final_branch_condition = eq;
5854 5862
5863 } else if (String::Equals(type_name, factory->float32x4_string())) {
5864 __ JumpIfSmi(input, false_label);
5865 __ GetObjectType(input, input, scratch);
5866 *cmp1 = scratch;
5867 *cmp2 = Operand(FLOAT32X4_TYPE);
5868 final_branch_condition = eq;
5869
5855 } else if (String::Equals(type_name, factory->boolean_string())) { 5870 } else if (String::Equals(type_name, factory->boolean_string())) {
5856 __ LoadRoot(at, Heap::kTrueValueRootIndex); 5871 __ LoadRoot(at, Heap::kTrueValueRootIndex);
5857 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input)); 5872 __ Branch(USE_DELAY_SLOT, true_label, eq, at, Operand(input));
5858 __ LoadRoot(at, Heap::kFalseValueRootIndex); 5873 __ LoadRoot(at, Heap::kFalseValueRootIndex);
5859 *cmp1 = at; 5874 *cmp1 = at;
5860 *cmp2 = Operand(input); 5875 *cmp2 = Operand(input);
5861 final_branch_condition = eq; 5876 final_branch_condition = eq;
5862 5877
5863 } else if (String::Equals(type_name, factory->undefined_string())) { 5878 } else if (String::Equals(type_name, factory->undefined_string())) {
5864 __ LoadRoot(at, Heap::kUndefinedValueRootIndex); 5879 __ LoadRoot(at, Heap::kUndefinedValueRootIndex);
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
6211 __ Push(at, ToRegister(instr->function())); 6226 __ Push(at, ToRegister(instr->function()));
6212 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6227 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6213 RecordSafepoint(Safepoint::kNoLazyDeopt); 6228 RecordSafepoint(Safepoint::kNoLazyDeopt);
6214 } 6229 }
6215 6230
6216 6231
6217 #undef __ 6232 #undef __
6218 6233
6219 } // namespace internal 6234 } // namespace internal
6220 } // namespace v8 6235 } // namespace v8
OLDNEW
« no previous file with comments | « src/mips64/full-codegen-mips64.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698