Commit c52d66d7 authored by fbarchard@google.com's avatar fbarchard@google.com

Detect asimd as same as Neon for Arm features. Used on Juno aarch64 linux.

BUG=361
TESTED=.\libyuv_unittest --gtest_filter=libyuvTest.TestLinuxNeon
R=tpsiaki@google.com

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

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1088 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent 9e430982
Name: libyuv Name: libyuv
URL: http://code.google.com/p/libyuv/ URL: http://code.google.com/p/libyuv/
Version: 1086 Version: 1088
License: BSD License: BSD
License File: LICENSE License File: LICENSE
......
...@@ -11,6 +11,6 @@ ...@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT #ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 1086 #define LIBYUV_VERSION 1088
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT #endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
...@@ -135,6 +135,12 @@ int ArmCpuCaps(const char* cpuinfo_name) { ...@@ -135,6 +135,12 @@ int ArmCpuCaps(const char* cpuinfo_name) {
fclose(f); fclose(f);
return kCpuHasNEON; return kCpuHasNEON;
} }
// aarch64 uses asimd for Neon.
p = strstr(cpuinfo_line, " asimd");
if (p && (p[6] == ' ' || p[6] == '\n')) {
fclose(f);
return kCpuHasNEON;
}
} }
} }
fclose(f); fclose(f);
......
...@@ -126,6 +126,7 @@ TEST_F(libyuvTest, TestLinuxNeon) { ...@@ -126,6 +126,7 @@ TEST_F(libyuvTest, TestLinuxNeon) {
if (FileExists("../../unit_test/testdata/arm_v7.txt")) { if (FileExists("../../unit_test/testdata/arm_v7.txt")) {
EXPECT_EQ(0, ArmCpuCaps("../../unit_test/testdata/arm_v7.txt")); EXPECT_EQ(0, ArmCpuCaps("../../unit_test/testdata/arm_v7.txt"));
EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/tegra3.txt")); EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/tegra3.txt"));
EXPECT_EQ(kCpuHasNEON, ArmCpuCaps("../../unit_test/testdata/juno.txt"));
} else { } else {
printf("WARNING: unable to load \"../../unit_test/testdata/arm_v7.txt\"\n"); printf("WARNING: unable to load \"../../unit_test/testdata/arm_v7.txt\"\n");
} }
......
Processor : AArch64 Processor rev 0 (aarch64)
processor : 0
processor : 1
processor : 2
processor : 3
processor : 4
processor : 5
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32
CPU implementer : 0x41
CPU architecture: AArch64
CPU variant : 0x0
CPU part : 0xd07
CPU revision : 0
Hardware : Juno
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment