Commit Graph

112 Commits

Author SHA1 Message Date
Reid Spencer
b83eb6447b For PR950:
This patch implements the first increment for the Signless Types feature.
All changes pertain to removing the ConstantSInt and ConstantUInt classes
in favor of just using ConstantInt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-20 07:07:24 +00:00
Jim Laskey
99e41eed6d Clean up interface to getGlobalLinkName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31001 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 17:17:24 +00:00
Jim Laskey
a1a19f803c Basic support for getGlobalLinkName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30997 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-17 13:41:07 +00:00
Andrew Lenharth
82c3d8f81a Jimptables working again on alpha.
As a bonus, use the GOT node instead of the AlphaISD::GOT for internal stuff.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30873 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-11 04:29:42 +00:00
Chris Lattner
0336fdba85 If a target uses a GOT, put it in the jt data section, not the text
section.  This will fix alpha when Andrew implements
AlphaTargetMachine::getTargetLowering().


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30779 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-06 22:50:56 +00:00
Chris Lattner
9c78ecb511 Don't crash if an MBB doesn't have an LLVM BB
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30757 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 21:40:14 +00:00
Chris Lattner
e08d6e915e Emit pic jumptables to the same section that the function is emitted to,
allowing label differences to work.  This fixes CodeGen/X86/pic_jumptable.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30744 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:13:28 +00:00
Chris Lattner
1da31ee472 Pass the MachineFunction into EmitJumpTableInfo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30742 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 03:01:21 +00:00
Chris Lattner
52f0670470 move getSectionForFunction to AsmPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30736 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-05 02:42:47 +00:00
Chris Lattner
faf1daeb92 Use $( $| $) to represent alternatives in asm blocks instead of {|}. This
is needed to support targets where {|} aren't special symbols.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30712 91177308-0d34-0410-b5e6-96231b3b80d8
2006-10-03 23:27:09 +00:00
Chris Lattner
f8f791ef1e simplify code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30659 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-28 23:17:41 +00:00
Chris Lattner
bae02cfd46 Add support for ${:private} which prints "L" on darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30620 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-27 00:06:07 +00:00
Chris Lattner
3ce9b67e0c Add support for ${:comment}, which expands to the current target's comment
character, and ${:uid} which expands to a unique ID for the MachineInstr.
More can be added if/when they are needed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30619 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 23:59:50 +00:00
Chris Lattner
cb05af852f Add support for targets that want to do something with the llvm.used list,
because they have an aggressive linker that does dead code stripping.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30604 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-26 03:38:18 +00:00
Andrew Lenharth
beec30eaf3 Add support for other relocation bases to jump tables, as well as custom asm directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30593 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-24 19:45:58 +00:00
Andrew Lenharth
303c6222a4 oops
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30462 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 18:00:18 +00:00
Andrew Lenharth
3fbd67898e absolute addresses must match pointer size
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30461 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-18 17:59:35 +00:00
Evan Cheng
d5a99d7810 Use MachineConstantPoolEntry getOffset() and getType() accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30326 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-14 07:35:00 +00:00
Evan Cheng
d6594ae54c Added support for machine specific constantpool values. These are useful for
representing expressions that can only be resolved at link time, etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30278 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-12 21:00:35 +00:00
Jim Laskey
a0f3d17daa Make target asm info a property of the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30162 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 22:06:40 +00:00
Evan Cheng
61c958e691 Fix pasto that was breaking x86 tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30151 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-07 18:50:20 +00:00
Jim Laskey
563321a258 Separate target specific asm properties from the asm printers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30126 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-06 18:34:40 +00:00
Chris Lattner
67942f5dc3 Don't call isDef on non-registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30117 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 20:02:51 +00:00
Nate Begeman
52a51e38dc Emit .set directives for jump table entries when possible, which reduces
the number of relocations in object files, shrinkifying them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29650 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-12 21:29:52 +00:00
Chris Lattner
4a6bd33da0 Instead of blindly looking past constantexpr casts, actually constant
fold them.  This correctly truncates constants that are too large for the
destination slot and makes the code easier to understand.  This fixes PR853
and Regression/CodeGen/X86/2006-07-28-AsmPrint-Long-As-Pointer.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29408 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-29 01:57:19 +00:00
Chris Lattner
f26f5dde14 Print empty inline asms as a blank line instead of:
# InlineAsm Start

        # InlineAsm End


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29372 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-28 00:17:20 +00:00
Nate Begeman
4d9bbdc440 Code cleanups, per review
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29347 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 16:46:58 +00:00
Nate Begeman
2f1ae88445 Support jump tables when in PIC relocation model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29318 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-27 01:13:04 +00:00
Chris Lattner
0c4e6789da On 64-bit targets like ppc64, we should use .quad to output pointer directives,
not .long.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29157 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-15 01:34:12 +00:00
Evan Cheng
2d2cec1e9e Add support to print 4-, 8-, and 16- byte constant literals in special
sections. e.g. On Darwin that would be .literal4 and .literal8.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28977 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-29 00:26:09 +00:00
Jim Laskey
d5a932b92a Was pointed out that structure alignment and type alignment are not the same
thing.  Doubles still need to be special cased.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28806 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 19:37:14 +00:00
Jim Laskey
35f8c208a9 Alignment of globals has not been quite right. Needed to drop the pointer type
to get the alignment of the element type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28799 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 13:10:58 +00:00
Evan Cheng
a9767f6218 Assert. Rather than silently stop printing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28794 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-15 08:10:56 +00:00
Chris Lattner
fd561cded3 Fix an assert-on-inline-inline-asm bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28727 91177308-0d34-0410-b5e6-96231b3b80d8
2006-06-08 18:00:47 +00:00
Chris Lattner
9dcb780e23 Remove dead var
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28250 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 17:50:35 +00:00
Owen Anderson
07000c6f01 Refactor a bunch of includes so that TargetMachine.h doesn't have to include
TargetData.h.  This should make recompiles a bit faster with my current
TargetData tinkering.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28238 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-12 06:33:49 +00:00
Chris Lattner
c8d37c6e14 Fix a regression in my patch from last night that broke the llvmgcc4 build on
ppc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28205 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 16:41:59 +00:00
Chris Lattner
7faec9b93a Implement MASM sections correctly, without a "has masm sections flag" and a bunch of special case code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28194 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 05:33:48 +00:00
Chris Lattner
a7090ae7a3 Oh yeah, there are two of these now, unify both.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28192 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 05:24:50 +00:00
Chris Lattner
b81cb6133e Setting SwitchToSectionDirective properly in the MASM backend permits a bunch
of code to be unified.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28191 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 05:23:12 +00:00
Chris Lattner
23b9eac4cb Don't prefix section directives with a tab. Doing so causes blank lines to
be emitted to the .s file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28189 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 05:19:59 +00:00
Chris Lattner
13f161c518 Make the masm codepath work like the normal code path.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28188 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 05:15:58 +00:00
Chris Lattner
4ca4bb1ed2 The MASM asmprinter has been fixed, these hacks are no longer needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28186 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 05:13:34 +00:00
Chris Lattner
4632d7a570 Split SwitchSection into SwitchTo{Text|Data}Section methods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28184 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-09 04:59:56 +00:00
Jeff Cohen
d43b18d9e4 Fix some loose ends in MASM support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28148 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-06 21:27:14 +00:00
Chris Lattner
1c05997bd8 Indent multiline asm strings more nicely
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28132 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-05 21:47:05 +00:00
Owen Anderson
a69571c799 Refactor TargetMachine, pushing handling of TargetData into the target-specific subclasses. This has one caller-visible change: getTargetData() now returns a pointer instead of a reference.
This fixes PR 759.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28074 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-03 01:29:57 +00:00
Nate Begeman
9d51eeb8bc Print function number instead of name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28057 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 17:36:46 +00:00
Nate Begeman
cdf38c4edb Extend printBasicBlockLabel a bit so that it can be used to print all
basic block labels, consolidating the code to do so in one place for each
target.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28050 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 05:37:32 +00:00
Jeff Cohen
51b776d259 De-virtualize SwitchSection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28047 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-02 03:58:45 +00:00