search for: __clear_cache

Displaying 20 results from an estimated 23 matches for "__clear_cache".

2009 Sep 28
1
[LLVMdev] __clear_cache on ARM
Hello, I've just found that the current SVN trunk has some toolchain dependencies on ARM cross compiling. i.g. the __clear_cache in lib/System/Memory.cpp is not defined in my toolchain (codesourcery 2007q3, gcc version 4.2.1). What is the official(?) toolchain version used for ARM cross-compilation? Best, Hyok -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/...
2010 May 13
1
[LLVMdev] libSystem, __clear_cache(), FreeBSD and ARM
Hi folks, I just tried to build LLVM on FreeBSD/arm. It looks like libSystem doesn't build and requires the following hack: --- lib/System/Memory.cpp +++ lib/System/Memory.cpp @@ -61,7 +61,7 @@ for (intptr_t Line = StartLine; Line < EndLine; Line += LineSize) asm volatile("icbi 0, %0" : : "r"(Line)); asm volatile("isync"); -# elif defined(__arm__)
2012 Jan 07
0
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
Hi Ruben, > I see I missed some curly braces. I also modified spacing a tiny bit. Doesn't seem so. E.g. you have: + if ( !VirtualQuery(addr, &b, sizeof(b)) ) + exit(1); + if( !VirtualProtect(b.BaseAddress, b.RegionSize, PAGE_EXECUTE_READWRITE, &b.Protect) ) Add space after "if". Do not put spaces after "(" and before ")". Same for other
2012 Jan 07
2
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...============================================= --- test/Unit/clear_cache_test.c (revision 147738) +++ test/Unit/clear_cache_test.c (working copy) @@ -11,11 +11,20 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#if defined(_WIN32) +#include <windows.h> +void __clear_cache(void* start, void* end) +{ + if (!FlushInstructionCache(GetCurrentProcess(), start, end-start)) + exit(1); +} +#else #include <sys/mman.h> +extern void __clear_cache(void* start, void* end); +#endif -extern void __clear_cache(void* start, void* end); typedef int (*pfunc)(v...
2012 Jan 07
3
[LLVMdev] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...============================================= --- test/Unit/clear_cache_test.c (revision 147731) +++ test/Unit/clear_cache_test.c (working copy) @@ -11,12 +11,20 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#if defined(_WIN32) +#include <windows.h> +void __clear_cache(void* start, void* end) +{ + if( !FlushInstructionCache(GetCurrentProcess(), start, end-start) ) + exit(1); +} +#else #include <sys/mman.h> +extern void __clear_cache(void* start, void* end); +#endif -extern void __clear_cache(void* start, void* end); - typedef int (*pfunc)(...
2013 May 24
0
[LLVMdev] ARM __clear_cache fix for compiler-rt when compiling Python
...=== --- contrib/compiler-rt/lib/clear_cache.c (revision 250739) +++ contrib/compiler-rt/lib/clear_cache.c (working copy) @@ -21,6 +21,23 @@ * specified range. */ +/* python ffi routines call it too */ + +#if defined(__arm__) && defined(__clang__) +#pragma redefine_extname __clear_cache_c __clear_cache +void __clear_cache_c(void* start, void* end) +{ + extern int sysarch(int number, void *args); + struct + { + unsigned int addr; + int len; + } s; + s.addr = (unsigned int)(start) & ~0x1f; + s.len = (int)((((unsigned int)end + 0x1f) &am...
2009 Nov 16
1
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
...with armgcc-4.3.3? Probably not needed. > > If i want to use arm-toolchain-4.2.1 , what should i do for clearing > the instruction cache call in lib/System/Memory.cpp? You have to implement it using inline assembler for GCC 4.2.1 and below to work. You can check the gcc sources to see how __clear_cache got implemeted in gcc 4.3.3 or check the arm reference manual (ARM ARM): http://www.arm.com/miscPDFs/14128.pdf Cheers Xerxes
2011 Jun 22
1
[LLVMdev] __clear_cache on arm
Hi, What is the reason for excluding clear_cache.c from ARM builds of compiler_rt? Where __clear_cache is defined in that case? Thanks, Damjan
2014 Mar 14
2
[LLVMdev] __builtin___clear_cache
On 14 March 2014 16:34, JF Bastien <jfb at google.com> wrote: > How does this overlap with: > > http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140310/thread.html#208333 The builtin was created to call __clear_cache() on platforms that need it (like ARM and MIPS), but to be ignored on others (like x86_64). This builtin should call __clear_cache() from whatever library is available at the moment, so there is no overlap, just supporting the GCC builtin to avoid calling a noop function when not needed. > Th...
2018 Apr 15
1
__clear_cache / clear_cache.c
projects/compiler-rt/lib/builtins/clear_cache.c I suggest two small changes here. 1. Mark it however required to avoid inlining, i.e. for the x86/amd64 case. Control transfer is required. I realize it is likely anyway, you aren't likely to "fall from" the caller into the code. 2. #elif defined(_WIN32) && (defined(__arm__) || defined(__aarch64__)) be changed to just: #elif
2014 Mar 14
2
[LLVMdev] __builtin___clear_cache
...http://llvm.org/bugs/show_bug.cgi?id=19142 I need an LLVM intrinsic to communicate the need to lower the builtin wither to noop or a call or even a sequence of instructions. I thought about: void @llvm.clear_cache(i8 * begin, i8 * end) to simulate precisely GCC's builtin: void __builtin___clear_cache (char *begin, char *end) which will be, by default, nothing. On ARM and MIPS, it'll call __clear_cache. Is that a good plan? cheers, --renato
2009 Nov 09
1
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue
...emory.cpp for Release build > /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp: In > static member function ‘static void > llvm::sys::Memory::InvalidateInstructionCache(const void*, size_t)’: > /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp:67: > error: ‘__clear_cache’ was not declared in this scope > make[1]: *** > [/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System/Release/Memory.o] > Error 1 > make[1]: Leaving directory > `/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System' > make: *** [all] Error 1// > > /i can able to com...
2012 Jan 07
1
[LLVMdev] [llvm-commits] [PATCH][Compiler-rt] Windows implementation of mmap functionality in clear_cache_test and enable_execute_stack_test
...============================================= --- test/Unit/clear_cache_test.c (revision 147731) +++ test/Unit/clear_cache_test.c (working copy) @@ -11,11 +11,20 @@ #include <stdio.h> #include <string.h> #include <stdint.h> +#if defined(_WIN32) +#include <windows.h> +void __clear_cache(void* start, void* end) +{ + if( !FlushInstructionCache(GetCurrentProcess(), start, end-start) ) + exit(1); +} +#else #include <sys/mman.h> +extern void __clear_cache(void* start, void* end); +#endif -extern void __clear_cache(void* start, void* end); typedef int (*pfunc)(...
2009 Nov 13
0
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue
...ld > > /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp: In > > static member function ‘static void > > llvm::sys::Memory::InvalidateInstructionCache(const void*, size_t)’: > > /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp:67: > > error: ‘__clear_cache’ was not declared in this scope > > make[1]: *** > > [/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System/Release/Memory.o] > > Error 1 > > make[1]: Leaving directory > > `/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System' > > make: *** [all] Error 1/...
2009 Nov 16
0
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Hi, I can able to compile LLVM using armgcc_4.3.3 (codesourcery2009q1..).. but when i tried to run it on target it shows GCC 4.3.0 version not found. So i copied the runtime libraries (libc.so and libgcc_s.so) from the toolchain to the target and exported its path in LD_LIBRARY_PATH. But when i tried to run any llvm tools on target its crashing with Segmentation fault. What could be the problem
2009 Nov 16
3
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue - now the internal compiler error issue.
Prasanth J wrote: > Hi, > > As you said i downloaded arm toolchain from codesourcery(2009q3 with > gcc 4.4.1 version).. if i use this toolchain i am getting the > following error.. > > make[2]: Entering directory > `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis' > llvm[2]: Compiling LoopPass.cpp for Release build > if arm-none-linux-gnueabi-g++
2009 Nov 14
0
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue
Hi, As you said i downloaded arm toolchain from codesourcery(2009q3 with gcc 4.4.1 version).. if i use this toolchain i am getting the following error.. make[2]: Entering directory `/home/prasanth/LLVM_ARM/llvm-with-armgcc441/llvm-obj/lib/Analysis' llvm[2]: Compiling LoopPass.cpp for Release build if arm-none-linux-gnueabi-g++ -I/home/prasanth/LLVM_ARM/llvm-with-armgcc433/llvm/include
2009 Nov 09
2
[LLVMdev] Compilation error while cross compiling LLVM for ARM
...uild llvm[1]: Compiling Memory.cpp for Release build /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp: In static member function ‘static void llvm::sys::Memory::InvalidateInstructionCache(const void*, size_t)’: /home/prasanth/LLVM_ARM/llvm-target/llvm/lib/System/Memory.cpp:67: error: ‘__clear_cache’ was not declared in this scope make[1]: *** [/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System/Release/Memory.o] Error 1 make[1]: Leaving directory `/home/prasanth/LLVM_ARM/llvm-target/obj-new/lib/System' make: *** [all] Error 1** *i can able to compile by commenting the line in Memory.c...
2009 Nov 13
2
[LLVMdev] Compilation error while cross compiling LLVM for ARM - the __clear_cache issue - now the __sync_val_compare_and_swap issue
Prasanth J wrote: > > Hi all, > with reference to the reply below, I downloaded toolchain from > codesourcery (arm-2009q1-203-arm-none-linux-gnueabi) with gcc 4.3.3... > when i compile llvm+clang with this toolchain i am getting the > following error > > make[4]: Entering directory >
2010 Nov 18
1
[LLVMdev] Compiling LLVM libraries for Android
Hi, I'm compiling LLVM libraries for android platform using android nk r4 from crystax that supports c++ and rtti libs. I'm facing the problem that there gcc compiler doesn't support __clear_cache function of Memory.cpp (line 699) for the librarie LLVMSystem. Is there a way to bypass this limitation without puts a comment on this line? Regards Jérôme Gorin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments...