1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

177 Commits

Author SHA1 Message Date
Rafael Espindola
c4e90a84c4 Implement MCAsmStreamer::EmitCFIDefCfa.
llvm-svn: 130543
2011-04-29 21:41:06 +00:00
Devang Patel
acce3eb6b2 Hoist MCLineEntry construction AsmPrinter so that anyone who derives from AsmPrinter can have line number entries.
PR 9810

llvm-svn: 130518
2011-04-29 18:00:54 +00:00
Rafael Espindola
133c684456 Factor a bit of code to MCStreamer::EmitLabel. Keep track of the last
non private symbol. This will be use for handling

foo:
  .cfi_startproc
  ...

On OS X where we have to create a foo.eh symbol.

llvm-svn: 130305
2011-04-27 15:21:19 +00:00
Rafael Espindola
856ed14418 Remove unused argument.
llvm-svn: 129955
2011-04-21 23:39:26 +00:00
Devang Patel
7220c1a021 Reduce clutter in asm output. Do not emit source location as comment for each instruction.
llvm-svn: 129715
2011-04-18 20:26:49 +00:00
Rafael Espindola
63f8a9ad72 Be consistent about being virtual and returning void in the cfi methods.
Implement the ones that were missing in the asm streamer.

llvm-svn: 129413
2011-04-12 23:59:07 +00:00
NAKAMURA Takumi
dcd45bec2e Fix whitespace.
llvm-svn: 128370
2011-03-27 01:44:40 +00:00
Anton Korobeynikov
917ca94111 Preliminary support for ARM frame save directives emission via MI flags.
This is just very first approximation how the stuff should be done
(e.g. ARM-only for now). More to follow.

llvm-svn: 127101
2011-03-05 18:43:32 +00:00
Anton Korobeynikov
62e48532b9 Some first rudimentary support for ARM EHABI: print exception table in "text mode".
llvm-svn: 127099
2011-03-05 18:43:15 +00:00
Cameron Zwarich
974208a607 Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.
llvm-svn: 126488
2011-02-25 16:30:32 +00:00
Devang Patel
f2b2417c2c Enable DebugInfo support for COFF object files.
Patch by Nathan Jeffords!

llvm-svn: 126425
2011-02-24 21:04:00 +00:00
Rafael Espindola
b59fdeb3de Add support for pushsection and popsection. Patch by Joerg Sonnenberger.
llvm-svn: 125629
2011-02-16 01:08:29 +00:00
Anton Korobeynikov
aeeec825cd Use common style for .cfi directives
llvm-svn: 123472
2011-01-14 21:57:39 +00:00
Evan Cheng
579f2b17bf Add comment about Thumb2 fixup comments being completely bogus.
llvm-svn: 123411
2011-01-13 23:27:39 +00:00
Evan Cheng
cf9949ddbd Relax an assertion. On archs like ARM, an immediate field may be scattered. So it's possible for some bits of every 8 bits to be encoded already, and the rest still needs to be fixed up.
llvm-svn: 123403
2011-01-13 21:45:26 +00:00
Rafael Espindola
12c30aed07 Add support for .cfi_lsda.
llvm-svn: 122584
2010-12-27 15:56:22 +00:00
Rafael Espindola
e7e67fce10 Add support for the same encodings of the personality function that gnu as
supports.

llvm-svn: 122577
2010-12-27 00:36:05 +00:00
Nick Lewycky
c85935836b Add missing standard headers. Patch by Joerg Sonnenberger!
llvm-svn: 122193
2010-12-19 20:43:38 +00:00
Daniel Dunbar
fc14f1e5f6 MC: Move target specific fixup info descriptors to TargetAsmBackend instead of
the MCCodeEmitter, which seems like a better organization.
 - Also, cleaned up some magic constants while in the area.

llvm-svn: 121953
2010-12-16 03:20:06 +00:00
Daniel Dunbar
8ab9be2005 MC: Make TargetAsmBackend available to the AsmStreamer.
- Treaty talks on the non-proliferation of MC objects broke down.

llvm-svn: 121949
2010-12-16 03:05:59 +00:00
Rafael Espindola
0e665e502d Fixed version of 121434 with no new memory leaks.
llvm-svn: 121471
2010-12-10 07:39:47 +00:00
Rafael Espindola
011e168728 Revert my previous patch to make the valgrind bots happy.
llvm-svn: 121461
2010-12-10 04:01:09 +00:00
Rafael Espindola
03ad1e8f1f Initial support for the cfi directives. This is just enough to get
f:
        .cfi_startproc
        nop
        .cfi_endproc

assembled (on ELF).

llvm-svn: 121434
2010-12-09 23:48:29 +00:00
Rafael Espindola
3e954d16f4 Second try at making direct object emission produce the same results
as llc + llvm-mc. This time ELF is not changed and I tested that llvm-gcc
bootstrap on darwin10 using darwin9's assembler and linker.

llvm-svn: 121006
2010-12-06 17:27:56 +00:00
Rafael Espindola
9215947c83 There are two reasons why we might want to use
foo = a - b
.long foo
instead of just
.long a - b

First, on darwin9 64 bits the assembler produces the wrong result. Second,
if "a" is the end of the section all darwin assemblers (9, 10 and mc) will not
consider a - b to be a constant but will if the dummy foo is created.

Split how we handle these cases. The first one is something MC should take care
of. The second one has to be handled by the caller.

llvm-svn: 120889
2010-12-04 03:21:47 +00:00
Rafael Espindola
50b6170457 Next step: Only pad debug_line when the target is darwin. Add a FIXME to avoid
doing that if the target is darwin10 or newer.

This fixes
*) Direct object emission was producing objects without the workaround on
   darwin9.
*) Assembly printing was producing objects with the workaround on linux.

llvm-svn: 120866
2010-12-04 00:31:13 +00:00
Rafael Espindola
ec560cdae3 Make EmitIntValue more efficient and more like what we do for leb128. The
difference is much smaller (about 0.3s) but significant.

llvm-svn: 120787
2010-12-03 02:54:21 +00:00
Rafael Espindola
dc103b1755 Do with uleb the same trick we now do with dwarf line/address advances. This
avoids creating leb128 fragments and speeds up the test in PR8711 to 33s.

llvm-svn: 120774
2010-12-03 01:19:49 +00:00
Rafael Espindola
3e119b0bb4 Try to resolve symbol differences early, and if successful create a plain
data fragment. This reduces the time to assemble the test in 8711 from 60s to
54s.

llvm-svn: 120767
2010-12-03 00:55:40 +00:00
Devang Patel
77a1457f1a It may not be an option to skip .debug_line if there are file reference in already emitted debug info. So, for now, emit dummy line table entry to make older linker and assemblers happy. This is not a new behavior, original AsmPrinter emitted similar line table entries.
llvm-svn: 120760
2010-12-03 00:10:48 +00:00
Devang Patel
822facd787 Use set directive for StartMinusEndExpr.
This is a fix for llvm-gcc-i386-darwin9 buildbot failure.

llvm-svn: 120742
2010-12-02 21:32:30 +00:00
Devang Patel
525de51e78 If tehre are not any line entry then do not try to emit .debug_line section.
llvm-svn: 120637
2010-12-02 01:17:51 +00:00
Rafael Espindola
d5f118a011 Make EmitIntValue non virtual.
llvm-svn: 120271
2010-11-28 23:22:44 +00:00
Rafael Espindola
e20c3d7c26 Add basic CFI methods to the streamer interface.
llvm-svn: 119972
2010-11-22 14:27:24 +00:00
Kevin Enderby
214e641d8d Added support for the Mach-O .symbol_resolver directive. rdar://8673046
llvm-svn: 119816
2010-11-19 18:39:33 +00:00
Rafael Espindola
921ef0c471 Fix llvm-gcc boostrap on OS X by avoiding printing sleb and uleb when
possible.

llvm-svn: 119785
2010-11-19 04:10:13 +00:00
Rafael Espindola
b33e5e07e1 Change some methods in MCDwarf.cpp to be able to handle an arbitrary
MCStreamer instead of just MCObjectStreamer. Address changes cannot
be as efficient as we have to use DW_LNE_set_addres, but at least
most of the logic is shared.

This will be used so that, with CodeGen still using EmitDwarfLocDirective,
llvm-gcc is able to produce debug_line sections without needing an
assembler that supports .loc.

llvm-svn: 119777
2010-11-19 02:26:16 +00:00
Rafael Espindola
283e6bd938 Add .loc methods to the streamer.
Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer
and then switch codegen to use it.

llvm-svn: 119384
2010-11-16 21:20:32 +00:00
Chris Lattner
3b5f2a871a correct the fixup comment printer to work on big endian platforms.
llvm-svn: 119122
2010-11-15 05:56:19 +00:00
Rafael Espindola
d2ff64abae Fix warning and add support for printing gnu_unique_object.
llvm-svn: 118981
2010-11-13 04:55:06 +00:00
Jim Grosbach
a98b9ba916 Add '.code 32' assembler directive to MC streamers.
llvm-svn: 118309
2010-11-05 22:40:09 +00:00
Jim Grosbach
bbef2c5fcc MC'ize the '.code 16' and '.thumb_func' ARM directives.
llvm-svn: 118301
2010-11-05 22:08:08 +00:00
Rafael Espindola
3f4a79b243 Add 118023 back, but with proper spelling for .uleb128/.sleb128.
llvm-svn: 118254
2010-11-04 18:17:08 +00:00
Rafael Espindola
1db6a21aff Add support for expressions in .sleb/.uleb directives.
llvm-svn: 118023
2010-11-02 17:22:24 +00:00
Rafael Espindola
7a38cb0144 Implement .weakref.
llvm-svn: 117911
2010-11-01 14:28:48 +00:00
Jason W Kim
7822e6aab5 Tiny patch for proof-of-concept cleanup of ARMAsmPrinter::EmitStartOfAsmFile()
Small test for sanity check of resulting ARM .s file.
Tested against -r115129.

llvm-svn: 115133
2010-09-30 02:45:56 +00:00
Chris Lattner
04d9e1641f allow target-specific label suffixes, patch by Yuri Gribov!
llvm-svn: 114592
2010-09-22 22:19:53 +00:00
Jim Grosbach
8899a330c7 grammar tweakage
llvm-svn: 114561
2010-09-22 18:18:30 +00:00
Jim Grosbach
f8956463a7 remove trailing whitespace
llvm-svn: 114560
2010-09-22 18:16:55 +00:00
Rafael Espindola
8a987c002e Add a InitSections method to the streamer interface.
The ELF implementation now creates text, data and bss to match the gnu as
behavior.

The text streamer still has the old MachO specific behavior since
the testsuite checks that it will error when a directive is given
before a setting the current section for example.

A nice benefit is that -n is not required anymore when producing
ELF files.

llvm-svn: 114027
2010-09-15 21:48:40 +00:00