Revert 8632 "Enable isac NEON building on Aarch64"

Breaks Chromium audio tests on Nexus 9.
http://build.chromium.org/p/chromium.webrtc.fyi/builders/Android%20Tests%20%28dbg%29%20%28L%20Nexus9%29/builds/1152/steps/content_browsertests/logs/stdio

It also actually broke already on our android_arm64 trybot in the CL:
http://build.chromium.org/p/tryserver.webrtc/builders/android_arm64/builds/3282
but I failed to double-check that (I guess I assumed it was flakiness since
that bot has been flaking a lot lately).

> Enable isac NEON building on Aarch64
> 
> Passed building isac_neon and modules_unittests on Android ARM64 and ARMv7.
> Passed modules_unittests with following filters:
>   --gtest_filter=FiltersTest*
>   --gtest_filter=LpcMaskingModelTest*
>   --gtest_filter=TransformTest*
>   --gtest_filter=FilterBanksTest*
> 
> WebRtcIsacfix_CalculateResidualEnergyNeon is not enabled due to Issue 4224.
> 
> BUG=4002
> R=andrew@webrtc.org, jridges@masque.com, kjellander@webrtc.org
> 
> Review URL: https://webrtc-codereview.appspot.com/39979004
> 
> Patch from Zhongwei Yao <zhongwei.yao@arm.com>.

TBR=zhongwei.yao@arm.com, andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/45559004

Cr-Commit-Position: refs/heads/master@{#8649}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8649 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/modules/audio_coding/BUILD.gn b/webrtc/modules/audio_coding/BUILD.gn
index 0832d6f..6e280da 100644
--- a/webrtc/modules/audio_coding/BUILD.gn
+++ b/webrtc/modules/audio_coding/BUILD.gn
@@ -532,10 +532,6 @@
     "../../system_wrappers",
   ]
 
-  if (cpu_arch == "arm64") {
-    deps += [ ":isac_neon" ]
-  }
-
   if (rtc_build_armv7_neon) {
     deps += [ ":isac_neon" ]
 
@@ -586,39 +582,16 @@
   }
 }
 
-if (rtc_build_armv7_neon || cpu_arch == "arm64") {
+if (rtc_build_armv7_neon) {
   source_set("isac_neon") {
-    sources = [ "codecs/isac/fix/source/entropy_coding_neon.c" ]
-
-    if (rtc_build_armv7_neon) {
-      sources += [
-        "codecs/isac/fix/source/filterbanks_neon.S",
-        "codecs/isac/fix/source/filters_neon.S",
-        "codecs/isac/fix/source/lattice_neon.S",
-        "codecs/isac/fix/source/lpc_masking_model_neon.S",
-        "codecs/isac/fix/source/transform_neon.S",
-      ]
-
-      # Enable compilation for the ARM v7 Neon instruction set. This is needed
-      # since //build/config/arm.gni only enables Neon for iOS, not Android.
-      # This provides the same functionality as webrtc/build/arm_neon.gypi.
-      # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
-      # //build/config/arm.gni instead, to reduce code duplication.
-      # Remove the -mfpu=vfpv3-d16 cflag.
-      configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
-      cflags = [
-        "-mfpu=neon",
-      ]
-    }
-
-    if (cpu_arch == "arm64") {
-      sources += [
-        "codecs/isac/fix/source/filterbanks_neon.c",
-        "codecs/isac/fix/source/filters_neon.c",
-        "codecs/isac/fix/source/lattice_neon.c",
-        "codecs/isac/fix/source/transform_neon.c",
-      ]
-    }
+    sources = [
+      "codecs/isac/fix/source/entropy_coding_neon.c",
+      "codecs/isac/fix/source/filterbanks_neon.S",
+      "codecs/isac/fix/source/filters_neon.S",
+      "codecs/isac/fix/source/lattice_neon.S",
+      "codecs/isac/fix/source/lpc_masking_model_neon.S",
+      "codecs/isac/fix/source/transform_neon.S",
+    ]
 
     include_dirs = [
       "../../..",
@@ -632,6 +605,17 @@
       ]
     }
 
+    # Enable compilation for the ARM v7 Neon instruction set. This is needed
+    # since //build/config/arm.gni only enables Neon for iOS, not Android.
+    # This provides the same functionality as webrtc/build/arm_neon.gypi.
+    # TODO(kjellander): Investigate if this can be moved into webrtc.gni or
+    # //build/config/arm.gni instead, to reduce code duplication.
+    # Remove the -mfpu=vfpv3-d16 cflag.
+    configs -= [ "//build/config/compiler:compiler_arm_fpu" ]
+    cflags = [
+      "-mfpu=neon",
+    ]
+
     configs += [ "../..:common_config" ]
     public_configs = [ "../..:common_inherited_config" ]
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h
index cf1266a..488ee2e 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/codec.h
@@ -90,8 +90,7 @@
                               int32_t* outre1Q16,
                               int32_t* outre2Q16);
 
-#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON) || \
-  (defined WEBRTC_ARCH_ARM64_NEON)
+#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON)
 void WebRtcIsacfix_Time2SpecNeon(int16_t* inre1Q9,
                                  int16_t* inre2Q9,
                                  int16_t* outre,
@@ -175,8 +174,7 @@
                                  int32_t* ptr1,
                                  int32_t* ptr2);
 
-#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON) || \
-  (defined WEBRTC_ARCH_ARM64_NEON)
+#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON)
 int WebRtcIsacfix_AutocorrNeon(int32_t* __restrict r,
                                const int16_t* __restrict x,
                                int16_t N,
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
index 63fe61f..741646f 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/entropy_coding.h
@@ -147,8 +147,7 @@
                                    const int matrix0_index_factor,
                                    const int matrix0_index_step);
 
-#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON) || \
-  (defined WEBRTC_ARCH_ARM64_NEON)
+#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON)
 void WebRtcIsacfix_MatrixProduct1Neon(const int16_t matrix0[],
                                       const int32_t matrix1[],
                                       int32_t matrix_product[],
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h
index 5f4c7be..2aa587f 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/filterbank_internal.h
@@ -60,8 +60,7 @@
    int32_t *filter_state_ch1,
    int32_t *filter_state_ch2);
 
-#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON) || \
-  (defined WEBRTC_ARCH_ARM64_NEON)
+#if (defined WEBRTC_DETECT_ARM_NEON) || (defined WEBRTC_ARCH_ARM_NEON)
 void WebRtcIsacfix_AllpassFilter2FixDec16Neon(
    int16_t *data_ch1,
    int16_t *data_ch2,
diff --git a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c
index 50d8638..922e029 100644
--- a/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c
+++ b/webrtc/modules/audio_coding/codecs/isac/fix/source/isacfix.c
@@ -198,17 +198,14 @@
  * This function initializes function pointers for ARM Neon platform.
  */
 
-#if (defined WEBRTC_DETECT_ARM_NEON || defined WEBRTC_ARCH_ARM_NEON) || \
-  (defined WEBRTC_ARCH_ARM64_NEON)
+#if (defined WEBRTC_DETECT_ARM_NEON || defined WEBRTC_ARCH_ARM_NEON)
 static void WebRtcIsacfix_InitNeon(void) {
   WebRtcIsacfix_AutocorrFix = WebRtcIsacfix_AutocorrNeon;
   WebRtcIsacfix_FilterMaLoopFix = WebRtcIsacfix_FilterMaLoopNeon;
   WebRtcIsacfix_Spec2Time = WebRtcIsacfix_Spec2TimeNeon;
   WebRtcIsacfix_Time2Spec = WebRtcIsacfix_Time2SpecNeon;
-#if !(defined WEBRTC_ARCH_ARM64_NEON)
   WebRtcIsacfix_CalculateResidualEnergy =
       WebRtcIsacfix_CalculateResidualEnergyNeon;
-#endif
   WebRtcIsacfix_AllpassFilter2FixDec16 =
       WebRtcIsacfix_AllpassFilter2FixDec16Neon;
   WebRtcIsacfix_MatrixProduct1 = WebRtcIsacfix_MatrixProduct1Neon;
@@ -337,7 +334,7 @@
   if ((WebRtc_GetCPUFeaturesARM() & kCPUFeatureNEON) != 0) {
     WebRtcIsacfix_InitNeon();
   }
-#elif defined(WEBRTC_ARCH_ARM_NEON) || defined(WEBRTC_ARCH_ARM64_NEON)
+#elif defined(WEBRTC_ARCH_ARM_NEON)
   WebRtcIsacfix_InitNeon();
 #endif
 
diff --git a/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi b/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi
index 9957dfd..a6a7f97 100644
--- a/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi
+++ b/webrtc/modules/audio_coding/codecs/isac/isacfix.gypi
@@ -95,9 +95,6 @@
             }],
           ],
         }],
-        ['target_arch=="arm64"', {
-          'dependencies': ['isac_neon', ],
-        }],
         ['target_arch=="mipsel" and mips_arch_variant!="r6" and android_webview_build==0', {
           'sources': [
             'fix/source/entropy_coding_mips.c',
@@ -131,7 +128,7 @@
     },
   ],
   'conditions': [
-    ['target_arch=="arm" and arm_version>=7 or target_arch=="arm64"', {
+    ['target_arch=="arm" and arm_version>=7', {
       'targets': [
         {
           'target_name': 'isac_neon',
@@ -159,21 +156,6 @@
                 '-ffat-lto-objects',
               ],
             }],
-            ['target_arch=="arm64"', {
-              'sources!': [
-                'fix/source/filterbanks_neon.S',
-                'fix/source/filters_neon.S',
-                'fix/source/lattice_neon.S',
-                'fix/source/lpc_masking_model_neon.S',
-                'fix/source/transform_neon.S',
-              ],
-              'sources': [
-                'fix/source/filterbanks_neon.c',
-                'fix/source/filters_neon.c',
-                'fix/source/lattice_neon.c',
-                'fix/source/transform_neon.c',
-              ],
-            }]
           ],
         },
       ],