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/arm64/code-stubs-arm64.cc

Issue 1219943002: Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Don't install SIMD object without the simd flag. 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
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 // They are both equal and they are not both Smis so both of them are not 220 // They are both equal and they are not both Smis so both of them are not
221 // Smis. If it's not a heap number, then return equal. 221 // Smis. If it's not a heap number, then return equal.
222 Register right_type = scratch; 222 Register right_type = scratch;
223 if ((cond == lt) || (cond == gt)) { 223 if ((cond == lt) || (cond == gt)) {
224 // Call runtime on identical JSObjects. Otherwise return equal. 224 // Call runtime on identical JSObjects. Otherwise return equal.
225 __ JumpIfObjectType(right, right_type, right_type, FIRST_SPEC_OBJECT_TYPE, 225 __ JumpIfObjectType(right, right_type, right_type, FIRST_SPEC_OBJECT_TYPE,
226 slow, ge); 226 slow, ge);
227 // Call runtime on identical symbols since we need to throw a TypeError. 227 // Call runtime on identical symbols since we need to throw a TypeError.
228 __ Cmp(right_type, SYMBOL_TYPE); 228 __ Cmp(right_type, SYMBOL_TYPE);
229 __ B(eq, slow); 229 __ B(eq, slow);
230 // Call runtime on identical SIMD values since we must throw a TypeError.
231 __ Cmp(right_type, FLOAT32X4_TYPE);
232 __ B(eq, slow);
230 if (is_strong(strength)) { 233 if (is_strong(strength)) {
231 // Call the runtime on anything that is converted in the semantics, since 234 // Call the runtime on anything that is converted in the semantics, since
232 // we need to throw a TypeError. Smis have already been ruled out. 235 // we need to throw a TypeError. Smis have already been ruled out.
233 __ Cmp(right_type, Operand(HEAP_NUMBER_TYPE)); 236 __ Cmp(right_type, Operand(HEAP_NUMBER_TYPE));
234 __ B(eq, &return_equal); 237 __ B(eq, &return_equal);
235 __ Tst(right_type, Operand(kIsNotStringMask)); 238 __ Tst(right_type, Operand(kIsNotStringMask));
236 __ B(ne, slow); 239 __ B(ne, slow);
237 } 240 }
238 } else if (cond == eq) { 241 } else if (cond == eq) {
239 __ JumpIfHeapNumber(right, &heap_number); 242 __ JumpIfHeapNumber(right, &heap_number);
240 } else { 243 } else {
241 __ JumpIfObjectType(right, right_type, right_type, HEAP_NUMBER_TYPE, 244 __ JumpIfObjectType(right, right_type, right_type, HEAP_NUMBER_TYPE,
242 &heap_number); 245 &heap_number);
243 // Comparing JS objects with <=, >= is complicated. 246 // Comparing JS objects with <=, >= is complicated.
244 __ Cmp(right_type, FIRST_SPEC_OBJECT_TYPE); 247 __ Cmp(right_type, FIRST_SPEC_OBJECT_TYPE);
245 __ B(ge, slow); 248 __ B(ge, slow);
246 // Call runtime on identical symbols since we need to throw a TypeError. 249 // Call runtime on identical symbols since we need to throw a TypeError.
247 __ Cmp(right_type, SYMBOL_TYPE); 250 __ Cmp(right_type, SYMBOL_TYPE);
248 __ B(eq, slow); 251 __ B(eq, slow);
252 // Call runtime on identical SIMD values since we must throw a TypeError.
253 __ Cmp(right_type, FLOAT32X4_TYPE);
254 __ B(eq, slow);
249 if (is_strong(strength)) { 255 if (is_strong(strength)) {
250 // Call the runtime on anything that is converted in the semantics, 256 // Call the runtime on anything that is converted in the semantics,
251 // since we need to throw a TypeError. Smis and heap numbers have 257 // since we need to throw a TypeError. Smis and heap numbers have
252 // already been ruled out. 258 // already been ruled out.
253 __ Tst(right_type, Operand(kIsNotStringMask)); 259 __ Tst(right_type, Operand(kIsNotStringMask));
254 __ B(ne, slow); 260 __ B(ne, slow);
255 } 261 }
256 // Normally here we fall through to return_equal, but undefined is 262 // Normally here we fall through to return_equal, but undefined is
257 // special: (undefined == undefined) == true, but 263 // special: (undefined == undefined) == true, but
258 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 264 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5568 matching lines...) Expand 10 before | Expand all | Expand 10 after
5827 MemOperand(fp, 6 * kPointerSize), NULL); 5833 MemOperand(fp, 6 * kPointerSize), NULL);
5828 } 5834 }
5829 5835
5830 5836
5831 #undef __ 5837 #undef __
5832 5838
5833 } // namespace internal 5839 } // namespace internal
5834 } // namespace v8 5840 } // namespace v8
5835 5841
5836 #endif // V8_TARGET_ARCH_ARM64 5842 #endif // V8_TARGET_ARCH_ARM64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698