Chris Lattner
9897043928
Rip out the 'is temporary' nonsense from the MCContext interface to
...
create symbols. It is extremely error prone and a source of a lot
of the remaining integrated assembler bugs on x86-64.
This fixes rdar://7807601.
llvm-svn: 99902
2010-03-30 18:10:53 +00:00
Daniel Dunbar
5caf2ff561
MC: Fix refacto in MCExpr evaluation, I mistakenly replaced a fragment address with a symbol address.
...
- This fixes the integrated-as nightly test regressions.
llvm-svn: 99466
2010-03-25 01:03:17 +00:00
Daniel Dunbar
7c969558d9
MC: Direct all {fragment,section,symbol} address access through the MCAsmLayout object.
...
llvm-svn: 99380
2010-03-24 03:43:40 +00:00
Daniel Dunbar
5376c2a431
MC: Sprinkle in some more interesting statistics.
...
llvm-svn: 99350
2010-03-23 23:47:14 +00:00
Daniel Dunbar
5cfb58719d
llvm-mc: Fast path EvaluateAbsolute of constants.
...
llvm-svn: 99348
2010-03-23 23:47:07 +00:00
Daniel Dunbar
9c64ec0a7e
MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will need this for accessing to symbol modifiers.
...
llvm-svn: 98791
2010-03-18 00:59:10 +00:00
Daniel Dunbar
5599256415
MC: Allow modifiers in MCSymbolRefExpr, and eliminate X86MCTargetExpr.
...
- Although it would be nice to allow this decoupling, the assembler needs to be able to reason about MCSymbolRefExprs in too many places to make this viable. We can use a target specific encoding of the variant if this becomes an issue.
- This patch also extends llvm-mc to support parsing of the modifiers, as opposed to lumping them in with the symbol.
llvm-svn: 98592
2010-03-15 23:51:06 +00:00
Daniel Dunbar
aa8f95eb56
MC: Fix a crash on invalid, attempting to evaluate undefined symbols.
...
llvm-svn: 98464
2010-03-14 03:10:40 +00:00
Daniel Dunbar
968b36a0bd
MC: Constify MCAsmLayout argument to MCExpr::EvaluteAs...
...
llvm-svn: 98380
2010-03-12 21:00:45 +00:00
Daniel Dunbar
5c5228a8f6
MC/Mach-O: Implement "absolutizing" semantics of .set, by evaluating the assembly time value of variables.
...
llvm-svn: 98241
2010-03-11 05:53:37 +00:00
Daniel Dunbar
ac8a95498a
MC: Sketch initial MCAsmLayout class, which encapsulates the current layout of an assembly file. The MCAsmLayout is also available for use by MCExpr::EvaluateAs{Absolute,Relocatable}, to allow target specific hooks and "absolutizing" of symbols.
...
llvm-svn: 98227
2010-03-11 02:28:59 +00:00
Chris Lattner
ac2361a9b0
set the temporary bit on MCSymbols correctly.
...
llvm-svn: 98124
2010-03-10 02:25:11 +00:00
Dan Gohman
9a9d9ea7bc
Document that MCExpr::Mod is actually remainder.
...
Document that MCExpr::Div, Mod, and the comparison operators are all
signed operators.
Document that the comparison operators' results are target-dependent.
Document that the behavior of shr is target-dependent.
llvm-svn: 95619
2010-02-08 23:58:47 +00:00
Chris Lattner
54d88f1759
don't make hte dtor private or we can't construct the class.
...
llvm-svn: 95587
2010-02-08 22:07:36 +00:00
Chris Lattner
38d022efe9
add scaffolding for target-specific MCExprs.
...
llvm-svn: 95559
2010-02-08 19:41:07 +00:00
Chris Lattner
c8f7717808
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
8b5d55ed06
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
David Greene
a8cbfb8acc
Change errs() to dbgs().
...
llvm-svn: 92630
2010-01-05 01:28:07 +00:00
Daniel Dunbar
ad36e8aceb
Pass StringRef by value.
...
llvm-svn: 86251
2009-11-06 10:58:06 +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
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
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
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
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
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