Bill Wendling
066b5f6724
GCC doesn't emit DW_EH_PE_sdata4 for the FDE encoding on Darwin. I'm not sure
...
about other platforms.
llvm-svn: 61415
2008-12-24 05:25:49 +00:00
Rafael Espindola
cda011b5ad
Fix bug 3140.
...
Print a single parameter .file directive if we have an ELF target.
llvm-svn: 60480
2008-12-03 11:01:37 +00:00
Dan Gohman
ac41d9f5d8
Refactor various TargetAsmInfo subclasses' TargetMachine members away
...
adding a TargetMachine member to the base TargetAsmInfo class instead.
llvm-svn: 58624
2008-11-03 18:22:42 +00:00
Duncan Sands
08d91178e9
Rename isWeakForLinker to mayBeOverridden. Use it
...
instead of hasWeakLinkage in a bunch of optimization
passes.
llvm-svn: 56782
2008-09-29 11:25:42 +00:00
Anton Korobeynikov
87001fd6fd
Reapply 56585:56589 with proper fix for some gcc versions
...
llvm-svn: 56621
2008-09-25 21:00:33 +00:00
Evan Cheng
84301390ae
Temporarily backing out 56585:56589 to unbreak the build.
...
llvm-svn: 56607
2008-09-25 07:38:08 +00:00
Anton Korobeynikov
77aa975bdd
Use crazy template-based inheritance instead of virtual one.
...
llvm-svn: 56585
2008-09-24 22:21:39 +00:00
Anton Korobeynikov
8e7b93938d
Get rid of ReadOnlySection duplicate
...
llvm-svn: 56582
2008-09-24 22:20:27 +00:00
Anton Korobeynikov
5906234c1d
Get rid of now unused {Four,Eight,Sixteen}ByteConstantSection
...
llvm-svn: 56580
2008-09-24 22:18:54 +00:00
Anton Korobeynikov
22db30548d
Get rid of duplicate char*/Section* stuff for TLS sections
...
llvm-svn: 56577
2008-09-24 22:17:06 +00:00
Anton Korobeynikov
7497762606
Get rid of duplicate char*/Section* DataSection
...
llvm-svn: 56575
2008-09-24 22:16:16 +00:00
Anton Korobeynikov
f8dc8aac3c
Get rid of duplicate char*/Section* TextSection
...
llvm-svn: 56574
2008-09-24 22:15:21 +00:00
Anton Korobeynikov
076e905b94
Move actual section printing stuff to AsmPrinter from TAI reducing heap traffic.
...
llvm-svn: 56573
2008-09-24 22:14:23 +00:00
Dale Johannesen
f080225490
Fix logic for not emitting no-dead-strip for some
...
objects in llvm.used (thanks Anton). Makes visible
the magic 'l' prefix for symbols on Darwin which are
to be passed through the assembler, then removed at
linktime (previously all references to this had been
hidden in the ObjC FE code, oh well).
llvm-svn: 55973
2008-09-09 01:21:22 +00:00
Anton Korobeynikov
2ae5446b62
Add interface for section override. Use this for Sparc, since it should use named BSS section.
...
llvm-svn: 54844
2008-08-16 12:58:12 +00:00
Anton Korobeynikov
bd890b1faf
Move SLEB/ULEB size calculation routines from AsmPrinter to TargetAsmInfo. This makes JIT asmprinter-free.
...
llvm-svn: 54843
2008-08-16 12:57:46 +00:00
Anton Korobeynikov
44b4a9a05d
Reduce heap trashing due to std::string construction / concatenation via caching of section flags string representations
...
llvm-svn: 54842
2008-08-16 12:57:07 +00:00
Evan Cheng
df8c7faf60
Undo most of r54519.
...
llvm-svn: 54534
2008-08-08 17:56:50 +00:00
Evan Cheng
655fa0fec4
It's not legal to output a GV in a coalesced section if it's used in an ARM PIC relative constantpool.
...
llvm-svn: 54519
2008-08-08 06:56:16 +00:00
Anton Korobeynikov
8ab2f49536
Provide convenient helpers
...
llvm-svn: 54451
2008-08-07 09:51:54 +00:00
Anton Korobeynikov
ef643a4850
Select section for constant pool entries
...
llvm-svn: 54448
2008-08-07 09:50:34 +00:00
Anton Korobeynikov
4fdeb9b2d3
Provide default implementation of different small-sections related stuff
...
llvm-svn: 53920
2008-07-22 17:09:59 +00:00
Bruno Cardoso Lopes
9cfd2f8e57
Basic support for small sections
...
llvm-svn: 53907
2008-07-22 15:26:53 +00:00
Dan Gohman
efa4160fcc
TargetAsmInfo::SectionForGlobal showed up in a profile. Simplify it a little.
...
llvm-svn: 53639
2008-07-15 18:37:51 +00:00
Anton Korobeynikov
56827c1b60
Use only 'subset' of flags
...
llvm-svn: 53323
2008-07-09 13:29:44 +00:00
Anton Korobeynikov
daee281590
First sketch of special section objects
...
llvm-svn: 53320
2008-07-09 13:28:49 +00:00
Anton Korobeynikov
577c45dd74
Use isWeakForLinker() hook
...
llvm-svn: 53318
2008-07-09 13:27:59 +00:00
Anton Korobeynikov
13b9a22fb0
Fix several bugs in named sections handling
...
llvm-svn: 53312
2008-07-09 13:25:46 +00:00
Anton Korobeynikov
60919583b3
Add hacky way to distinguish named and named sections. This will be generalized in the future.
...
llvm-svn: 53311
2008-07-09 13:25:26 +00:00
Anton Korobeynikov
d789b7c196
Use 'gnu.linkonce', where needed
...
llvm-svn: 53310
2008-07-09 13:24:55 +00:00
Anton Korobeynikov
7504c283f2
Fix thinko
...
llvm-svn: 53309
2008-07-09 13:24:38 +00:00
Anton Korobeynikov
4c37c3ad5b
Provide section selection for X86 ELF targets
...
llvm-svn: 53305
2008-07-09 13:23:08 +00:00
Anton Korobeynikov
9d6939b5fc
Provide general hook for section name calculation
...
llvm-svn: 53304
2008-07-09 13:22:46 +00:00
Anton Korobeynikov
ab778022d5
Properly handle linkonce stuff
...
llvm-svn: 53296
2008-07-09 13:19:38 +00:00
Anton Korobeynikov
7680198798
Provide skeletone code for calculation of section, where global should be emitted into
...
llvm-svn: 53295
2008-07-09 13:19:08 +00:00
Anton Korobeynikov
3ee57868a5
Use 'llvm-linkonce' consistently
...
llvm-svn: 53294
2008-07-09 13:18:38 +00:00
Anton Korobeynikov
21539c6d1e
Add default section name resolution routine
...
llvm-svn: 53292
2008-07-09 13:18:02 +00:00
Anton Korobeynikov
aab504fb19
Constify
...
llvm-svn: 53291
2008-07-09 13:17:36 +00:00
Anton Korobeynikov
9e4ab5023a
Add code for default section falgs computation
...
llvm-svn: 53290
2008-07-09 13:16:59 +00:00
Duncan Sands
04fb6bf468
Linux also does not require exception handling
...
moves in order to get correct debug info. Since
I can't imagine how any target could possibly
be any different, I've just stripped out the
option: now all the world's like Darwin!
llvm-svn: 53134
2008-07-04 09:55:48 +00:00
Bill Wendling
b7bd02be57
Darwin doesn't need exception handling information for the "move" info when
...
debug information is being output, because it's leet!
llvm-svn: 52994
2008-07-01 23:34:48 +00:00
Anton Korobeynikov
2e052a81fd
Start refactoring of asmprinters: provide a TAI hook, which will select a 'section kind' for a global.
...
llvm-svn: 52868
2008-06-28 13:45:57 +00:00
Dale Johannesen
355b74acc2
Add StringConstantPrefix to control what the
...
assembler names of string constants look like.
llvm-svn: 51909
2008-06-03 18:09:06 +00:00
Duncan Sands
e2b0bf43a7
Output correct exception handling and frame info
...
on x86-64 linux. This causes no regressions on
32 bit linux and 32 bit ppc. More tests pass
on 64 bit ppc with no regressions. I didn't
turn on eh on 64 bit linux because the intrinsics
needed to compile the eh runtime aren't done
yet. But if you turn it on and link with the
mainline runtime then eh seems to work fine
on x86-64 linux with this patch. Thanks to
Dale for testing. The main point of the patch
is that if you output that some object is
encoded using 4 bytes you had better not output
8 bytes for it: the patch makes everything
consistent.
llvm-svn: 50825
2008-05-07 19:11:09 +00:00
Dan Gohman
bcde172222
Add AsmPrinter support for emitting a directive to declare that
...
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
2008-05-05 00:28:39 +00:00
Anton Korobeynikov
0e8b146152
Use enumeration for preffered EH dwarf encoding reason
...
llvm-svn: 47770
2008-02-29 22:09:08 +00:00
Lauro Ramos Venancio
714eeb2d55
Initialize TextAlignFillValue. Fix revision 47703.
...
llvm-svn: 47732
2008-02-28 22:14:09 +00:00
Anton Korobeynikov
ae24cca0e4
Preparation step for some cleanup/generalization in EH information emission:
...
provide TAI hook for selection of EH data emission format. Currently unused.
llvm-svn: 47699
2008-02-27 23:33:50 +00:00
Dale Johannesen
00dfb551cc
Missed file from previous checkin.
...
llvm-svn: 46030
2008-01-15 23:25:27 +00:00
Dale Johannesen
7ecb3b79c7
Emit unused EH frames for weak definitions on Darwin,
...
because assembler/linker can't cope with weak absolutes.
PR 1880.
llvm-svn: 45811
2008-01-10 02:03:30 +00:00
Chris Lattner
f3ebc3f3d2
Remove attribution from file headers, per discussion on llvmdev.
...
llvm-svn: 45418
2007-12-29 20:36:04 +00:00
Gordon Henriksen
84c7325ca1
Setting GlobalDirective in TargetAsmInfo by default rather than
...
providing a misleading facility. It's used once in the MIPS backend
and hardcoded as "\t.globl\t" everywhere else.
llvm-svn: 45338
2007-12-23 20:58:16 +00:00
Dale Johannesen
e70850cf7b
Fix compiler warning.
...
llvm-svn: 44261
2007-11-21 00:45:00 +00:00
Dale Johannesen
763e110a9f
Fix .eh table linkage issues on Darwin. Some EH support
...
for Darwin PPC, but it's not fully working yet.
llvm-svn: 44258
2007-11-20 23:24:42 +00:00
Dan Gohman
a1d46c7d0a
TargetAsmInfo::getAddressSize() was incorrect for x86-64 and 64-bit targets
...
other than PPC64. Instead of fixing it, just remove it and fix all the
places that use it to use TargetData::getPointerSize() instead, as there
aren't very many. Most of the references were in DwarfWriter.cpp.
llvm-svn: 42419
2007-09-27 23:12:31 +00:00
Dan Gohman
0cc9d1b93b
Merge hasDotLoc and hasDotFile into hasDotLocAndDotFile since .loc and .file
...
aren't really usable without each other.
llvm-svn: 42274
2007-09-24 21:09:53 +00:00
Bill Wendling
74fb0f1a1c
Add a bool to indicate if we should set the "indirect encoding" bit in the Dwarf
...
information for EH.
llvm-svn: 41852
2007-09-11 17:20:55 +00:00
Bill Wendling
2b8fc31df9
The personality function on Darwin needs a global stub. We then refer to
...
that global stub instead of doing the ".set" thingy we were doing before.
llvm-svn: 41838
2007-09-11 08:27:17 +00:00
Dan Gohman
3a8e2a8b2f
Eliminate some redundant newlines in asm output.
...
llvm-svn: 37574
2007-06-14 15:00:27 +00:00
Anton Korobeynikov
4db0090339
Emit sections/directives in the proper order. This fixes PR1376. Also,
...
some small cleanup was made.
llvm-svn: 36780
2007-05-05 09:04:50 +00:00
Dan Gohman
2675a651b0
Indent the .text, .data, and .bss directives in assembly output, so that
...
they are consistent with the other directives.
llvm-svn: 36687
2007-05-03 18:46:30 +00:00
Anton Korobeynikov
b538f67b1a
Fix couple of bugs connected with eh info:
...
1. Correct output offsets on Linux
2. Fix "style" of personality function. It shouldn't be indirect.
llvm-svn: 36633
2007-05-01 22:23:12 +00:00
Anton Korobeynikov
39f3cffbe3
Implement protected visibility. This partly implements PR1363. Linker
...
should be taught to deal with protected symbols.
llvm-svn: 36565
2007-04-29 18:35:00 +00:00
Dale Johannesen
0a1069d526
Fix generic getInlineAsmLength
...
llvm-svn: 36369
2007-04-23 20:00:17 +00:00
Lauro Ramos Venancio
2518889872
Implement "general dynamic", "initial exec" and "local exec" TLS models for
...
X86 32 bits.
llvm-svn: 36283
2007-04-20 21:38:10 +00:00
Evan Cheng
58aeb9c444
Add ReadOnlySection directive.
...
llvm-svn: 35015
2007-03-08 01:00:38 +00:00
Anton Korobeynikov
942fda027f
Fix DWARF debugging information on x86/Linux and (hopefully)
...
Mingw32/Cygwin targets. This fixes PR978
llvm-svn: 35000
2007-03-07 02:47:57 +00:00
Jim Laskey
af76e0e58f
Add TAI field for exception table section.
...
llvm-svn: 34477
2007-02-21 22:43:40 +00:00
Jim Laskey
c3de9b4b14
Support for non-landing pad exception handling.
...
llvm-svn: 33755
2007-02-01 16:31:34 +00:00
Jim Laskey
b4a2f05d1c
Landing pad-less eh for PPC.
...
llvm-svn: 33622
2007-01-29 18:51:14 +00:00
Chris Lattner
0ee2d46cfe
add new JumpTableSpecialLabelPrefix hook to asmprinter for jumptable emission.
...
llvm-svn: 33314
2007-01-18 01:12:56 +00:00
Chris Lattner
1ceb643f31
add new directive
...
llvm-svn: 33302
2007-01-17 17:42:42 +00:00
Anton Korobeynikov
3f6d52834b
* Fix one more bug in PIC codegen: extra load is needed for *all*
...
non-statics.
* Introduce new option to output zero-initialized data to .bss section.
This can reduce size of binaries. Enable it by default for ELF &
Cygwin/Mingw targets. Probably, Darwin should be also added.
llvm-svn: 33299
2007-01-17 10:33:08 +00:00
Bill Wendling
e21237e59a
Fix for PR1095:
...
LLVM would miscompile ASM dialects when compiling for PPC. Added dialects for
the X86 and PPC backends. It defaults to "0", the first variant of a compound
inline asm expression.
llvm-svn: 33246
2007-01-16 03:42:04 +00:00
Chris Lattner
9f6badbc41
add a new HiddenDirective member for handling visibility.
...
llvm-svn: 33197
2007-01-14 06:27:21 +00:00
Evan Cheng
022030a425
Add weak reference directive.
...
llvm-svn: 32091
2006-12-01 20:47:11 +00:00
Andrew Lenharth
ff35b449a0
Add per-target support for asm translation in the cbe
...
llvm-svn: 31972
2006-11-28 19:52:20 +00:00
Reid Spencer
b51b5c0b1f
Add debug support for X86/ELF targets (Linux). This allows llvm-gcc4
...
generated object modules to be debugged with gdb. Hopefully this helps
pre-release debugging.
llvm-svn: 31299
2006-10-30 22:32:30 +00:00
Reid Spencer
e54243f030
Initialize CStringSection member var.
...
llvm-svn: 31214
2006-10-27 16:14:06 +00:00
Chris Lattner
95129a7f22
Expose method and ivars for measuring inline asm length properly.
...
llvm-svn: 30934
2006-10-13 17:50:07 +00:00
Chris Lattner
8cfd10eff3
Don't bother setting JumpTableTextSection, it is about to disappear
...
llvm-svn: 30745
2006-10-05 03:13:59 +00:00
Chris Lattner
afe6d7a179
Give TargetAsmInfo a virtual dtor, add a new getSectionForFunction method.
...
llvm-svn: 30732
2006-10-05 00:35:16 +00:00
Chris Lattner
66af390631
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.
llvm-svn: 30604
2006-09-26 03:38:18 +00:00
Andrew Lenharth
783a4a9d86
Add support for other relocation bases to jump tables, as well as custom asm directives
...
llvm-svn: 30593
2006-09-24 19:45:58 +00:00
Jim Laskey
ef94ebb666
Oops - forgot to update banner.
...
llvm-svn: 30131
2006-09-06 19:21:41 +00:00
Jim Laskey
681ecbb3b3
Separate target specifc asm properties from asm printers.
...
llvm-svn: 30127
2006-09-06 18:35:33 +00:00