]> rtime.felk.cvut.cz Git - hercules2020/hercules-compiler.git/commitdiff
Update configuration for the new compiler version and add a new libpremnotify patch
authorMichal Sojka <michal.sojka@cvut.cz>
Tue, 4 Sep 2018 08:25:15 +0000 (10:25 +0200)
committerMichal Sojka <michal.sojka@cvut.cz>
Tue, 4 Sep 2018 08:25:15 +0000 (10:25 +0200)
debian/patches/Guard-architecture-dependent-code-with-#ifdefs.patch [new file with mode: 0644]
debian/patches/configuration.patch
debian/patches/series

diff --git a/debian/patches/Guard-architecture-dependent-code-with-#ifdefs.patch b/debian/patches/Guard-architecture-dependent-code-with-#ifdefs.patch
new file mode 100644 (file)
index 0000000..5e6bdbb
--- /dev/null
@@ -0,0 +1,41 @@
+Description: libpremnotify-cpu: Guard architecture dependent code with #ifdefs
+ This allows compiling "placeholder" version of the library for other
+ architecures.
+ .
+Author: Michal Sojka <michal.sojka@cvut.cz>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: https://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: 2018-09-04
+
+--- hercules-compiler-2018.7.orig/HerculesCompiler/libpremnotify/libpremnotify-cpu.c
++++ hercules-compiler-2018.7/HerculesCompiler/libpremnotify/libpremnotify-cpu.c
+@@ -44,13 +44,17 @@ void __hw_data_cache_flush_stub() {
+ }
+-void __prem_prefetch(void * ptr, int isRead) { 
++void __prem_prefetch(void * ptr, int isRead) {
++#if defined(__aarch64__)
+     if(isRead) 
+         __asm__ __volatile__("prfm pldl2keep, %a0\n" : : "p" (ptr)); 
+     else 
+-        __asm__ __volatile__("prfm pstl2keep, %a0\n" : : "p" (ptr)); 
++        __asm__ __volatile__("prfm pstl2keep, %a0\n" : : "p" (ptr));
++#endif
+ }
+ void __prem_evict(void * ptr) {
++#if defined(__aarch64__)
+     __asm__ __volatile__("dc civac, %0\n" : : "r" (ptr) : "memory");
++#endif
+ }
index ec8c967d1d7dcf52f8ffbf10fad303d01f7a0ad9..cbf9f164c1bb024a96fef95e9b2ed576c7c2b683 100644 (file)
@@ -4,7 +4,7 @@ Index: hercules-compiler/HerculesCompiler/llvm-passes/include/Config/Options.h
 ===================================================================
 --- hercules-compiler.orig/HerculesCompiler/llvm-passes/include/Config/Options.h
 +++ hercules-compiler/HerculesCompiler/llvm-passes/include/Config/Options.h
-@@ -41,11 +41,11 @@
+@@ -41,17 +41,17 @@
  //#define NEVER_INLINE_SYNC
  
  // Use hardware cache prefetches in Specialized function, in place of SPM-based.
@@ -18,6 +18,13 @@ Index: hercules-compiler/HerculesCompiler/llvm-passes/include/Config/Options.h
  //#define USE_HW_CACHES_INLINEPTX_PREFETCH
  //#define USE_HW_CACHES_LIBCALL
  //#define USE_HW_CACHES_VOLALOAD
+ // Use a single writeback function when using caches
+-//#define USE_HW_CACHES_SINGLEWRITEBACK
++#define USE_HW_CACHES_SINGLEWRITEBACK
+ //#define USE_HW_CACHES_INDWRITEBACK_LIBCALL
+ //#define USE_HW_CACHES_INDWRITEBACK_INLINE
 Index: hercules-compiler/clang/lib/Driver/ToolChains.cpp
 ===================================================================
 --- hercules-compiler.orig/clang/lib/Driver/ToolChains.cpp
index 284ab08e8df346153a222d76ab6fe3e3a30aa527..3825761c6a5221dc8d3b19a25edaa9e015523783 100644 (file)
@@ -1 +1,2 @@
 configuration.patch
+Guard-architecture-dependent-code-with-#ifdefs.patch