summaryrefslogtreecommitdiff
path: root/lib/Support/Unix/Memory.inc
Commit message (Collapse)AuthorAge
* Revert: r211588 - [mips] Use __clear_cache builtin instead of cacheflush() ↵Daniel Sanders2014-06-24
| | | | | | | | | | | | | in Unix Memory::InvalidateInstructionCache() Buildbot reports a test failure on the llvm-mips-linux builder and blames r211588. Although it doesn't appear in the blamelist, it seems it could also be r211587 (because it's committed to compiler-rt?) since they were tested together. Reverting the most likely suspect (r211588) to confirm one way or the other. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211594 91177308-0d34-0410-b5e6-96231b3b80d8
* [mips] Use __clear_cache builtin instead of cacheflush() in Unix ↵Daniel Sanders2014-06-24
| | | | | | | | | | | | Memory::InvalidateInstructionCache() MIPS64 Android bionic has removed cacheflush(). Use __clear_cache() instead for 32-bit and 64-bit MIPS Patch by Duane Sand <Duane.Sand@imgtec.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211588 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove 'using std::errro_code' from lib.Rafael Espindola2014-06-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210871 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-12
| | | | | | This should make sure that most new uses use the std prefix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210835 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't put generic_category in the llvm namespace.Rafael Espindola2014-06-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210737 91177308-0d34-0410-b5e6-96231b3b80d8
* Uses generic_category instead of system_category.Rafael Espindola2014-06-11
| | | | | | | Some c++ libraries (libstdc++ at least) don't seem to map to the generic category in in the system_category's default_error_condition. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210635 91177308-0d34-0410-b5e6-96231b3b80d8
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-31
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209952 91177308-0d34-0410-b5e6-96231b3b80d8
* [C++] Use 'nullptr'.Craig Topper2014-04-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207394 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM64: initial backend importTim Northover2014-03-29
| | | | | | | | | | | | This adds a second implementation of the AArch64 architecture to LLVM, accessible in parallel via the "arm64" triple. The plan over the coming weeks & months is to merge the two into a single backend, during which time thorough code review should naturally occur. Everything will be easier with the target in-tree though, hence this commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205090 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "[PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc."Rafael Espindola2013-07-26
| | | | | | This reverts commit r187248. It broke many bots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187254 91177308-0d34-0410-b5e6-96231b3b80d8
* [PowerPC] Improve consistency in use of __ppc__, __powerpc__, etc.Bill Schmidt2013-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Both GCC and LLVM will implicitly define __ppc__ and __powerpc__ for all PowerPC targets, whether 32- or 64-bit. They will both implicitly define __ppc64__ and __powerpc64__ for 64-bit PowerPC targets, and not for 32-bit targets. We cannot be sure that all other possible compilers used to compile Clang/LLVM define both __ppc__ and __powerpc__, for example, so it is best to check for both when relying on either inside the Clang/LLVM code base. This patch makes sure we always check for both variants. In addition, it fixes one unnecessary check in lib/Target/PowerPC/PPCJITInfo.cpp. (At least one of __ppc__ and __powerpc__ should always be defined when compiling for a PowerPC target, no matter which compiler is used, so testing for them is unnecessary.) There are some places in the compiler that check for other variants, like __POWERPC__ and _POWER, and I have left those in place. There is no need to add them elsewhere. This seems to be in Apple-specific code, and I won't take a chance on breaking it. There is no intended change in behavior; thus, no test cases are added. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187248 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove declaration of __clear_cache for __APPLE__. <rdar://problem/13924072>Bob Wilson2013-05-19
| | | | | | | | | | | | | | | This fixes a bootstrapping problem with builds for Apple ARM targets. Clang had the wrong prototype for __clear_cache with ARM targets. Rafael fixed that in clang svn r181784 and r181810, but without those changes, we can't build this code for ARM because clang reports an error about the declaration in Memory.inc not matching the builtin declaration. Some of our buildbots need to use an older compiler that doesn't have the clang fix. Since __clear_cache is never used here when __APPLE__ is defined, I'm just conditionalizing the declaration to match that. I also moved the declaration of sys_icache_invalidate inside the conditional for __APPLE__ while I was at it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182223 91177308-0d34-0410-b5e6-96231b3b80d8
* Invalidate instruction cache when setting memory to be executable.Tim Northover2013-05-19
| | | | | | | | | lli's remote MCJIT code calls setExecutable just prior to running code. In line with Darwin behaviour this seems to be the place to invalidate any caches needed so that relocations can take effect properly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182213 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix __clear_cache declaration.Rafael Espindola2013-05-14
| | | | | | This fixes the build with gcc in gnu++98 and gnu++11 mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181811 91177308-0d34-0410-b5e6-96231b3b80d8
* Declare __clear_cache.Rafael Espindola2013-05-14
| | | | | | | | GCC declares __clear_cache in the gnu modes (-std=gnu++98, -std=gnu++11), but not in the strict modes (-std=c++98, -std=c++11). This patch declares it and therefore fixes the build when using one of the strict modes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181785 91177308-0d34-0410-b5e6-96231b3b80d8
* AArch64: use __clear_cache under GCCish environmentsTim Northover2013-05-04
| | | | | | | | | AArch64 is going to need some kind of cache-invalidation in order to successfully JIT since it has a weak memory-model. This is provided by a __clear_cache builtin in libgcc, which acts very much like the 32-bit ARM equivalent (on platforms where it exists). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181129 91177308-0d34-0410-b5e6-96231b3b80d8
* Android uses cacheflush(long start, long end, long flags) for MIPS.Akira Hatanaka2013-03-14
| | | | | | | | Patch by Stephen Hines. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177101 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment in Memory.inc explaining r175646.Krzysztof Parzyszek2013-02-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175650 91177308-0d34-0410-b5e6-96231b3b80d8
* On PowerPC, the cache-flush instructions dcbf and icbi are treated asKrzysztof Parzyszek2013-02-20
| | | | | | | loads. On FreeBSD, add PROT_READ page protection flag before flushing cache. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175646 91177308-0d34-0410-b5e6-96231b3b80d8
* Go ahead and get rid of the old page size interface and convert all theChandler Carruth2012-12-31
| | | | | | | users over to the new one. No sense maintaining this "compatibility" layer it seems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171331 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch adds memory support functions which will later be used to ↵Andrew Kaylor2012-09-19
| | | | | | implement section-specific protection handling in MCJIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164249 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for finding cacheflush on OpenBSD/mips64 platforms.Chandler Carruth2012-09-11
| | | | | | Patch by Brad Smith! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163584 91177308-0d34-0410-b5e6-96231b3b80d8
* setExecutable() should default to success if there's nothing custom for it.Jim Grosbach2011-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127891 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8