summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Change packed struct layout so that field sizesDuncan Sands2008-06-041-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | are the same as in unpacked structs, only field positions differ. This only matters for structs containing x86 long double or an apint; it may cause backwards compatibility problems if someone has bitcode containing a packed struct with a field of one of those types. The issue is that only 10 bytes are needed to hold an x86 long double: the store size is 10 bytes, but the ABI size is 12 or 16 bytes (linux/ darwin) which comes from rounding the store size up by the alignment. Because it seemed silly not to pack an x86 long double into 10 bytes in a packed struct, this is what was done. I now think this was a mistake. Reserving the ABI size for an x86 long double field even in a packed struct makes things more uniform: the ABI size is now always used when reserving space for a type. This means that developers are less likely to make mistakes. It also makes life easier for the CBE which otherwise could not represent all LLVM packed structs (PR2402). Front-end people might need to adjust the way they create LLVM structs - see following change to llvm-gcc. llvm-svn: 51928
* Find a better place to output hex constants corresponding to integers.Scott Michel2008-06-031-0/+5
| | | | llvm-svn: 51904
* Revert this patchScott Michel2008-06-031-3/+1
| | | | llvm-svn: 51897
* Minor cosmetic patch so that the hex equivalent of a decimalScott Michel2008-06-021-1/+3
| | | | | | | constant shows up in the assembly language output. Helps with debugging without a HP calculator having to be handy. llvm-svn: 51885
* Handle quoted names when constructing $stub's,Dale Johannesen2008-05-191-0/+7
| | | | | | $non_lazy_ptr's and $lazy_ptr's. llvm-svn: 51277
* Add AsmPrinter support for emitting a directive to declare thatDan Gohman2008-05-051-0/+7
| | | | | | | | | the code being generated does not require an executable stack. Also, add target-specific code to make use of this on Linux on x86. llvm-svn: 50634
* Make EH work with unnamed functions. Reenable runningDale Johannesen2008-04-021-2/+4
| | | | | | StripSymbols when EH is on. llvm-svn: 49110
* Replace all target specific implicit def instructions with a target ↵Evan Cheng2008-03-151-1/+10
| | | | | | independent one: TargetInstrInfo::IMPLICIT_DEF. llvm-svn: 48380
* Honour aliases visibility during asm emissionAnton Korobeynikov2008-03-111-1/+9
| | | | llvm-svn: 48249
* Don't fill eh frames even though these are text sections.Evan Cheng2008-02-291-2/+3
| | | | llvm-svn: 47765
* Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to ↵Evan Cheng2008-02-281-8/+22
| | | | | | 16-byte boundaries. llvm-svn: 47703
* Update gcc 4.3 warnings fix patch with recent head changesAnton Korobeynikov2008-02-201-1/+2
| | | | llvm-svn: 47368
* Don't make up new directives. (".set_foobar")Nick Lewycky2008-02-071-1/+1
| | | | llvm-svn: 46848
* Dwarf requires variable entries to be in the source order. Right now, since ↵Evan Cheng2008-02-041-4/+7
| | | | | | we are recording variable information at isel time this means parameters would appear in the reverse order. The short term fix is to issue recordVariable() at asm printing time instead. llvm-svn: 46724
* Get rid of the annoying blank lines before labels.Evan Cheng2008-02-021-3/+3
| | | | llvm-svn: 46667
* SDIsel processes llvm.dbg.declare by recording the variable debug ↵Evan Cheng2008-02-021-0/+6
| | | | | | | | | information descriptor and its corresponding stack frame index in MachineModuleInfo. This only works if the local variable is "homed" in the stack frame. It does not work for byval parameter, etc. Added ISD::DECLARE node type to represent llvm.dbg.declare intrinsic. Now the intrinsic calls are lowered into a SDNode and lives on through out the codegen passes. For now, since all the debugging information recording is done at isel time, when a ISD::DECLARE node is selected, it has the side effect of also recording the variable. This is a short term solution that should be fixed in time. llvm-svn: 46659
* Remove the nasty LABEL hack with a much less evil one. Now ↵Evan Cheng2008-02-011-0/+4
| | | | | | llvm.dbg.func.start implies a stoppoint is set. SelectionDAGISel records a new source line but does not create a ISD::LABEL node for this special stoppoint. Asm printer will magically print this label. This ensures nothing is emitted before. llvm-svn: 46635
* Handle 'X' constraint in asm's better.Dale Johannesen2008-01-291-2/+3
| | | | llvm-svn: 46485
* For long double constants, print an approximation of their value to the .s ↵Chris Lattner2008-01-271-2/+6
| | | | | | file to make it easier to read. llvm-svn: 46407
* Enabling the target-independent garbage collection infrastructure by hooking itGordon Henriksen2008-01-071-0/+19
| | | | | | | | | up to the various compiler pipelines. This doesn't actually add support for any GC algorithms, which means it temporarily breaks a few tests. To be fixed shortly. llvm-svn: 45669
* Rename SSARegMap -> MachineRegisterInfo in keeping with the idea Chris Lattner2007-12-311-0/+1
| | | | | | | | | | | | | | that "machine" classes are used to represent the current state of the code being compiled. Given this expanded name, we can start moving other stuff into it. For now, move the UsedPhysRegs and LiveIn/LoveOuts vectors from MachineFunction into it. Update all the clients to match. This also reduces some needless #includes, such as MachineModuleInfo from MachineFunction. llvm-svn: 45467
* Add new shorter predicates for testing machine operands for various types: Chris Lattner2007-12-301-1/+1
| | | | | | | | | | | | e.g. MO.isMBB() instead of MO.isMachineBasicBlock(). I don't plan on switching everything over, so new clients should just start using the shorter names. Remove old long accessors, switching everything over to use the short accessor: getMachineBasicBlock() -> getMBB(), getConstantPoolIndex() -> getIndex(), setMachineBasicBlock -> setMBB(), etc. llvm-svn: 45464
* MachineOperand::getImmedValue -> MachineOperand::getImmChris Lattner2007-12-301-7/+4
| | | | llvm-svn: 45454
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Support more insane CEP's in AsmPrinter (Yes, PyPy folks do really use them).Anton Korobeynikov2007-12-181-1/+24
| | | | llvm-svn: 45172
* Fix PIC jump table codegen on x86-32/linux. In fact, such thing should be ↵Anton Korobeynikov2007-11-141-28/+41
| | | | | | | | applied to all targets uses GOT-relative offsets for PIC (Alpha?) llvm-svn: 44108
* Much improved pic jumptable codegen:Evan Cheng2007-11-091-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Then: call "L1$pb" "L1$pb": popl %eax ... LBB1_1: # entry imull $4, %ecx, %ecx leal LJTI1_0-"L1$pb"(%eax), %edx addl LJTI1_0-"L1$pb"(%ecx,%eax), %edx jmpl *%edx .align 2 .set L1_0_set_3,LBB1_3-LJTI1_0 .set L1_0_set_2,LBB1_2-LJTI1_0 .set L1_0_set_5,LBB1_5-LJTI1_0 .set L1_0_set_4,LBB1_4-LJTI1_0 LJTI1_0: .long L1_0_set_3 .long L1_0_set_2 Now: call "L1$pb" "L1$pb": popl %eax ... LBB1_1: # entry addl LJTI1_0-"L1$pb"(%eax,%ecx,4), %eax jmpl *%eax .align 2 .set L1_0_set_3,LBB1_3-"L1$pb" .set L1_0_set_2,LBB1_2-"L1$pb" .set L1_0_set_5,LBB1_5-"L1$pb" .set L1_0_set_4,LBB1_4-"L1$pb" LJTI1_0: .long L1_0_set_3 .long L1_0_set_2 llvm-svn: 43924
* Make labels work in asm blocks; allow labels asDale Johannesen2007-11-051-7/+12
| | | | | | | parameters. Rename ValueRefList to ParamList in AsmParser, since its only use is for parameters. llvm-svn: 43734
* Don't output ABI size padding twice. By using the storeDuncan Sands2007-11-051-5/+6
| | | | | | | size for the field we get ABI padding automatically, so no need to put it in again when we emit the field. llvm-svn: 43720
* Eliminate the remaining uses of getTypeSize. ThisDuncan Sands2007-11-051-17/+16
| | | | | | | | | | | | | | should only effect x86 when using long double. Now 12/16 bytes are output for long double globals (the exact amount depends on the alignment). This brings globals in line with the rest of LLVM: the space reserved for an object is now always the ABI size. One tricky point is that only 10 bytes should be output for long double if it is a field in a packed struct, which is the reason for the additional argument to EmitGlobalConstant. llvm-svn: 43688
* Revert 42908 for now.Evan Cheng2007-10-141-19/+19
| | | | llvm-svn: 42960
* Change the names used for internal labels to use the currentDan Gohman2007-10-121-19/+19
| | | | | | | | | function symbol name instead of a codegen-assigned function number. Thanks Evan! :-) llvm-svn: 42908
* Implement ppc long double->uint conversion.Dale Johannesen2007-10-111-0/+33
| | | | | | Make ppc long double constants print. llvm-svn: 42882
* Call getFunctionNumber() instead of referencing FunctionNumber directly,Dan Gohman2007-10-081-1/+1
| | | | | | for consistency. llvm-svn: 42769
* Fix stride computations for long double arrays.Dale Johannesen2007-10-011-1/+5
| | | | llvm-svn: 42508
* minor long double related changesDale Johannesen2007-09-281-0/+1
| | | | llvm-svn: 42439
* Make temporaries explicit to avoid prematureDale Johannesen2007-09-261-1/+3
| | | | | | destruction of compiler-created ones. llvm-svn: 42383
* Add a routine for emitting .file directives, for setting upDan Gohman2007-09-241-0/+11
| | | | | | file numbers to use with .loc directives. llvm-svn: 42272
* Don't pass back a reference to a temporary.Bill Wendling2007-09-181-2/+1
| | | | llvm-svn: 42086
* The exception handling function info should be reset for each newBill Wendling2007-09-181-4/+2
| | | | | | | function. The information isn't used heavily -- it's only used at the end of exception handling emission -- so there's no need to cache it. llvm-svn: 42078
* Objective-C was generating EH frame info like this:Bill Wendling2007-09-181-0/+9
| | | | | | | | | "_-[NSString(local) isNullOrNil]".eh = 0 .no_dead_strip "_-[NSString(local) isNullOrNil]".eh The ".eh" should be inside the quotes. llvm-svn: 42074
* Remove isReg, isImm, and isMBB, and change all their users to use Dan Gohman2007-09-141-1/+1
| | | | | | | isRegister, isImmediate, and isMachineBasicBlock, which are equivalent, and more popular. llvm-svn: 41958
* Revise previous patch per review comments.Dale Johannesen2007-09-121-4/+41
| | | | | | | Next round of x87 long double stuff. Getting close now, basically works. llvm-svn: 41875
* Add APInt interfaces to APFloat (allows directlyDale Johannesen2007-09-111-8/+10
| | | | | | | | | access to bits). Use them in place of float and double interfaces where appropriate. First bits of x86 long double constants handling (untested, probably does not work). llvm-svn: 41858
* Next round of APFloat changes.Dale Johannesen2007-09-061-1/+2
| | | | | | | | | | | | | | Use APFloat in UpgradeParser and AsmParser. Change all references to ConstantFP to use the APFloat interface rather than double. Remove the ConstantFP double interfaces. Use APFloat functions for constant folding arithmetic and comparisons. (There are still way too many places APFloat is just a wrapper around host float/double, but we're getting there.) llvm-svn: 41747
* Proper handle case, when aliasee is external weak symbol referenced only by ↵Anton Korobeynikov2007-09-061-6/+13
| | | | | | | | alias itself. Also, fix a case, when target doesn't have weak symbols supported. llvm-svn: 41746
* move this check. ppc outputs .no_dead_strip properlyAndrew Lenharth2007-08-221-6/+6
| | | | llvm-svn: 41286
* Print a space between the comment character and the basic block name,Dan Gohman2007-07-301-1/+2
| | | | | | for prettiness. llvm-svn: 40593
* EmitAlignment() also emits optional fill value.Evan Cheng2007-07-251-2/+5
| | | | llvm-svn: 40500
* Global ctors / dtors alignment shouldn't be hard-coded at 4. e.g. It could ↵Evan Cheng2007-06-041-2/+4
| | | | | | be 8 for 64-bit targets. llvm-svn: 37421
OpenPOWER on IntegriCloud