summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
* 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
* 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
* 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
* 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-103-90/+60
| | | | | | | | | 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
* Introduce a new VTSDNode class with the ultimate goal of eliminating theChris Lattner2005-07-102-79/+109
| | | | | | | | 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
* 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-085-29/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Add support for assembling .s files on mac os x for intelNate Begeman2005-07-085-8/+96
| | | | | | Add support for running bugpoint on mac os x for intel llvm-svn: 22351
* Changes to mimic those in Unix/Path.inc in support of PR495. This hasn'tReid Spencer2005-07-071-155/+94
| | | | | | been compiled or tested. llvm-svn: 22350
* For PR495:Reid Spencer2005-07-0712-168/+131
| | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. llvm-svn: 22349
* Fix a problem that instcombine would hit when dealing with unreachable code.Chris Lattner2005-07-071-5/+29
| | | | | | | | | Because the instcombine has to scan the entire function when it starts up to begin with, we might as well do it in DFO so we can nuke unreachable code. This fixes: Transforms/InstCombine/2005-07-07-DeadPHILoop.ll llvm-svn: 22348
* clean up prolouge and epilougeAndrew Lenharth2005-07-072-28/+39
| | | | llvm-svn: 22346
* For PR495:Reid Spencer2005-07-078-21/+21
| | | | | | | | | | | Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. llvm-svn: 22345
* Restore some code that was accidentally removed by Nate's patch yesterday.Chris Lattner2005-07-071-1/+20
| | | | | | This fixes the regressions from last night. llvm-svn: 22344
* Add support for emitting the symbol table (and its string table) of theChris Lattner2005-07-071-54/+141
| | | | | | | | | | | | | | | | | | | | module to the ELF file. Test it by adding support for emitting common symbols. This allows us to compile this: %X = weak global int 0 %Y = weak global int 0 %Z = weak global int 0 to an elf file that 'readelf's this: Symbol table '.symtab' contains 4 entries: Num: Value Size Type Bind Vis Ndx Name 0: 00000000 0 NOTYPE LOCAL DEFAULT UND 1: 00000004 4 OBJECT GLOBAL DEFAULT COM X 2: 00000004 4 OBJECT GLOBAL DEFAULT COM Y 3: 00000004 4 OBJECT GLOBAL DEFAULT COM Z llvm-svn: 22343
* Fix a typo in my checkin today that caused regressions. Oops!Nate Begeman2005-07-071-1/+1
| | | | llvm-svn: 22341
* First round of support for doing scalar FP using the SSE2 ISA extension andNate Begeman2005-07-0611-91/+388
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XMM registers. There are many known deficiencies and fixmes, which will be addressed ASAP. The major benefit of this work is that it will allow the LLVM register allocator to allocate FP registers across basic blocks. The x86 backend will still default to x87 style FP. To enable this work, you must pass -enable-sse-scalar-fp and either -sse2 or -sse3 to llc. An example before and after would be for: double foo(double *P) { double Sum = 0; int i; for (i = 0; i < 1000; ++i) Sum += P[i]; return Sum; } The inner loop looks like the following: x87: .LBB_foo_1: # no_exit fldl (%esp) faddl (%eax,%ecx,8) fstpl (%esp) incl %ecx cmpl $1000, %ecx #FP_REG_KILL jne .LBB_foo_1 # no_exit SSE2: addsd (%eax,%ecx,8), %xmm0 incl %ecx cmpl $1000, %ecx #FP_REG_KILL jne .LBB_foo_1 # no_exit llvm-svn: 22340
* Make several cleanups to Andrews varargs change:Chris Lattner2005-07-054-120/+90
| | | | | | | | | | | | 1. Pass Value*'s into lowering methods so that the proper pointers can be added to load/stores from the valist 2. Intrinsics that return void should only return a token chain, not a token chain/retval pair. 3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone. 4. Now that we have Value*'s available in the lowering methods, pass them into any load/stores from the valist that are emitted llvm-svn: 22339
* Make several cleanups to Andrews varargs change:Chris Lattner2005-07-051-22/+25
| | | | | | | | | | 1. Pass Value*'s into lowering methods so that the proper pointers can be added to load/stores from the valist 2. Intrinsics that return void should only return a token chain, not a token chain/retval pair. 3. Rename LowerVAArgNext -> LowerVAArg, because VANext is long gone. llvm-svn: 22338
* 2 fixes:Andrew Lenharth2005-07-051-4/+13
| | | | | | | 1: Legalize operand in UINT_TO_FP expanision 2: SRA x, const i8 was not promoting the constant to shift amount type. llvm-svn: 22337
* Fit to 80 columnsChris Lattner2005-07-051-3/+6
| | | | llvm-svn: 22336
* Fix PowerPC varargsChris Lattner2005-07-051-24/+25
| | | | llvm-svn: 22335
* check the correct VTAndrew Lenharth2005-07-041-1/+1
| | | | llvm-svn: 22332
* fix loading address of fp symbolsAndrew Lenharth2005-07-031-0/+4
| | | | llvm-svn: 22331
* Percolate the call up to the right superclassChris Lattner2005-07-031-1/+1
| | | | llvm-svn: 22330
* I really didn't think this was necessary. But, Legalize wasn't running againAndrew Lenharth2005-07-021-2/+3
| | | | | | and legalizing the extload. Strange. Should fix most alpha regressions. llvm-svn: 22329
* The statistic needs to be in the correct namespace.Nate Begeman2005-07-011-1/+2
| | | | llvm-svn: 22327
* Varargs is apparently currently broken on PPC. This hacks it so that itChris Lattner2005-07-011-4/+9
| | | | | | | | is at least overloading the right virtual methods. The implementations are currently wrong though. This fixes Ptrdist/bc, but not other programs (e.g. siod). llvm-svn: 22326
* Refactor X86AsmPrinter.cpp into multiple files. Patch contributedChris Lattner2005-07-016-557/+676
| | | | | | by Aaron Gray, cleaned up by me. llvm-svn: 22324
* simplify call code, remove pseudo ops for div and rem, track more loads and ↵Andrew Lenharth2005-07-011-17/+0
| | | | | | stores llvm-svn: 22323
* simplify call code, remove pseudo ops for div and rem, track more loads and ↵Andrew Lenharth2005-07-013-80/+92
| | | | | | stores llvm-svn: 22322
* remove some debugging codeChris Lattner2005-07-011-3/+0
| | | | llvm-svn: 22321
* oopsAndrew Lenharth2005-06-301-2/+1
| | | | llvm-svn: 22320
OpenPOWER on IntegriCloud