Bug 1516700 - ARM64: Use SwitchTableType::OutOfLine. r=nbp
authorSean Stangl <sean.stangl@gmail.com>
Fri, 28 Dec 2018 14:23:00 +0200
changeset 509415 72902d6e1c3feadefeee27fc2bb91f53864a5a9b
parent 509414 6a3570bb4ae04c20679bc273314f71335a8f6b36
child 509416 7b71897ff6be49225613180bac536673a03bb7c0
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1516700
milestone66.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1516700 - ARM64: Use SwitchTableType::OutOfLine. r=nbp
js/src/jit/CodeGenerator.cpp
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -11643,17 +11643,17 @@ class OutOfLineSwitch : public OutOfLine
     Register base;
     if (tableType == SwitchTableType::Inline) {
 #if defined(JS_CODEGEN_ARM)
       base = ::js::jit::pc;
 #else
       MOZ_CRASH("NYI: SwitchTableType::Inline");
 #endif
     } else {
-#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)
+#if defined(JS_CODEGEN_ARM)
       MOZ_CRASH("NYI: SwitchTableType::OutOfLine");
 #else
       masm.mov(start(), temp);
       base = temp;
 #endif
     }
     BaseIndex jumpTarget(base, index, ScalePointer);
     masm.branchToComputedAddress(jumpTarget);
@@ -11678,17 +11678,17 @@ class OutOfLineSwitch : public OutOfLine
   void setOutOfLine() { isOutOfLine_ = true; }
 };
 
 template <SwitchTableType tableType>
 void CodeGenerator::visitOutOfLineSwitch(
     OutOfLineSwitch<tableType>* jumpTable) {
   jumpTable->setOutOfLine();
   if (tableType == SwitchTableType::OutOfLine) {
-#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)
+#if defined(JS_CODEGEN_ARM)
     MOZ_CRASH("NYI: SwitchTableType::OutOfLine");
 #elif defined(JS_CODEGEN_NONE)
     MOZ_CRASH();
 #else
     masm.haltingAlign(sizeof(void*));
     masm.bind(jumpTable->start());
     masm.addCodeLabel(*jumpTable->start());
 #endif
@@ -11724,26 +11724,26 @@ void CodeGenerator::visitLoadElementFrom
   FloatRegister tempD = ToFloatRegister(lir->tempD());
   ValueOperand out = ToOutValue(lir);
 
   // For each element, load it and box it.
   MArgumentState* array = lir->array()->toArgumentState();
   Label join;
 
   // Jump to the code which is loading the element, based on its index.
-#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)
+#if defined(JS_CODEGEN_ARM)
   auto* jumpTable =
       new (alloc()) OutOfLineSwitch<SwitchTableType::Inline>(alloc());
 #else
   auto* jumpTable =
       new (alloc()) OutOfLineSwitch<SwitchTableType::OutOfLine>(alloc());
 #endif
 
   {
-#if defined(JS_CODEGEN_ARM) || defined(JS_CODEGEN_ARM64)
+#if defined(JS_CODEGEN_ARM)
     // Inhibit pools within the following sequence because we are indexing into
     // a pc relative table. The region will have one instruction for ma_ldr, one
     // for breakpoint, and each table case takes one word.
     AutoForbidPools afp(&masm, 1 + 1 + array->numElements());
 #endif
     jumpTable->jumpToCodeEntries(masm, index, temp0);
 
     // Add table entries if the table is inlined.