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
Benjamin Kramer
dd16ed1618
Add AsmParser support for the ELF .previous directive. Patch by Roman Divacky.
...
llvm-svn: 112849
2010-09-02 18:53:37 +00:00
Benjamin Kramer
d1340209a1
Plug the remaining MC leaks by giving MCObjectStreamer/MCAsmStreamer ownership of the TargetAsmBackend and the MCCodeEmitter.
...
llvm-svn: 109767
2010-07-29 17:48:06 +00:00
Kevin Enderby
9bf8ee521c
Added the darwin .weak_def_can_be_hidden directive.
...
llvm-svn: 107886
2010-07-08 17:22:42 +00:00
Chris Lattner
dbea6d7acb
"This is just a cosmetic change in MCAsmStreamer.cpp/EmitSymbolAttribute: all attributes have now a \t before and after, as done for '.type'.
...
This makes the output look consistent, as well as help some third party assemblers expecting the attributes to be in the second column."
Patch by Arnaud de Grandmaison!
llvm-svn: 106469
2010-06-21 20:35:01 +00:00
Dan Gohman
940f8f3947
Don't call flush() at a library level which isn't checking for errors
...
and doesn't know where the output is going.
llvm-svn: 105274
2010-06-01 16:31:34 +00:00
Daniel Dunbar
f50c283a31
MC: Change MCInst::dump_pretty to not include a trailing newline.
...
llvm-svn: 104696
2010-05-26 15:18:13 +00:00
Eric Christopher
4a9013f115
Make EmitTBSSSymbol take a section argument so that we can find it later.
...
Fix up callers and users.
llvm-svn: 104057
2010-05-18 21:16:04 +00:00
Eric Christopher
950f0d7892
Assume that we'll handle mangling the symbols earlier and just put the
...
symbol to the file as we have it. Simplifies out tbss handling.
llvm-svn: 103928
2010-05-17 02:13:02 +00:00
Eric Christopher
ebea91f168
Add AsmParser support for darwin tbss directive.
...
Nothing uses this yet.
llvm-svn: 103757
2010-05-14 01:50:28 +00:00
Chris Lattner
568058ef71
break coff symbol definition stuff out into proper MCStreamer callbacks,
...
patch by Nathan Jeffords!
llvm-svn: 103346
2010-05-08 19:54:22 +00:00
Daniel Dunbar
9a3d46162f
MC/Mach-O: Mark absolute variable's appropriately, and add Mach-O support for
...
writing them.
- <rdar://problem/7885351> integrated assembler broken for i386 objc code
llvm-svn: 103112
2010-05-05 19:01:05 +00:00
Daniel Dunbar
139bd85642
MC: Reject attempts to define a variable symbol.
...
llvm-svn: 103111
2010-05-05 19:01:00 +00:00
Daniel Dunbar
d2ac9dc48b
MC: Rename MCSymbol::{g,s}etValue -> MCSymbol::{g,s}etVariableValue.
...
llvm-svn: 103095
2010-05-05 17:41:00 +00:00
Chris Lattner
8fb6be1886
fix an ugly wart in the MCInstPrinter api where the
...
raw_ostream to print an instruction to had to be specified
at MCInstPrinter construction time instead of being able
to pick at each call to printInstruction.
llvm-svn: 100307
2010-04-04 05:04:31 +00:00
Chris Lattner
fad8688f5d
allow attaching comments to raw text.
...
llvm-svn: 100292
2010-04-03 22:06:56 +00:00
Chris Lattner
4e8e791414
add a new EmitInlineAsm function to asmprinter to handle inline asm.
...
If we have an MCAsmStreamer, we continue to emit asm textually,
otherwise we (currently) emit an error to errs and ignore it.
llvm-svn: 100289
2010-04-03 21:35:55 +00:00
Daniel Dunbar
38fd48e06b
MCInst: Add ::dump_pretty.
...
llvm-svn: 99216
2010-03-22 21:49:34 +00:00
Chris Lattner
32452cf12f
fix an MCInstPrinter leak that jyasskin pointed out:
...
createAsmStreamer now takes ownership of the instprinter.
llvm-svn: 98939
2010-03-19 05:48:53 +00:00
Chris Lattner
f4dce6a6d8
remove MAI argument from createAsmStreamer since it
...
can get it from the context now.
llvm-svn: 98361
2010-03-12 18:28:53 +00:00
Chris Lattner
405e4a1d63
genericize MCAsmStreamer::EmitCodeAlignment to support other targets
...
so that it doesn't break them when the code generator starts using it.
llvm-svn: 96966
2010-02-23 18:44:31 +00:00
Kevin Enderby
c11390f758
This is the first patch to put the needed bits in place to eventually allow code
...
to be aligned with optimal nops. This patch does not change any functionality
and when the compiler is changed to use EmitCodeAlignment() it should also not
change the resulting output. Once the compiler change is made and everything
looks good the next patch with the table of optimal X86 nops will be added to
WriteNopData() changing the output. There are many FIXMEs in this patch which
will be removed when we have better target hooks (coming soon I hear).
llvm-svn: 96963
2010-02-23 18:26:34 +00:00
Chris Lattner
144a1b7a24
add a new MCInstPrinter::getOpcodeName interface, when it is
...
implemented, llvm-mc --show-inst now uses it to print the
instruction opcode as well as the number.
llvm-svn: 95929
2010-02-11 22:39:10 +00:00
Chris Lattner
b82b965968
make getFixupKindInfo return a const reference, allowing
...
the tables to be const. Teach MCCodeEmitter to handle
the target-indep kinds so that we don't crash on them.
llvm-svn: 95924
2010-02-11 21:27:18 +00:00
Daniel Dunbar
d2035fb242
MC: Switch MCFixup to just hold an MCExpr pointer instead of index into the
...
MCInst it came from.
llvm-svn: 95767
2010-02-10 04:47:08 +00:00
Daniel Dunbar
75df429af0
llvm-mc: Remove --show-fixups and always show as part of --show-encoding.
...
Also, fix a silly memory leak.
llvm-svn: 95752
2010-02-10 01:41:14 +00:00
Chris Lattner
477ce1773c
daniel *really* likes fixups!
...
llvm-svn: 95742
2010-02-10 01:05:28 +00:00
Chris Lattner
ca01d26903
Add ability for MCInstPrinters to add comments for instructions.
...
Enhance the x86 backend to show the hex values of immediates in
comments when they are large. For example:
movl $1072693248, 4(%esp) ## imm = 0x3FF00000
llvm-svn: 95728
2010-02-10 00:10:18 +00:00
Daniel Dunbar
1b050afd4e
llvm-mc: Add --show-fixups option, for displaying the instruction fixup information in the asm comments.
...
llvm-svn: 95710
2010-02-09 23:00:14 +00:00
Daniel Dunbar
ddfda89472
MC: First cut at MCFixup, for getting fixup/relocation information out of an MCCodeEmitter.
...
llvm-svn: 95708
2010-02-09 22:59:55 +00:00
Chris Lattner
18fed3c934
make -show-inst be formatted a bit nicer. Before:
...
movl $3735928559, a ## inst: <MCInst 1273 <MCOperand Reg:0> <MCOperand Imm:1> <MCOperand Reg:0> <MCOperand Expr:(a)> <MCOperand Reg:0> <MCOperand Expr:(3735928559)>>
after:
movl $3735928559, a ## <MCInst #1273
## <MCOperand Reg:0>
## <MCOperand Imm:1>
## <MCOperand Reg:0>
## <MCOperand Expr:(a)>
## <MCOperand Reg:0>
## <MCOperand Expr:(3735928559)>>
llvm-svn: 95637
2010-02-09 00:54:51 +00:00
Chris Lattner
b79cdb101f
print encodings like this:
...
pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0x00,0x00,0x00]
instead of like this:
pslld 69, %mm3 ## encoding: [0x0f,0xf2,0x1c,0x25,0x45,0000,0000,0000]
this only affects 0.
llvm-svn: 95441
2010-02-05 22:20:08 +00:00
Dan Gohman
05d47a0cf5
Use a tab instead of space after .type, for consistency.
...
llvm-svn: 95272
2010-02-04 01:42:13 +00:00
Daniel Dunbar
d997cd69cd
llvm-mc: Add --show-inst option, for showing the MCInst inline with the assembly
...
output.
llvm-svn: 95227
2010-02-03 18:18:30 +00:00