Chris Lattner
27a850eb70
add a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.
...
llvm-svn: 81745
2009-09-14 01:43:38 +00:00
Chris Lattner
8724d994d0
'printMCInst' doesn't print newlines after instructions anymore.
...
llvm-svn: 81723
2009-09-13 22:24:34 +00:00
Chris Lattner
cb05a87447
remove MAI::JumpTableSpecialLabelPrefix now that MAI
...
has real information about linker private linkage.
llvm-svn: 81695
2009-09-13 19:02:16 +00:00
Chris Lattner
89e5731659
fix MCSymbol printing on darwin to exactly match the mangler (handling of \n and " in a symbol name).
...
llvm-svn: 81683
2009-09-13 18:11:09 +00:00
Chris Lattner
e26af94cd4
Make the MC symbol printer and llvm::Mangler exactly agree on mangling
...
for systems that don't support quoting (PR4966).
llvm-svn: 81682
2009-09-13 18:04:46 +00:00
Chris Lattner
53cca8590c
eliminate the "MBBLabel" MCOperand type, and just use a MCSymbol for
...
MBB labels like everything else.
llvm-svn: 81628
2009-09-12 20:45:03 +00:00
Ted Kremenek
e98d47cdfe
Update CMake files.
...
llvm-svn: 81577
2009-09-11 21:49:45 +00:00
Chris Lattner
9975e8e31a
canonicalize namespace gymnastics
...
llvm-svn: 81402
2009-09-09 23:46:42 +00:00
Sean Callanan
7b789f8cba
Added an abstract superclass, MCDisassembler, for
...
all disassemblers.
Modified the MemoryObject to support 64-bit address
spaces, regardless of the LLVM process's address
width.
Modified the Target class to allow extraction of a
MCDisassembler.
llvm-svn: 81392
2009-09-09 22:49:13 +00:00
Chris Lattner
3b44c382d3
allow @ in symbol names without quoting the identifier. This
...
allows things like @PLT without quotes.
llvm-svn: 81296
2009-09-09 00:14:09 +00:00
Chris Lattner
77fdd07c93
parenthesize symbol names that start with $, fixing X86/dollar-name.ll with
...
the new asmprinter.
llvm-svn: 81269
2009-09-08 23:20:50 +00:00
Chris Lattner
bcf8dbfbcb
Print "X-42" instead of "X+-42".
...
llvm-svn: 81203
2009-09-08 06:37:35 +00:00
Chris Lattner
a07820641d
make formatting of expressions more closely match the existing asmprinter.
...
llvm-svn: 81202
2009-09-08 06:34:07 +00:00
Chris Lattner
141b519df0
tidy whitespace.
...
llvm-svn: 81201
2009-09-08 06:27:48 +00:00
Chris Lattner
6fce76a106
fix MCSymbol printing to exactly match the normal mangler rules so
...
we can diff .s files.
llvm-svn: 80894
2009-09-03 05:57:47 +00:00
Chris Lattner
d4f19950e3
Thread an MCAsmInfo pointer through the various MC printing APIs,
...
and fix a few things using << on MCSymbols to use ->print(). No
functionality change other than unbreaking my previous patch.
llvm-svn: 80890
2009-09-03 05:46:51 +00:00
Chris Lattner
2f6f020b42
inline insertion operators.
...
llvm-svn: 80888
2009-09-03 05:33:01 +00:00
Chris Lattner
25817ab343
output alignment value in hex so that we get:
...
.align 3, 0x90
instead of,
.align 3, 144
suggested by eric.
llvm-svn: 80875
2009-09-03 04:01:10 +00:00
Daniel Dunbar
fbe8d5891a
llvm-mc: Store MCSymbolData value as a pointer (to make MSVC happy).
...
llvm-svn: 80652
2009-09-01 04:09:03 +00:00
Daniel Dunbar
3a44b6da61
llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.
...
llvm-svn: 80578
2009-08-31 08:09:28 +00:00
Daniel Dunbar
b897e807c4
llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').
...
llvm-svn: 80577
2009-08-31 08:09:09 +00:00
Daniel Dunbar
fcb32716eb
llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.
...
Also, use MCInst::print instead of custom code in MCAsmPrinter.
llvm-svn: 80575
2009-08-31 08:08:38 +00:00
Daniel Dunbar
be245a258c
llvm-mc: Make MCSymbolData symbol member const.
...
llvm-svn: 80573
2009-08-31 08:08:06 +00:00
Daniel Dunbar
1689464a71
llvm-mc: Add MCContext to MCAssembler.
...
llvm-svn: 80572
2009-08-31 08:07:55 +00:00
Daniel Dunbar
4e5556dbd1
llvm-mc: Add MCExpr::{dump,print}.
...
llvm-svn: 80570
2009-08-31 08:07:33 +00:00
Daniel Dunbar
053a5f22a0
llvm-mc: Switch MCExpr construction to using static member functions, and taking the MCContext (which now owns all MCExprs).
...
llvm-svn: 80569
2009-08-31 08:07:22 +00:00
Daniel Dunbar
b882c70ff2
llvm-mc: Move AsmExpr into MC lib (as MCExpr).
...
llvm-svn: 80567
2009-08-31 08:06:59 +00:00
Daniel Dunbar
bc61205626
llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported for now.
...
- Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency).
llvm-svn: 80484
2009-08-30 06:17:16 +00:00
Daniel Dunbar
e3cf39c644
llvm-mc: .lsym is more unsupported than unimplemented, pending a use case appearing.
...
Also, all one of the file level flags are implemented.
llvm-svn: 80352
2009-08-28 07:08:47 +00:00
Daniel Dunbar
eec2764d55
llvm-mc: Support .comm emission.
...
llvm-svn: 80351
2009-08-28 07:08:35 +00:00
Daniel Dunbar
5749caa698
llvm-mc: Support .zerofill emission.
...
- I'm still trying to figure out the cleanest way to implement this and match the assembler, currently there are some substantial differences.
llvm-svn: 80347
2009-08-28 05:49:21 +00:00
Daniel Dunbar
1935aed414
llvm-mc: Tweak section alignment and size computation to match 'as' closer.
...
llvm-svn: 80345
2009-08-28 05:49:04 +00:00
Daniel Dunbar
8aa87b9f63
llvm-mc: Factor getSectionData out of SwitchSection.
...
llvm-svn: 80344
2009-08-28 05:48:54 +00:00
Daniel Dunbar
09ed9fabde
llvm-mc: Emit .lcomm as .zerofill.
...
llvm-svn: 80343
2009-08-28 05:48:46 +00:00
Daniel Dunbar
aace3b9577
llvm-mc: Add const to EmitZeroFill section argument.
...
llvm-svn: 80341
2009-08-28 05:48:22 +00:00
Daniel Dunbar
7cf576d72f
llvm-mc: Fix thinko in emitting values.
...
llvm-svn: 80340
2009-08-28 05:48:10 +00:00
Daniel Dunbar
e30a44267c
llvm-mc/Mach-O: Add MCCodeEmitter support, for encoding instructions.
...
- No relocations yet, of course.
llvm-svn: 80235
2009-08-27 08:17:51 +00:00
Daniel Dunbar
b11e3eb82f
llvm-mc: Print encodings after the instruction, and only when we have an asm
...
printer.
llvm-svn: 80233
2009-08-27 07:58:57 +00:00
Daniel Dunbar
ed9714d9eb
Add {MCInst,MCOperand}::{print,dump}
...
llvm-svn: 80231
2009-08-27 07:57:12 +00:00
Daniel Dunbar
abcf0c83cc
Update CMake
...
llvm-svn: 80195
2009-08-27 02:08:37 +00:00
Daniel Dunbar
4316774ac1
llvm-mc: Tweak MCCodeEmitter skeleton.
...
llvm-svn: 80193
2009-08-27 01:34:22 +00:00
Daniel Dunbar
fd042a5019
Sketch TargetRegistry support for MCCodeEmitter abstract interface.
...
- Of course, nothing actually can provide this interface yet.
llvm-svn: 80188
2009-08-27 00:51:57 +00:00
Daniel Dunbar
efbcc2daf9
Try to make MSVC just a little happier.
...
llvm-svn: 80187
2009-08-27 00:38:04 +00:00
Daniel Dunbar
1f70368155
llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.
...
- I moved section creation back into AsmParser. I think policy decisions like
this should be pushed higher, not lower, when possible (in addition the
assembler has flags which change this behavior, for example).
llvm-svn: 80162
2009-08-26 22:13:22 +00:00
Daniel Dunbar
5e9b7483b7
llvm-mc/Mach-O: Set .subsections_via_symbols flag properly.
...
llvm-svn: 80144
2009-08-26 21:22:22 +00:00
Daniel Dunbar
8c38017009
llvm-mc/Mach-O: Add support for relocations.
...
- I haven't really tried to find the "right" way to store the fixups or apply
them, yet. This works, but isn't particularly elegant or fast.
- Still no evaluation support, so we don't actually ever not turn a fixup into
a relocation entry.
llvm-svn: 80089
2009-08-26 13:58:10 +00:00
Daniel Dunbar
45d03f2bbb
llvm-mc/Mach-O: Move symbol indices into the MCSymbolData structure.
...
llvm-svn: 80088
2009-08-26 13:57:54 +00:00
Daniel Dunbar
f7a22e19cf
llvm-mc: Add symbol entries for undefined symbols used in .fill and .org.
...
llvm-svn: 80086
2009-08-26 13:57:37 +00:00
Daniel Dunbar
168f849552
llvm-mc: Change MCContext value table to take const MCSymbol*s.
...
llvm-svn: 80079
2009-08-26 09:16:57 +00:00
Daniel Dunbar
982f304aac
llvm-mc/Mach-O: Add section padding where needed (to align the next section).
...
Also, simplify some of Mach-O writer code which can now use section addresses.
llvm-svn: 80067
2009-08-26 04:13:32 +00:00