1 Description: libpremnotify-cpu: Guard architecture dependent code with #ifdefs
2 This allows compiling "placeholder" version of the library for other
5 Author: Michal Sojka <michal.sojka@cvut.cz>
8 The information above should follow the Patch Tagging Guidelines, please
9 checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
10 are templates for supplementary fields that you might want to add:
12 Origin: <vendor|upstream|other>, <url of original patch>
13 Bug: <url in upstream bugtracker>
14 Bug-Debian: https://bugs.debian.org/<bugnumber>
15 Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
16 Forwarded: <no|not-needed|url proving that it has been forwarded>
17 Reviewed-By: <name and email of someone who approved the patch>
18 Last-Update: 2018-11-06
20 --- a/HerculesCompiler/libpremnotify/libpremnotify-cpu.c
21 +++ b/HerculesCompiler/libpremnotify/libpremnotify-cpu.c
25 // This function should prefetch the provided pointer.
26 -void __prem_prefetch(void * ptr, int isRead) {
28 - //__asm__ __volatile__("prfm pldl2keep, %a0\n" : : "p" (ptr));
30 - //__asm__ __volatile__("prfm pstl2keep, %a0\n" : : "p" (ptr));
31 +void __prem_prefetch(void * ptr, int isRead) {
32 +#if defined(__aarch64__)
34 + __asm__ __volatile__("prfm pldl2keep, %a0\n" : : "p" (ptr));
36 + __asm__ __volatile__("prfm pstl2keep, %a0\n" : : "p" (ptr));
41 // This function should evict the provided pointer from the cache.
42 void __prem_evict(void * ptr) {
43 - //__asm__ __volatile__("dc civac, %0\n" : : "r" (ptr) : "memory");
44 +#if defined(__aarch64__)
45 + __asm__ __volatile__("dc civac, %0\n" : : "r" (ptr) : "memory");