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

Side by Side Diff: src/ppc/lithium-codegen-ppc.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/ppc/full-codegen-ppc.cc ('k') | src/runtime.js » ('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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/base/bits.h" 7 #include "src/base/bits.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/cpu-profiler.h" 10 #include "src/cpu-profiler.h"
(...skipping 2287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2298 __ b(instr->FalseLabel(chunk_)); 2298 __ b(instr->FalseLabel(chunk_));
2299 __ bind(&not_string); 2299 __ bind(&not_string);
2300 } 2300 }
2301 2301
2302 if (expected.Contains(ToBooleanStub::SYMBOL)) { 2302 if (expected.Contains(ToBooleanStub::SYMBOL)) {
2303 // Symbol value -> true. 2303 // Symbol value -> true.
2304 __ CompareInstanceType(map, ip, SYMBOL_TYPE); 2304 __ CompareInstanceType(map, ip, SYMBOL_TYPE);
2305 __ beq(instr->TrueLabel(chunk_)); 2305 __ beq(instr->TrueLabel(chunk_));
2306 } 2306 }
2307 2307
2308 if (expected.Contains(ToBooleanStub::SIMD_VALUE)) {
2309 // SIMD value -> true.
2310 __ CompareInstanceType(map, ip, FLOAT32X4_TYPE);
2311 __ beq(instr->TrueLabel(chunk_));
2312 }
2313
2308 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2314 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2309 // heap number -> false iff +0, -0, or NaN. 2315 // heap number -> false iff +0, -0, or NaN.
2310 Label not_heap_number; 2316 Label not_heap_number;
2311 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); 2317 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex);
2312 __ bne(&not_heap_number); 2318 __ bne(&not_heap_number);
2313 __ lfd(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); 2319 __ lfd(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset));
2314 // Test the double value. Zero and NaN are false. 2320 // Test the double value. Zero and NaN are false.
2315 __ fcmpu(dbl_scratch, kDoubleRegZero, cr7); 2321 __ fcmpu(dbl_scratch, kDoubleRegZero, cr7);
2316 __ mfcr(r0); 2322 __ mfcr(r0);
2317 __ andi(r0, r0, Operand(crZOrNaNBits)); 2323 __ andi(r0, r0, Operand(crZOrNaNBits));
(...skipping 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after
5960 __ CompareRoot(input, Heap::kNullValueRootIndex); 5966 __ CompareRoot(input, Heap::kNullValueRootIndex);
5961 __ beq(true_label); 5967 __ beq(true_label);
5962 __ CheckObjectTypeRange(input, map, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, 5968 __ CheckObjectTypeRange(input, map, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE,
5963 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label); 5969 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label);
5964 // Check for undetectable objects => false. 5970 // Check for undetectable objects => false.
5965 __ lbz(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); 5971 __ lbz(scratch, FieldMemOperand(map, Map::kBitFieldOffset));
5966 __ ExtractBit(r0, scratch, Map::kIsUndetectable); 5972 __ ExtractBit(r0, scratch, Map::kIsUndetectable);
5967 __ cmpi(r0, Operand::Zero()); 5973 __ cmpi(r0, Operand::Zero());
5968 final_branch_condition = eq; 5974 final_branch_condition = eq;
5969 5975
5976 } else if (String::Equals(type_name, factory->float32x4_string())) {
5977 __ JumpIfSmi(input, false_label);
5978 __ CompareObjectType(input, scratch, no_reg, FLOAT32X4_TYPE);
5979 final_branch_condition = eq;
5980
5970 } else { 5981 } else {
5971 __ b(false_label); 5982 __ b(false_label);
5972 } 5983 }
5973 5984
5974 return final_branch_condition; 5985 return final_branch_condition;
5975 } 5986 }
5976 5987
5977 5988
5978 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 5989 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5979 Register temp1 = ToRegister(instr->temp()); 5990 Register temp1 = ToRegister(instr->temp());
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
6267 __ Push(scope_info); 6278 __ Push(scope_info);
6268 __ push(ToRegister(instr->function())); 6279 __ push(ToRegister(instr->function()));
6269 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6280 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6270 RecordSafepoint(Safepoint::kNoLazyDeopt); 6281 RecordSafepoint(Safepoint::kNoLazyDeopt);
6271 } 6282 }
6272 6283
6273 6284
6274 #undef __ 6285 #undef __
6275 } // namespace internal 6286 } // namespace internal
6276 } // namespace v8 6287 } // namespace v8
OLDNEW
« no previous file with comments | « src/ppc/full-codegen-ppc.cc ('k') | src/runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698