summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCJITInfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make the visibility of LLVMPPCCompilationCallback work with GCC.Benjamin Kramer2013-02-171-1/+1
| | | | | | | | | | | | GCC warns about the attribute being ignored if it occurs after void*. There seems to be some kind of incompatibility between clang and gcc here, but I can't fathom who's right. void* LLVM_LIBRARY_VISIBILITY foo(); // clang: hidden, gcc: default LLVM_LIBRARY_VISIBILITY void *bar(); // clang: hidden, gcc: hidden void LLVM_LIBRARY_VISIBILITY qux(); // clang: hidden, gcc: hidden llvm-svn: 175394
* Give these callbacks hidden visibility. It is better to not export them moreRafael Espindola2013-02-151-3/+4
| | | | | | | than we need to and some ELF linkers complain about directly accessing symbols with default visibility. llvm-svn: 175268
* Don't make assumptions about the mangling of static functions in extern "C"Rafael Espindola2013-02-151-7/+7
| | | | | | | | blocks. We still don't have consensus if we should try to change clang or the standard, but llvm should work with compilers that implement the current standard and mangle those functions. llvm-svn: 175267
* Revert r175120 and r175121. Clang is producing the expected asm names again.Rafael Espindola2013-02-141-1/+1
| | | | llvm-svn: 175133
* Don't asume that a static function in an extern "C" block will not be mangled.Rafael Espindola2013-02-141-1/+1
| | | | | | | | | | | | | | Since functions with internal linkage don't have language linkage, it is valid to overload them: extern "C" { static int foo(); static int foo(int); } So we mangle them. llvm-svn: 175120
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-1/+1
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-1/+1
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Mark .opd @progbits, thus avoiding a warning from asm.Roman Divacky2012-05-091-1/+1
| | | | llvm-svn: 156494
* Make PPCCompilationCallbackC function to be static, so there will be no need ↵Anton Korobeynikov2012-04-031-3/+5
| | | | | | | | to issue call via PLT when LLVM is built as shared library. This mimics the X86 backend towards the approach. llvm-svn: 153938
* Make PPC64CompilationCallback compilable no non-darwin platforms.Roman Divacky2011-06-151-34/+56
| | | | | | Patch by Nathan Whitehorn! llvm-svn: 133059
* I swear I did a make clean and make before committing all this...Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120304
* Teach PPC how to replaceMachineCodeForFunction correctly. (FixesJeffrey Yasskin2010-01-141-0/+2
| | | | | | JITTest.FunctionIsRecompiledAndRelinked.) llvm-svn: 93475
* Change indirect-globals to use a dedicated allocIndirectGV. This lets usJeffrey Yasskin2009-12-151-1/+0
| | | | | | | | | remove start/finishGVStub and the BufferState helper class from the MachineCodeEmitter interface. It has the side-effect of not setting the indirect global writable and then executable on ARM, but that shouldn't be necessary. llvm-svn: 91464
* * Move stub allocation inside the JITEmitter, instead of exposing aJeffrey Yasskin2009-11-231-9/+16
| | | | | | | | | | | | | | way for each TargetJITInfo subclass to allocate its own stubs. This means stubs aren't as exactly-sized anymore, but it lets us get rid of TargetJITInfo::emitFunctionStubAtAddr(), which lets ARM and PPC support the eager JIT, fixing http://llvm.org/PR4816. * Rename the JITEmitter's stub creation functions to describe the kind of stub they create. So far, all of them create lazy-compilation stubs, but they sometimes get used when far-call stubs are needed. Fixing http://llvm.org/PR5201 will involve fixing this. llvm-svn: 89715
* Allow more than one stub to be being generated at the same time.Jeffrey Yasskin2009-11-231-4/+5
| | | | | | | | It's probably better in the long run to replace the indirect-GlobalVariable system. That'll be done after a subsequent patch. llvm-svn: 89708
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-3/+3
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-1/+1
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Implement changes from Chris's feedback.Torok Edwin2009-07-081-4/+4
| | | | | | Finish converting lib/Target. llvm-svn: 75043
* Refactor ABI code in the PowerPC backend.Tilmann Scheller2009-07-031-1/+1
| | | | | | | | | | | Make CalculateParameterAndLinkageAreaSize() Darwin-specific. Remove SVR4 specific code from LowerCALL_Darwin() and LowerFORMAL_ARGUMENTS_Darwin(). Rename MachoABI to DarwinABI for consistency. Rename ELF ABI to SVR4 ABI for consistency. Factor out common call return lowering between the Darwin and SVR4 ABI. Factor out common call lowering between the Darwin and SVR4 ABI. llvm-svn: 74766
* First patch in the direction of splitting MachineCodeEmitter in two subclasses:Bruno Cardoso Lopes2009-05-301-32/+31
| | | | | | JITCodeEmitter and ObjectCodeEmitter. No functional changes yet. Patch by Aaron Gray llvm-svn: 72631
* Rename startFunctionStub to startGVStub since it's also used for GV non-lazy ↵Evan Cheng2008-11-081-4/+4
| | | | | | ptr. llvm-svn: 58897
* Trim #includes.Dan Gohman2008-10-161-1/+0
| | | | llvm-svn: 57649
* Switch the PPC backend and target-independent JIT to use the libsystem Chris Lattner2008-06-251-26/+3
| | | | | | | InvalidateInstructionCache method instead of calling through a hook on the JIT. This is a host feature, not a target feature. llvm-svn: 52734
* Add one more 'magic' define :)Anton Korobeynikov2008-06-171-1/+2
| | | | llvm-svn: 52420
* Unbreak non-PPC buildsAnton Korobeynikov2008-06-171-4/+5
| | | | llvm-svn: 52419
* Provide generic hooks for icache invalidation. Add PPC implementation.Anton Korobeynikov2008-06-171-10/+5
| | | | | | Patch by Gary Benson! llvm-svn: 52418
* Add support for icache invalidation on non-darwin ppc systems.Chris Lattner2008-06-161-2/+19
| | | | | | Patch by Gary Benson! llvm-svn: 52332
* Add FreeBSD/PPC support, patch by Marcel Moolenaar!Chris Lattner2008-05-241-2/+2
| | | | llvm-svn: 51538
* Correlate stubs with functions in JIT: when emitting a stub, the JIT tells ↵Nicolas Geoffray2008-04-161-5/+7
| | | | | | | | the memory manager which function the stub will resolve. llvm-svn: 49814
* JITEmitter.cpp was trying to sync the icache for function stubs, butChris Lattner2008-01-251-2/+19
| | | | | | | | was actually passing a completely incorrect size to sys_icache_invalidate. Instead of having the JITEmitter do this (which doesn't have the correct size), just make the target sync its own stubs. llvm-svn: 46354
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Implementation of compilation callback in PPC ELF32Nicolas Geoffray2007-05-291-31/+32
| | | | llvm-svn: 37340
* Improve JIT support for linux/ppc: Patch by Nicolas Geoffray!Chris Lattner2007-02-251-0/+65
| | | | llvm-svn: 34572
* Layout proper frame for ppc64.Jim Laskey2006-12-111-28/+38
| | | | llvm-svn: 32436
* Reverting until finding the cause of secondary bugs.Jim Laskey2006-12-101-33/+28
| | | | llvm-svn: 32413
* __PPC64CompilationCallback code was allowing registers to be clobbered by stub.Jim Laskey2006-12-101-28/+33
| | | | llvm-svn: 32412
* this is an initial patch to switch the ppc64 jit over to working in PIC mode,Chris Lattner2006-12-081-0/+2
| | | | | | | | which allows the code to be above the 2G marker. We still need to JIT emit dyld stubs to support external, weak, common, etc globals, but that will happen tomorrow. llvm-svn: 32348
* fix incorrect encoding of rldicr, used by ppc64 function stubs, etc.Chris Lattner2006-12-071-1/+1
| | | | llvm-svn: 32341
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-071-1/+0
| | | | llvm-svn: 32333
* wrap long linesChris Lattner2006-09-281-2/+4
| | | | llvm-svn: 30662
* First pass at supporting relocations. Relocations are written correctly toNate Begeman2006-09-081-4/+1
| | | | | | | the file now, however the relocated address is currently wrong. Fixing that will require some deep pondering. llvm-svn: 30207
* Make ppc64 jit kinda work right. About 2/3 of Olden passes with this,Nate Begeman2006-08-291-29/+127
| | | | | | there are clearly some encoding bugs lurking in there somewhere. llvm-svn: 29949
* Resolve BB references with relocation.Evan Cheng2006-07-271-23/+8
| | | | llvm-svn: 29351
* synchronizeICache removeed from TargetJITInfo.Evan Cheng2006-07-271-10/+0
| | | | llvm-svn: 29348
* - Refactor the code that resolve basic block references to a TargetJITInfoEvan Cheng2006-07-251-0/+35
| | | | | | | | | | method. - Added synchronizeICache() to TargetJITInfo. It is called after each block of code is emitted to flush the icache. This ensures correct execution on targets that have separate dcache and icache. - Added PPC / Mac OS X specific code to do icache flushing. llvm-svn: 29276
* Implement PPC64 relocations typesChris Lattner2006-07-121-1/+11
| | | | llvm-svn: 29125
* Silence -pedantic warningChris Lattner2006-06-011-1/+1
| | | | llvm-svn: 28633
* Patches to make the LLVM sources more -pedantic clean. Patch providedChris Lattner2006-05-241-1/+1
| | | | | | by Anton Korobeynikov! This is a step towards closing PR786. llvm-svn: 28447
* Fix a purely hypothetical problem (for now): emitWord emits in the hostChris Lattner2006-05-021-11/+11
| | | | | | | | byte format. This doesn't work when using the code emitter in a cross target environment. Since the code emitter is only really used by the JIT, this isn't a current problem, but if we ever start emitting .o files, it would be. llvm-svn: 28060
* Update the PPC compilation callback code to not need weird abi-violatingNate Begeman2006-05-021-49/+46
| | | | | | | prologs and epilogs, keep all the asm in one place, and remove use of compiler builtin functions. llvm-svn: 28049
OpenPOWER on IntegriCloud