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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index cc090d58d5161cc7fa310f34adc25e8c9f40cb98..cbd8fed91475cd70466f696b0e689c223e2f62a0 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -249,6 +249,7 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
// They are both equal and they are not both Smis so both of them are not
// Smis. If it's not a heap number, then return equal.
if (cond == lt || cond == gt) {
+ Label not_simd;
// Call runtime on identical JSObjects.
__ CompareObjectType(r0, r4, r4, FIRST_SPEC_OBJECT_TYPE);
__ b(ge, slow);
@@ -256,8 +257,11 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
__ cmp(r4, Operand(SYMBOL_TYPE));
__ b(eq, slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
- __ cmp(r4, Operand(FLOAT32X4_TYPE));
- __ b(eq, slow);
+ __ cmp(r4, Operand(FIRST_SIMD128_VALUE_TYPE));
+ __ b(lt, &not_simd);
+ __ cmp(r4, Operand(LAST_SIMD128_VALUE_TYPE));
+ __ b(le, slow);
+ __ bind(&not_simd);
if (is_strong(strength)) {
// Call the runtime on anything that is converted in the semantics, since
// we need to throw a TypeError. Smis have already been ruled out.
@@ -271,14 +275,18 @@ static void EmitIdenticalObjectComparison(MacroAssembler* masm, Label* slow,
__ b(eq, &heap_number);
// Comparing JS objects with <=, >= is complicated.
if (cond != eq) {
+ Label not_simd;
__ cmp(r4, Operand(FIRST_SPEC_OBJECT_TYPE));
__ b(ge, slow);
// Call runtime on identical symbols since we need to throw a TypeError.
__ cmp(r4, Operand(SYMBOL_TYPE));
__ b(eq, slow);
// Call runtime on identical SIMD values since we must throw a TypeError.
- __ cmp(r4, Operand(FLOAT32X4_TYPE));
- __ b(eq, slow);
+ __ cmp(r4, Operand(FIRST_SIMD128_VALUE_TYPE));
+ __ b(lt, &not_simd);
+ __ cmp(r4, Operand(LAST_SIMD128_VALUE_TYPE));
+ __ b(le, slow);
+ __ bind(&not_simd);
if (is_strong(strength)) {
// Call the runtime on anything that is converted in the semantics,
// since we need to throw a TypeError. Smis and heap numbers have
« no previous file with comments | « include/v8.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | src/harmony-simd.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698