Chris Lattner
e339d60351
mc'ize some stuff, don't comment out .lcomm directive in -fverbose-asm mode.
...
llvm-svn: 93860
2010-01-19 06:01:04 +00:00
Chris Lattner
f0edf967c7
hookize the cygwin ".linkonce" directive.
...
llvm-svn: 93855
2010-01-19 05:08:13 +00:00
Chris Lattner
7351e3a364
add a bool for whether .lcomm takes an alignment instead of basing this on "isdarwin".
...
llvm-svn: 93852
2010-01-19 04:48:20 +00:00
Chris Lattner
3821a5f168
move production of .reference directives for static ctor/dtor list on
...
darwin into common code.
llvm-svn: 93849
2010-01-19 04:34:02 +00:00
Chris Lattner
816fcd1287
Cleanup handling of .zerofill on darwin:
...
1. TargetLoweringObjectFileMachO should decide if something
goes in zerofill instead of having every target do it.
2. TargetLoweringObjectFileMachO should assign said symbols to
the right MCSection, the asmprinters should just emit to the
right section.
3. Since all zerofill stuff goes through mcstreamer anymore,
MAI can have a bool "haszerofill" instead of having the textual
directive to emit.
llvm-svn: 93838
2010-01-19 02:09:44 +00:00
Nate Begeman
3c96073ce7
Remove this fixme, looking at the linker source, all targets pad to 4 bytes.
...
llvm-svn: 93835
2010-01-19 01:32:44 +00:00
Chris Lattner
86287085ba
remove the MAI argument to MCExpr::print and switch overthing to use << when printing them.
...
llvm-svn: 93699
2010-01-18 00:37:40 +00:00
Chris Lattner
6f360c3c91
now that MCSymbol::print doesn't use it's MAI argument, we can
...
remove it and change all the code that prints MCSymbols to use
<< instead, which is much simpler and cleaner.
llvm-svn: 93695
2010-01-17 21:43:43 +00:00
Chris Lattner
bd2eeabe74
rename NameNeedsEscaping -> NameNeedsQuoting, eliminate the check
...
for first character which is a digit, mangler would have taken care
of this already.
llvm-svn: 93694
2010-01-17 20:11:03 +00:00
Chris Lattner
f7c6508544
Get MCSymbol out of the mangling business, and move all the logic
...
to Mangler. Now MCSymbol just decides whether to slap quotes around
a symbol when printing it.
This also fixes some weirdness where two MCSymbols could be created
for the same symbol, if one needed to be mangled and got mangled to
the other one.
llvm-svn: 93690
2010-01-17 19:23:46 +00:00
Nate Begeman
04da97bd5e
Add a note for the macho streamer and remove a used of the mangler from the soon to be defunct machowriter pass.
...
llvm-svn: 93670
2010-01-17 03:49:01 +00:00
Chris Lattner
493580bb5c
unbreak the build, grr symlinks.
...
llvm-svn: 93539
2010-01-15 19:51:05 +00:00
Chris Lattner
836cf5d129
extend MCAsmParser::ParseExpression and ParseParenExpression
...
to return range information for subexpressions. Use this to
provide range info for several new X86Operands.
llvm-svn: 93534
2010-01-15 19:28:38 +00:00
Chris Lattner
c073f1009a
tidy
...
llvm-svn: 93352
2010-01-13 21:21:29 +00:00
Chris Lattner
9498bee8a3
expose a static function as a static method on the MCSymbol class.
...
llvm-svn: 93350
2010-01-13 21:09:59 +00:00
David Greene
ed1e2c4453
Change errs() to dbgs().
...
llvm-svn: 92635
2010-01-05 01:28:22 +00:00
David Greene
d4ba9148d2
Change errs() to dbgs().
...
llvm-svn: 92634
2010-01-05 01:28:17 +00:00
David Greene
b0b06156ab
Change errs() to dbgs().
...
llvm-svn: 92632
2010-01-05 01:28:10 +00:00
David Greene
718ca3f5b6
Change errs() to dbgs().
...
llvm-svn: 92630
2010-01-05 01:28:07 +00:00
Daniel Dunbar
4daaf9d3f4
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Chandler Carruth
766362c707
Move DataTypes.h to include/llvm/System, update all users. This breaks the last
...
direct inclusion edge from System to Support.
llvm-svn: 85086
2009-10-26 01:35:46 +00:00
Chris Lattner
df848440d1
add a twine version of MCContext::GetOrCreateSymbol.
...
llvm-svn: 84561
2009-10-19 22:49:00 +00:00
Daniel Dunbar
2be596c127
MC: Set symbol values in MachO MCStreamer.
...
llvm-svn: 84236
2009-10-16 01:58:23 +00:00
Daniel Dunbar
4943610506
Minor formatting tweaks.
...
llvm-svn: 84235
2009-10-16 01:58:15 +00:00
Daniel Dunbar
0df659c00b
MC: Switch assembler API to using MCExpr instead of MCValue.
...
llvm-svn: 84234
2009-10-16 01:58:03 +00:00
Daniel Dunbar
022b59a0b5
MC: Remove unneeded context argument to MCExpr::Evaluate*.
...
llvm-svn: 84233
2009-10-16 01:57:52 +00:00
Daniel Dunbar
af3162e523
MC: Tweak variable assignment diagnostics, and make reassignment of non-absolute
...
variables and symbols invalid.
llvm-svn: 84232
2009-10-16 01:57:39 +00:00
Daniel Dunbar
a4df6e46a4
MC: When parsing a variable reference, substitute absolute variables immediately
...
since they are allowed to be redefined.
llvm-svn: 84230
2009-10-16 01:34:54 +00:00
Daniel Dunbar
6b7edc035b
MC: Move assembler variable values from MCContext to MCSymbol.
...
llvm-svn: 84229
2009-10-16 01:33:57 +00:00
Daniel Dunbar
c5165c4258
MC: Switch MCContext value table to storing MCExprs.
...
llvm-svn: 84228
2009-10-16 01:33:11 +00:00
Kevin Enderby
ef201aaa04
Fixed MCSectionMachO::ParseSectionSpecifier to allow an attribute of "none" so
...
that a symbol stub section with no attributes can be parsed as in:
.section __TEXT,__picsymbolstub4,symbol_stubs,none,16
llvm-svn: 83488
2009-10-07 20:57:20 +00:00
Edward O'Callaghan
8b7189e234
No newline at end of files.
...
llvm-svn: 83318
2009-10-05 18:43:19 +00:00
Chris Lattner
fd910fd2f7
eliminate a use of strtoul.
...
llvm-svn: 82382
2009-09-20 06:58:54 +00:00
Anton Korobeynikov
fb7ac49d96
Allow symbols to start from the digit if target requests it. This allows, e.g. pinning
...
variables to specified absolute address. Make use of this feature for MSP430.
This unbreaks PR4776.
llvm-svn: 82227
2009-09-18 16:57:42 +00:00
Chris Lattner
7b52d90c9e
Big change #1 for personality function references:
...
Eliminate the PersonalityPrefix/Suffix & NeedsIndirectEncoding
fields from MAI: they aren't part of the asm syntax, they are
related to the structure of the object file.
To replace their functionality, add a new
TLOF::getSymbolForDwarfGlobalReference method which asks targets
to decide how to reference a global from EH in a pc-relative way.
The default implementation just returns the symbol. The default
darwin implementation references the symbol through an indirect
$non_lazy_ptr stub. The bizarro x86-64 darwin specialization
handles the weird "foo@GOTPCREL+4" hack.
DwarfException.cpp now uses this to emit the reference to the
symbol in the right way, and this also eliminates another
horrible hack from DwarfException.cpp:
- if (strcmp(MAI->getPersonalitySuffix(), "+4@GOTPCREL"))
- O << "-" << MAI->getPCSymbol();
llvm-svn: 81991
2009-09-16 01:46:41 +00:00
Chris Lattner
006af669b4
add a helper method for creating MCSymbol and MCSymbolRefExpr at
...
the same time.
llvm-svn: 81984
2009-09-16 01:26:31 +00:00
Chris Lattner
249d5fe8b9
remove some horrible MAI hooks which fortunately turn out to be always empty.
...
llvm-svn: 81946
2009-09-15 23:11:32 +00:00
Daniel Dunbar
d729752a24
Update CMake.
...
llvm-svn: 81757
2009-09-14 05:22:47 +00:00
Chris Lattner
4a33f01892
Change MCAsmStreamer to take an MCInstPrinter instead of a
...
full AsmPrinter, and change TargetRegistry to keep track
of registered MCInstPrinters.
llvm-mc is still linking in the entire
target foo to get the code emitter stuff, but this is an
important step in the right direction.
llvm-svn: 81754
2009-09-14 03:02:37 +00:00
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