Daniel Dunbar
ad36e8aceb
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +00:00
Chandler Carruth
56869f22c4
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
86dfd73c38
add a twine version of MCContext::GetOrCreateSymbol.
...
llvm-svn: 84561
2009-10-19 22:49:00 +00:00
Daniel Dunbar
5d9134747b
MC: Set symbol values in MachO MCStreamer.
...
llvm-svn: 84236
2009-10-16 01:58:23 +00:00
Daniel Dunbar
e024def785
Minor formatting tweaks.
...
llvm-svn: 84235
2009-10-16 01:58:15 +00:00
Daniel Dunbar
8e6d889d4c
MC: Switch assembler API to using MCExpr instead of MCValue.
...
llvm-svn: 84234
2009-10-16 01:58:03 +00:00
Daniel Dunbar
c3bd60e393
MC: Remove unneeded context argument to MCExpr::Evaluate*.
...
llvm-svn: 84233
2009-10-16 01:57:52 +00:00
Daniel Dunbar
5f339244fb
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
d20cda028a
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
17b9027b5c
MC: Move assembler variable values from MCContext to MCSymbol.
...
llvm-svn: 84229
2009-10-16 01:33:57 +00:00
Daniel Dunbar
584a1b25ef
MC: Switch MCContext value table to storing MCExprs.
...
llvm-svn: 84228
2009-10-16 01:33:11 +00:00
Kevin Enderby
818b6b96cb
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
50d75a6099
No newline at end of files.
...
llvm-svn: 83318
2009-10-05 18:43:19 +00:00
Chris Lattner
a15f0044a0
eliminate a use of strtoul.
...
llvm-svn: 82382
2009-09-20 06:58:54 +00:00
Anton Korobeynikov
592638ae05
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
b866602f06
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
6a833f6806
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
2251293788
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
813efa2551
Update CMake.
...
llvm-svn: 81757
2009-09-14 05:22:47 +00:00
Chris Lattner
11b2fc9ea4
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
de57d8e72b
add a new MCInstPrinter class, move the (trivial) MCDisassmbler ctor inline.
...
llvm-svn: 81745
2009-09-14 01:43:38 +00:00
Chris Lattner
a4760f3642
'printMCInst' doesn't print newlines after instructions anymore.
...
llvm-svn: 81723
2009-09-13 22:24:34 +00:00
Chris Lattner
d940dd5801
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
de79e4fc2e
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
3d6c8ebb58
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
5090e6c4a7
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
c74e09f654
Update CMake files.
...
llvm-svn: 81577
2009-09-11 21:49:45 +00:00
Chris Lattner
d747a9f21f
canonicalize namespace gymnastics
...
llvm-svn: 81402
2009-09-09 23:46:42 +00:00
Sean Callanan
1358fb7feb
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
cada1c1012
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
22833a3cd6
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
7975b8fc32
Print "X-42" instead of "X+-42".
...
llvm-svn: 81203
2009-09-08 06:37:35 +00:00
Chris Lattner
3cfc551f6e
make formatting of expressions more closely match the existing asmprinter.
...
llvm-svn: 81202
2009-09-08 06:34:07 +00:00
Chris Lattner
a0020be758
tidy whitespace.
...
llvm-svn: 81201
2009-09-08 06:27:48 +00:00
Chris Lattner
1945453843
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
f4366a3998
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
1800dff44e
inline insertion operators.
...
llvm-svn: 80888
2009-09-03 05:33:01 +00:00
Chris Lattner
f16a122213
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
4fa0595b94
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
897ffadd2d
llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.
...
llvm-svn: 80578
2009-08-31 08:09:28 +00:00
Daniel Dunbar
b7b2097aac
llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').
...
llvm-svn: 80577
2009-08-31 08:09:09 +00:00
Daniel Dunbar
73da11ebda
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
945e257e99
llvm-mc: Make MCSymbolData symbol member const.
...
llvm-svn: 80573
2009-08-31 08:08:06 +00:00
Daniel Dunbar
02c7254f6d
llvm-mc: Add MCContext to MCAssembler.
...
llvm-svn: 80572
2009-08-31 08:07:55 +00:00
Daniel Dunbar
b34a2b9da1
llvm-mc: Add MCExpr::{dump,print}.
...
llvm-svn: 80570
2009-08-31 08:07:33 +00:00
Daniel Dunbar
f363645da2
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
115e4d6d7b
llvm-mc: Move AsmExpr into MC lib (as MCExpr).
...
llvm-svn: 80567
2009-08-31 08:06:59 +00:00
Daniel Dunbar
6a715dccdf
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
2a2459a291
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
2701eee0ad
llvm-mc: Support .comm emission.
...
llvm-svn: 80351
2009-08-28 07:08:35 +00:00