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

Side by Side Diff: src/arm/code-stubs-arm.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 | « include/v8.h ('k') | src/arm/lithium-codegen-arm.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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 Label not_identical; 242 Label not_identical;
243 Label heap_number, return_equal; 243 Label heap_number, return_equal;
244 __ cmp(r0, r1); 244 __ cmp(r0, r1);
245 __ b(ne, &not_identical); 245 __ b(ne, &not_identical);
246 246
247 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), 247 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
248 // so we do the second best thing - test it ourselves. 248 // so we do the second best thing - test it ourselves.
249 // They are both equal and they are not both Smis so both of them are not 249 // They are both equal and they are not both Smis so both of them are not
250 // Smis. If it's not a heap number, then return equal. 250 // Smis. If it's not a heap number, then return equal.
251 if (cond == lt || cond == gt) { 251 if (cond == lt || cond == gt) {
252 Label not_simd;
252 // Call runtime on identical JSObjects. 253 // Call runtime on identical JSObjects.
253 __ CompareObjectType(r0, r4, r4, FIRST_SPEC_OBJECT_TYPE); 254 __ CompareObjectType(r0, r4, r4, FIRST_SPEC_OBJECT_TYPE);
254 __ b(ge, slow); 255 __ b(ge, slow);
255 // Call runtime on identical symbols since we need to throw a TypeError. 256 // Call runtime on identical symbols since we need to throw a TypeError.
256 __ cmp(r4, Operand(SYMBOL_TYPE)); 257 __ cmp(r4, Operand(SYMBOL_TYPE));
257 __ b(eq, slow); 258 __ b(eq, slow);
258 // Call runtime on identical SIMD values since we must throw a TypeError. 259 // Call runtime on identical SIMD values since we must throw a TypeError.
259 __ cmp(r4, Operand(FLOAT32X4_TYPE)); 260 __ cmp(r4, Operand(FIRST_SIMD_VALUE_TYPE));
260 __ b(eq, slow); 261 __ b(lt, &not_simd);
262 __ cmp(r4, Operand(LAST_SIMD_VALUE_TYPE));
263 __ b(le, slow);
264 __ bind(&not_simd);
261 if (is_strong(strength)) { 265 if (is_strong(strength)) {
262 // Call the runtime on anything that is converted in the semantics, since 266 // Call the runtime on anything that is converted in the semantics, since
263 // we need to throw a TypeError. Smis have already been ruled out. 267 // we need to throw a TypeError. Smis have already been ruled out.
264 __ cmp(r4, Operand(HEAP_NUMBER_TYPE)); 268 __ cmp(r4, Operand(HEAP_NUMBER_TYPE));
265 __ b(eq, &return_equal); 269 __ b(eq, &return_equal);
266 __ tst(r4, Operand(kIsNotStringMask)); 270 __ tst(r4, Operand(kIsNotStringMask));
267 __ b(ne, slow); 271 __ b(ne, slow);
268 } 272 }
269 } else { 273 } else {
270 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE); 274 __ CompareObjectType(r0, r4, r4, HEAP_NUMBER_TYPE);
271 __ b(eq, &heap_number); 275 __ b(eq, &heap_number);
272 // Comparing JS objects with <=, >= is complicated. 276 // Comparing JS objects with <=, >= is complicated.
273 if (cond != eq) { 277 if (cond != eq) {
278 Label not_simd;
274 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE)); 279 __ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE));
275 __ b(ge, slow); 280 __ b(ge, slow);
276 // Call runtime on identical symbols since we need to throw a TypeError. 281 // Call runtime on identical symbols since we need to throw a TypeError.
277 __ cmp(r4, Operand(SYMBOL_TYPE)); 282 __ cmp(r4, Operand(SYMBOL_TYPE));
278 __ b(eq, slow); 283 __ b(eq, slow);
279 // Call runtime on identical SIMD values since we must throw a TypeError. 284 // Call runtime on identical SIMD values since we must throw a TypeError.
280 __ cmp(r4, Operand(FLOAT32X4_TYPE)); 285 __ cmp(r4, Operand(FIRST_SIMD_VALUE_TYPE));
281 __ b(eq, slow); 286 __ b(lt, &not_simd);
287 __ cmp(r4, Operand(LAST_SIMD_VALUE_TYPE));
288 __ b(le, slow);
289 __ bind(&not_simd);
282 if (is_strong(strength)) { 290 if (is_strong(strength)) {
283 // Call the runtime on anything that is converted in the semantics, 291 // Call the runtime on anything that is converted in the semantics,
284 // since we need to throw a TypeError. Smis and heap numbers have 292 // since we need to throw a TypeError. Smis and heap numbers have
285 // already been ruled out. 293 // already been ruled out.
286 __ tst(r4, Operand(kIsNotStringMask)); 294 __ tst(r4, Operand(kIsNotStringMask));
287 __ b(ne, slow); 295 __ b(ne, slow);
288 } 296 }
289 // Normally here we fall through to return_equal, but undefined is 297 // Normally here we fall through to return_equal, but undefined is
290 // special: (undefined == undefined) == true, but 298 // special: (undefined == undefined) == true, but
291 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 299 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5234 matching lines...) Expand 10 before | Expand all | Expand 10 after
5526 MemOperand(fp, 6 * kPointerSize), NULL); 5534 MemOperand(fp, 6 * kPointerSize), NULL);
5527 } 5535 }
5528 5536
5529 5537
5530 #undef __ 5538 #undef __
5531 5539
5532 } // namespace internal 5540 } // namespace internal
5533 } // namespace v8 5541 } // namespace v8
5534 5542
5535 #endif // V8_TARGET_ARCH_ARM 5543 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698