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

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

Issue 1241533004: Revert of Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
2314 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) { 2308 if (expected.Contains(ToBooleanStub::HEAP_NUMBER)) {
2315 // heap number -> false iff +0, -0, or NaN. 2309 // heap number -> false iff +0, -0, or NaN.
2316 Label not_heap_number; 2310 Label not_heap_number;
2317 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex); 2311 __ CompareRoot(map, Heap::kHeapNumberMapRootIndex);
2318 __ bne(&not_heap_number); 2312 __ bne(&not_heap_number);
2319 __ lfd(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset)); 2313 __ lfd(dbl_scratch, FieldMemOperand(reg, HeapNumber::kValueOffset));
2320 // Test the double value. Zero and NaN are false. 2314 // Test the double value. Zero and NaN are false.
2321 __ fcmpu(dbl_scratch, kDoubleRegZero, cr7); 2315 __ fcmpu(dbl_scratch, kDoubleRegZero, cr7);
2322 __ mfcr(r0); 2316 __ mfcr(r0);
2323 __ andi(r0, r0, Operand(crZOrNaNBits)); 2317 __ andi(r0, r0, Operand(crZOrNaNBits));
(...skipping 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after
5966 __ CompareRoot(input, Heap::kNullValueRootIndex); 5960 __ CompareRoot(input, Heap::kNullValueRootIndex);
5967 __ beq(true_label); 5961 __ beq(true_label);
5968 __ CheckObjectTypeRange(input, map, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE, 5962 __ CheckObjectTypeRange(input, map, FIRST_NONCALLABLE_SPEC_OBJECT_TYPE,
5969 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label); 5963 LAST_NONCALLABLE_SPEC_OBJECT_TYPE, false_label);
5970 // Check for undetectable objects => false. 5964 // Check for undetectable objects => false.
5971 __ lbz(scratch, FieldMemOperand(map, Map::kBitFieldOffset)); 5965 __ lbz(scratch, FieldMemOperand(map, Map::kBitFieldOffset));
5972 __ ExtractBit(r0, scratch, Map::kIsUndetectable); 5966 __ ExtractBit(r0, scratch, Map::kIsUndetectable);
5973 __ cmpi(r0, Operand::Zero()); 5967 __ cmpi(r0, Operand::Zero());
5974 final_branch_condition = eq; 5968 final_branch_condition = eq;
5975 5969
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
5981 } else { 5970 } else {
5982 __ b(false_label); 5971 __ b(false_label);
5983 } 5972 }
5984 5973
5985 return final_branch_condition; 5974 return final_branch_condition;
5986 } 5975 }
5987 5976
5988 5977
5989 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) { 5978 void LCodeGen::DoIsConstructCallAndBranch(LIsConstructCallAndBranch* instr) {
5990 Register temp1 = ToRegister(instr->temp()); 5979 Register temp1 = ToRegister(instr->temp());
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
6278 __ Push(scope_info); 6267 __ Push(scope_info);
6279 __ push(ToRegister(instr->function())); 6268 __ push(ToRegister(instr->function()));
6280 CallRuntime(Runtime::kPushBlockContext, 2, instr); 6269 CallRuntime(Runtime::kPushBlockContext, 2, instr);
6281 RecordSafepoint(Safepoint::kNoLazyDeopt); 6270 RecordSafepoint(Safepoint::kNoLazyDeopt);
6282 } 6271 }
6283 6272
6284 6273
6285 #undef __ 6274 #undef __
6286 } // namespace internal 6275 } // namespace internal
6287 } // namespace v8 6276 } // 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