[PATCH] D76958: [test-suite] Add support for Hexagon
Brian Cain via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 31 21:27:16 PDT 2020
bcain updated this revision to Diff 254084.
bcain added a comment.
Accidentally omitted context lines w/previous patch
Repository:
rT test-suite
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76958/new/
https://reviews.llvm.org/D76958
Files:
MicroBenchmarks/libs/benchmark-1.3.0/src/cycleclock.h
MultiSource/Benchmarks/CMakeLists.txt
cmake/modules/DetectArchitecture.c
Index: cmake/modules/DetectArchitecture.c
===================================================================
--- cmake/modules/DetectArchitecture.c
+++ cmake/modules/DetectArchitecture.c
@@ -22,6 +22,8 @@
const char *str = "ARCHITECTURE IS XCore";
#elif defined(__i386__) || defined(__x86_64__)
const char *str = "ARCHITECTURE IS x86";
+#elif defined(__hexagon__)
+const char *str = "ARCHITECTURE IS Hexagon";
#endif
int main(int argc, char **argv) {
Index: MultiSource/Benchmarks/CMakeLists.txt
===================================================================
--- MultiSource/Benchmarks/CMakeLists.txt
+++ MultiSource/Benchmarks/CMakeLists.txt
@@ -6,7 +6,6 @@
add_subdirectory(FreeBench)
add_subdirectory(MallocBench)
add_subdirectory(McCat)
-add_subdirectory(MiBench)
add_subdirectory(NPB-serial)
add_subdirectory(Olden)
add_subdirectory(Prolangs-C)
@@ -18,7 +17,6 @@
add_subdirectory(mediabench)
add_subdirectory(nbench)
add_subdirectory(sim)
-add_subdirectory(DOE-ProxyApps-C)
add_subdirectory(Rodinia)
if((NOT "${TARGET_OS}" STREQUAL "Darwin") OR (NOT "${ARCH}" STREQUAL "ARM"))
@@ -27,7 +25,11 @@
add_subdirectory(Prolangs-C++)
add_subdirectory(Bullet)
add_subdirectory(tramp3d-v4)
-add_subdirectory(DOE-ProxyApps-C++)
+if(NOT "${ARCH}" STREQUAL "Hexagon")
+ add_subdirectory(DOE-ProxyApps-C++)
+ add_subdirectory(DOE-ProxyApps-C)
+ add_subdirectory(MiBench)
+endif()
if(NOT "${ARCH}" STREQUAL "XCore")
add_subdirectory(7zip)
add_subdirectory(PAQ8p)
Index: MicroBenchmarks/libs/benchmark-1.3.0/src/cycleclock.h
===================================================================
--- MicroBenchmarks/libs/benchmark-1.3.0/src/cycleclock.h
+++ MicroBenchmarks/libs/benchmark-1.3.0/src/cycleclock.h
@@ -82,6 +82,15 @@
uint64_t low, high;
__asm__ volatile("rdtsc" : "=a"(low), "=d"(high));
return (high << 32) | low;
+#elif defined(__hexagon__)
+ uint64_t retv;
+
+ asm volatile ("r0=#0x52; trap0(#0); %0=r1:0;"
+ :"=r"(retv) /* output */
+ : /* no inputs */
+ :"r0", "r1" /* clobbered register */
+ );
+ return(retv);
#elif defined(__powerpc__) || defined(__ppc__)
// This returns a time-base, which is not always precisely a cycle-count.
int64_t tbl, tbu0, tbu1;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76958.254084.patch
Type: text/x-patch
Size: 2284 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200401/339f6e08/attachment.bin>
More information about the llvm-commits
mailing list