Commit Graph

95 Commits

Author SHA1 Message Date
Anton Korobeynikov 5c0d2bd46e Distinguish .const and .const_data on Darwin, when needed. This is somehow crazy :)
llvm-svn: 53350
2008-07-09 20:01:42 +00:00
Anton Korobeynikov 92e4ac1599 Weak stuff always goes to coalesced sections on Darwin
llvm-svn: 53340
2008-07-09 19:06:02 +00:00
Anton Korobeynikov ee09e66a01 Add FIXME needed to be resolved later
llvm-svn: 53324
2008-07-09 13:30:02 +00:00
Anton Korobeynikov d5cf47d853 Typo
llvm-svn: 53322
2008-07-09 13:29:27 +00:00
Anton Korobeynikov daee281590 First sketch of special section objects
llvm-svn: 53320
2008-07-09 13:28:49 +00:00
Anton Korobeynikov 03dc8bf4d6 Honour text sections
llvm-svn: 53319
2008-07-09 13:28:19 +00:00
Anton Korobeynikov 577c45dd74 Use isWeakForLinker() hook
llvm-svn: 53318
2008-07-09 13:27:59 +00:00
Anton Korobeynikov 3d3d12f431 Another bunch of hacks for named sections support
llvm-svn: 53315
2008-07-09 13:26:52 +00:00
Anton Korobeynikov 4f125b7217 Typo
llvm-svn: 53314
2008-07-09 13:26:24 +00:00
Anton Korobeynikov 9da4fd0f2e Drop mergeable flag, if size is no suitable
llvm-svn: 53313
2008-07-09 13:26:05 +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 1e4dc36be4 Add funny darwin section selection logic
llvm-svn: 53307
2008-07-09 13:23:57 +00:00
Anton Korobeynikov 908998f071 Handle ELF mergeable sections
llvm-svn: 53306
2008-07-09 13:23:37 +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 94ff6f02ef Print entity size for mergeable sections
llvm-svn: 53303
2008-07-09 13:22:17 +00:00
Anton Korobeynikov 4e4f3168dd Split PrintSectionFlags
llvm-svn: 53302
2008-07-09 13:21:49 +00:00
Anton Korobeynikov cf638bfaac Split UniqueSectionForGlobal()
llvm-svn: 53301
2008-07-09 13:21:29 +00:00
Anton Korobeynikov d947aa838c Split PreferredEHDataFormat hook
llvm-svn: 53300
2008-07-09 13:21:08 +00:00
Anton Korobeynikov 9a6ed374f8 Split X86TargetAsmInfo into 4 subtarget-specific classes
llvm-svn: 53299
2008-07-09 13:20:48 +00:00
Anton Korobeynikov 84fd5698f3 Whitespace cleanup
llvm-svn: 53298
2008-07-09 13:20:27 +00:00
Anton Korobeynikov 2633a040a3 Move flag decoding stuff into special hook
llvm-svn: 53297
2008-07-09 13:20:07 +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
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
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 6fd71c6512 Use a dedicated IsLinux flag instead of an ELFLinux TargetType.
llvm-svn: 50649
2008-05-05 16:11:31 +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
Gabor Greif e9ecc68d8f API changes for class Use size reduction, wave 1.
Specifically, introduction of XXX::Create methods
for Users that have a potentially variable number of
Uses.

llvm-svn: 49277
2008-04-06 20:25:17 +00:00
Dale Johannesen ad6c23d5e9 Use ## for comment delimiter on darwin x86-32, so
llvm's output .s files will go through gcc -std=c99
without triggering preprocesser errors.  Approach
suggested by Daveed Vandevoorde.

llvm-svn: 48808
2008-03-25 23:29:30 +00:00
Dan Gohman bdc24adaaf A quick nm audit turned up several fixed tables and objects that were
marked read-write. Use const so that they can be allocated in a
read-only segment.

llvm-svn: 48800
2008-03-25 21:45:14 +00:00
Bill Wendling 2f6ab65d77 On Darwin, GCC issues a ".globl" for something that has a "visibility protected"
attribute instead of ".protected".

llvm-svn: 48516
2008-03-18 23:38:12 +00:00
Anton Korobeynikov 0e8b146152 Use enumeration for preffered EH dwarf encoding reason
llvm-svn: 47770
2008-02-29 22:09:08 +00:00
Evan Cheng c799065cc3 Add a quick and dirty "loop aligner pass". x86 uses it to align its loops to 16-byte boundaries.
llvm-svn: 47703
2008-02-28 00:43:03 +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 59a2250b0d Fix and enable EH for x86-64 Darwin. Adds
ShortenEHDataFor64Bits as a not-very-accurate
abstraction to cover all the changes in DwarfWriter.
Some cosmetic changes to Darwin assembly code for
gcc testsuite compatibility.

llvm-svn: 46029
2008-01-15 23:24:56 +00:00
Dale Johannesen 2ff66f08f2 Weak things initialized to 0 don't go in bss on Darwin.
Cosmetic changes to spacing to match gcc (some dejagnu
tests actually care).

llvm-svn: 45848
2008-01-11 00:54:37 +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
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
Dale Johannesen 7904708369 Revert previous; these files aren't ready to go in yet.
llvm-svn: 44057
2007-11-13 19:16:02 +00:00
Dale Johannesen 7a7085f6d3 Add parameter to getDwarfRegNum to permit targets
to use different mappings for EH and debug info;
no functional change yet.
Fix warning in X86CodeEmitter.

llvm-svn: 44056
2007-11-13 19:13:01 +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
Bill Wendling 862afea91e Add the PCSymbol for Darwin x86 platforms.
llvm-svn: 41284
2007-08-22 18:44:05 +00:00
Anton Korobeynikov f335679b52 Use only 1 knob to enable exceptions on Darwin :).
llvm-svn: 41208
2007-08-21 00:31:30 +00:00
Chandler Carruth 7132e00de7 This is the patch to provide clean intrinsic function overloading support in LLVM. It cleans up the intrinsic definitions and generally smooths the process for more complicated intrinsic writing. It will be used by the upcoming atomic intrinsics as well as vector and float intrinsics in the future.
This also changes the syntax for llvm.bswap, llvm.part.set, llvm.part.select, and llvm.ct* intrinsics. They are automatically upgraded by both the LLVM ASM reader and the bitcode reader. The test cases have been updated, with special tests added to ensure the automatic upgrading is supported.

llvm-svn: 40807
2007-08-04 01:51:18 +00:00