-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-11-06
-
--- a/HerculesCompiler/libpremnotify/libpremnotify-cpu.c
+++ b/HerculesCompiler/libpremnotify/libpremnotify-cpu.c
-@@ -141,16 +141,20 @@
-
+@@ -109,12 +109,19 @@
// This function should prefetch the provided pointer.
--void __prem_prefetch(void * ptr, int isRead) {
-- //if(isRead)
-- //__asm__ __volatile__("prfm pldl2keep, %a0\n" : : "p" (ptr));
-- //else
-- //__asm__ __volatile__("prfm pstl2keep, %a0\n" : : "p" (ptr));
-+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));
// This function should evict the provided pointer from the cache.
void __prem_evict(void * ptr) {
-- //__asm__ __volatile__("dc civac, %0\n" : : "r" (ptr) : "memory");
+-
+#if defined(__aarch64__)
+ __asm__ __volatile__("dc civac, %0\n" : : "r" (ptr) : "memory");
+#endif
}
-
+