summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* For PR540:Reid Spencer2005-07-122-36/+261
| | | | | | | * Add check for pthread.h * Make sure -lpthread gets added to LIBS if its available llvm-svn: 22402
* In support of PR418:Reid Spencer2005-07-121-1/+4
| | | | | | | | | Make sure that -lpthread gets added to LIBS variable which puts it at the end of the tools' link commands, if libpthread.a is found. Add a test for pthread.h so we can use #ifdef HAVE_PTHREAD_H llvm-svn: 22401
* Add support for 64-bit elf filesChris Lattner2005-07-121-16/+24
| | | | llvm-svn: 22400
* Add support for emitting 64-bit integersChris Lattner2005-07-121-1/+28
| | | | llvm-svn: 22399
* Add some apparently undocumented ELF section header flagsChris Lattner2005-07-121-1/+12
| | | | llvm-svn: 22398
* Fix povray and minor cleanupsAndrew Lenharth2005-07-121-25/+11
| | | | llvm-svn: 22397
* Clean up and add comments to the newly implemented subtarget code.Nate Begeman2005-07-121-3/+10
| | | | llvm-svn: 22396
* Add new files to Visual Studio projects.Jeff Cohen2005-07-122-0/+12
| | | | llvm-svn: 22395
* I don't know how this ever compiled with gcc, but VC++ correctly rejects it.Jeff Cohen2005-07-121-1/+1
| | | | llvm-svn: 22394
* VC++ demands that the function returns a valueJeff Cohen2005-07-121-0/+1
| | | | llvm-svn: 22393
* Clean up the TargetSubtarget class a bit, removing an unnecessary argumentNate Begeman2005-07-122-7/+2
| | | | | | to the constructor. llvm-svn: 22392
* Minor changes to improve comments and fix the build on _WIN32 systems.Chris Lattner2005-07-122-12/+13
| | | | llvm-svn: 22391
* Add a noteChris Lattner2005-07-121-1/+1
| | | | llvm-svn: 22390
* Implement Subtarget supportNate Begeman2005-07-128-4/+219
| | | | | | | | | | | | | | | | Implement the X86 Subtarget. This consolidates the checks for target triple, and setting options based on target triple into one place. This allows us to convert the asm printer and isel over from being littered with "forDarwin", "forCygwin", etc. into just having the appropriate flags for each subtarget feature controlling the code for that feature. This patch also implements indirect external and weak references in the X86 pattern isel, for darwin. Next up is to convert over the asm printers to use this new interface. llvm-svn: 22389
* Commit some pending darwin changes before subtarget support.Nate Begeman2005-07-122-11/+13
| | | | llvm-svn: 22388
* Fix PR576.Chris Lattner2005-07-121-21/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of emitting a JIT stub that looks like this: internal void %l1_main_entry_2E_ce_wrapper(int) { header: %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) ) ; <sbyte*> [#uses=1] %resolverCast = cast sbyte* %resolver to void (int)* ; <void (int)*> [#uses=1] call void %resolverCast( int %0 ) ret void } Emit one that looks like this: internal void %l1_main_entry_2E_ce_wrapper(int) { Entry: %fpcache = load void (int)** %l1_main_entry_2E_ce.fpcache ; <void (int)*> [#uses=2] %isNull = seteq void (int)* %fpcache, null ; <bool> [#uses=1] br bool %isNull, label %lookupfp, label %usecache usecache: ; preds = %lookupfp, %Entry %fp = phi void (int)* [ %resolverCast, %lookupfp ], [ %fpcache, %Entry ] ; <void (int)*> [#uses=1] call void %fp( int %0 ) ret void lookupfp: ; preds = %Entry %resolver = call sbyte* %getPointerToNamedFunction( sbyte* getelementptr ([20 x sbyte]* %l1_main_entry_2E_ce_name, int 0, int 0) ) ; <sbyte*> [#uses=1] %resolverCast = cast sbyte* %resolver to void (int)* ; <void (int)*> [#uses=2] store void (int)* %resolverCast, void (int)** %l1_main_entry_2E_ce.fpcache br label %usecache } This makes the JIT debugger *MUCH* faster on large programs, as getPointerToNamedFunction takes time linear with the size of the program, and before we would call it every time a function in the text module was called from the safe module (ouch!). llvm-svn: 22387
* add a note so I can remember the common t-t'sChris Lattner2005-07-121-0/+22
| | | | llvm-svn: 22386
* fix a warningChris Lattner2005-07-111-1/+1
| | | | llvm-svn: 22385
* Remove glibc specific functions, and mark a couple as C99Andrew Lenharth2005-07-111-3/+1
| | | | llvm-svn: 22384
* because on alpha:Andrew Lenharth2005-07-111-0/+1
| | | | | | | | # define errno (*__errno_location ()) *shakes head llvm-svn: 22383
* Clean up code, no functionality changes.Chris Lattner2005-07-111-50/+68
| | | | llvm-svn: 22382
* Output .size directives to tell the assembler the size of each function.Chris Lattner2005-07-111-0/+1
| | | | llvm-svn: 22381
* Fix crazy indentationChris Lattner2005-07-111-75/+73
| | | | llvm-svn: 22380
* convert dos newlines to unix. No other changes.Chris Lattner2005-07-110-0/+0
| | | | llvm-svn: 22379
* Emit a symbol table entry for each function we output to the ELF file. ThisChris Lattner2005-07-111-1/+31
| | | | | | | | | | | | | allows objdump to know which function we are emitting to: 00000000 <foo>: <---- 0: b8 01 00 00 00 mov $0x1,%eax 5: 03 44 24 04 add 0x4(%esp,1),%eax 9: c3 ret ... and allows .o files to be useful for linking :) llvm-svn: 22378
* The symbol table just needs a const GlobalValue*, not a non-const one.Chris Lattner2005-07-111-5/+4
| | | | llvm-svn: 22377
* Refactor things a bit to allow the ELF code emitter to run the X86 machine ↵Chris Lattner2005-07-114-24/+32
| | | | | | | | code emitter after itself. llvm-svn: 22376
* add code to emit the .text section to the section header.Chris Lattner2005-07-111-4/+89
| | | | | | | | | | | | | | | | | | | | | | | | | Add a *VERY INITIAL* machine code emitter class. This is enough to take this C function: int foo(int X) { return X +1; } and make objdump produce the following: $ objdump -d t-llvm.o t-llvm.o: file format elf32-i386 Disassembly of section .text: 00000000 <.text>: 0: b8 01 00 00 00 mov $0x1,%eax 5: 03 44 24 04 add 0x4(%esp,1),%eax 9: c3 ret Anything using branches or refering to the constant pool or requiring relocations will not work yet. llvm-svn: 22375
* expose a new code emitter objectChris Lattner2005-07-111-1/+14
| | | | llvm-svn: 22374
* add a helper methodChris Lattner2005-07-111-0/+4
| | | | llvm-svn: 22373
* Remove prototype for non-existant functionChris Lattner2005-07-111-6/+0
| | | | llvm-svn: 22372
* Use a name mangler object to uniquify names and remove nonstandardChris Lattner2005-07-111-2/+8
| | | | | | characters from them. llvm-svn: 22371
* add a name mangler objectChris Lattner2005-07-111-0/+5
| | | | llvm-svn: 22370
* fix long linesChris Lattner2005-07-111-3/+4
| | | | llvm-svn: 22369
* Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.Chris Lattner2005-07-106-38/+34
| | | | | | | | | | | | This is the last MVTSDNode. This allows us to eliminate a bunch of special case code for handling MVTSDNodes. Also, remove some uses of dyn_cast that should really be cast (which is cheaper in a release build). llvm-svn: 22368
* Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.Chris Lattner2005-07-105-149/+68
| | | | | | | | | This is the last MVTSDNode. This allows us to eliminate a bunch of special case code for handling MVTSDNodes. llvm-svn: 22367
* Change TRUNCSTORE to use a VTSDNode operand instead of being an MVTSTDNodeChris Lattner2005-07-108-59/+52
| | | | llvm-svn: 22366
* Move TRUNCSTORE to using a VTSDNode operand instead of being a MVTSDNode.Chris Lattner2005-07-102-15/+9
| | | | | | | Also update some comments that Andrew forgot to update when he changed loads/stores. llvm-svn: 22365
* Introduce a new VTSDNode class with the ultimate goal of eliminating theChris Lattner2005-07-104-89/+135
| | | | | | | | MVTSDNode class. This class is used to provide an operand to operators that require an extra type. We start by converting FP_ROUND_INREG and SIGN_EXTEND_INREG over to using it. llvm-svn: 22364
* Fix bugs also fixed in Unix version, plus other general cleanup.Jeff Cohen2005-07-091-17/+61
| | | | llvm-svn: 22363
* 1. Fix bug in getBaseName where it mishandles suffixesJeff Cohen2005-07-091-2/+6
| | | | | | 2. Fix bug in eraseSuffix where it allows /path/.suffix to become /path/ llvm-svn: 22362
* Ensure that functions like isDirectory don't fail if the file doesn'tReid Spencer2005-07-082-1/+19
| | | | | | exist but just return false instead. llvm-svn: 22361
* Make sure we don't error out if an invalid path is used, just simplyReid Spencer2005-07-081-1/+12
| | | | | | exit from isBytecodeLPath with "false". llvm-svn: 22360
* Two changes:Reid Spencer2005-07-081-7/+11
| | | | | | | | | | 1. Use isValid() to check validity of the resulting path name in the eraseSuffix even though we can't think of a case where eraseSuffix could possibly cause an invalid path name. 2. Rewrite isValid() to not use the deprecated realpath function any more. It now just uses isascii to make sure all the characters are legit. llvm-svn: 22359
* Add support for emitting a .data section and .bss section.Chris Lattner2005-07-081-22/+67
| | | | | | Add support for emitting external and .bss symbols. llvm-svn: 22358
* Stamp out tabsJeff Cohen2005-07-082-20/+19
| | | | llvm-svn: 22357
* Make Win32 implementation conform to new paradigmJeff Cohen2005-07-082-50/+61
| | | | llvm-svn: 22356
* Fix eraseSuffix()Jeff Cohen2005-07-081-10/+6
| | | | llvm-svn: 22355
* Final Changes For PR495:Reid Spencer2005-07-0815-182/+203
| | | | | | | | | | | | | | | | | | | | | | | | | | This chagne just renames some sys::Path methods to ensure they are not misused. The Path documentation now divides methods into two dimensions: Path/Disk and accessor/mutator. Path accessors and mutators only operate on the Path object itself without making any disk accesses. Disk accessors and mutators will also access or modify the file system. Because of the potentially destructive nature of disk mutators, it was decided that all such methods should end in the work "Disk" to ensure the user recognizes that the change will occur on the file system. This patch makes that change. The method name changes are: makeReadable -> makeReadableOnDisk makeWriteable -> makeWriteableOnDisk makeExecutable -> makeExecutableOnDisk setStatusInfo -> setStatusInfoOnDisk createDirectory -> createDirectoryOnDisk createFile -> createFileOnDisk createTemporaryFile -> createTemporaryFileOnDisk destroy -> eraseFromDisk rename -> renamePathOnDisk These changes pass the Linux Deja Gnu tests. llvm-svn: 22354
* Fix VC++ breakageJeff Cohen2005-07-083-13/+10
| | | | llvm-svn: 22353
OpenPOWER on IntegriCloud