Daniel Dunbar
0afb18f239
llvm-mc/x86: Fix various nit-picky bugs in displacement parsing.
...
- Test case to follow.
llvm-svn: 74687
2009-07-02 02:26:39 +00:00
Daniel Dunbar
b87d6f328e
llvm-mc/x86: Fix bug in disambiguation of displacement operand, introduced by me
...
(I think).
- We weren't properly parsing the leading parenthesized expression in something
like 'push (4)(%eax)'.
- Added ParseParenRelocatableExpression to support this. I suspect we should
just use lookahead, though.
- Test case to follow.
llvm-svn: 74685
2009-07-02 02:09:07 +00:00
Daniel Dunbar
ffbf6228a2
llvm-mc/x86: Factor out ParseX86Register.
...
llvm-svn: 74684
2009-07-02 01:58:24 +00:00
Daniel Dunbar
7c83d0ed14
llvm-mc/x86: Rename X86Operand::ScaleReg to IndexReg and make order consistent
...
with syntax.
llvm-svn: 74679
2009-07-02 00:51:52 +00:00
Owen Anderson
9e109b6077
Maintain the old LTO API, by using the global context.
...
llvm-svn: 74678
2009-07-02 00:31:14 +00:00
Dan Gohman
e89dc58a7e
Fix a bunch of other places that used operator[] to test whether
...
a key is present in a std::map or DenseMap to use find instead.
llvm-svn: 74676
2009-07-02 00:17:47 +00:00
John Mosby
c7b8abb0ec
fix ld error with -no-undefined switch, which is undefined on darwin8
...
llvm-svn: 74674
2009-07-02 00:10:23 +00:00
Owen Anderson
4fa7e54329
Make the use of const with respect to LLVMContext sane. Hopefully this is the last time, for the
...
moment, that I will need to make far-reaching changes.
llvm-svn: 74655
2009-07-01 23:13:44 +00:00
Owen Anderson
cf112e59c3
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Jeffrey Yasskin
29ea777c1e
Add a portable strerror*() wrapper, llvm::sys::StrError(). This includes the
...
Windows variant, strerror_s, but I couldn't test that.
I'll update configure and config.h.in in a subsequent patch.
llvm-svn: 74621
2009-07-01 18:11:20 +00:00
Owen Anderson
81b8dabb53
Add a pointer to the owning LLVMContext to Module. This requires threading LLVMContext through a lot
...
of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools.
Patches for Clang and LLVM-GCC to follow.
llvm-svn: 74614
2009-07-01 16:58:40 +00:00
Sanjiv Gupta
a7b306188b
Executables will be at InstallDir/bin directory. Std header files will be at InstallDir/include, libs will be at InstallDir/lib. Define hooks for these and use them in the options for various tools.
...
llvm-svn: 74611
2009-07-01 16:10:29 +00:00
Daniel Dunbar
351a228c46
llvm-mc: Add some more doxyments.
...
llvm-svn: 74607
2009-07-01 15:14:50 +00:00
Daniel Dunbar
f234f1f312
llvm-mc: Fill in the rest of tokens for 'as-lex' mode.
...
llvm-svn: 74598
2009-07-01 06:56:54 +00:00
Daniel Dunbar
7f47cc9423
Rename MCValue::isConstant to isAbsolute.
...
llvm-svn: 74596
2009-07-01 06:48:00 +00:00
Chris Lattner
db3d640a42
add some of the new tokens, others are still missing.
...
llvm-svn: 74595
2009-07-01 06:36:49 +00:00
Daniel Dunbar
1960440e70
llvm-mc: Emit parsed instructions to the MCStreamer.
...
llvm-svn: 74594
2009-07-01 06:35:48 +00:00
Daniel Dunbar
cae97fa7a9
llvm-mc: Introduce method to match a parsed x86 instruction into an MCInst.
...
llvm-svn: 74573
2009-06-30 23:38:38 +00:00
Daniel Dunbar
3f34774b4a
llvm-mc: Accept relocatable expressions when parsing displacements and
...
immediates.
llvm-svn: 74568
2009-06-30 23:02:44 +00:00
Daniel Dunbar
d0589c59b3
llvm-mc: Symbols in a relocatable expression of the (a - b + cst) form are
...
allowed to be undefined when the expression is seen, we cannot enforce the
same-section requirement until the entire assembly file has been seen.
llvm-svn: 74565
2009-06-30 22:49:27 +00:00
Daniel Dunbar
f3f3e60b4f
Suppress may-be-used-uninitialized warning.
...
llvm-svn: 74529
2009-06-30 16:02:47 +00:00
Douglas Gregor
2373782453
Fix CMake build
...
llvm-svn: 74527
2009-06-30 14:37:26 +00:00
Daniel Dunbar
2d92d62fb2
llvm-mc: Accept relocatable expressions for .org, assignments, .byte, etc.
...
llvm-svn: 74498
2009-06-30 02:10:03 +00:00
Daniel Dunbar
a702c280bb
llvm-mc: Rewrite binary subtraction for relocatable expressions, we can't always
...
legally negate an MCValue.
llvm-svn: 74497
2009-06-30 02:08:27 +00:00
Daniel Dunbar
c3cac19cfe
llvm-mc: Evaluation for relocatable expressions.
...
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Daniel Dunbar
5bec168037
Normalize SourceMgr messages.
...
- Don't print "Parsing" in front of every message.
- Take additional "type" argument which is prepended to the message (with ": ")
if given.
- Update clients to print errors (warnings) as:
<filename>:<line number>: error(warning): ...
llvm-svn: 74489
2009-06-30 00:49:23 +00:00
Daniel Dunbar
e4fd18eda8
llvm-mc: Parse symbol attribute directives.
...
llvm-svn: 74487
2009-06-30 00:33:19 +00:00
Mikhail Glushenkov
2a0fc1e1a3
Clang is now production quality (at least for C).
...
llvm-svn: 74484
2009-06-30 00:16:22 +00:00
Mikhail Glushenkov
8f8b5ff837
Add a way to access argv[0] in hooks.
...
llvm-svn: 74483
2009-06-30 00:16:00 +00:00
Daniel Dunbar
72c0434597
llvm-mc: Parse .{,b,p2}align{,w,l} directives.
...
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Daniel Dunbar
37b8fe7db3
llvm-mc: Diagnose misuse (mix) of defined symbols and labels.
...
- For example, we diagnose errors on:
--
a:
a = 10
--
- For now we reject code like:
--
.long a
a = 10
--
which "as" accepts (on Darwin).
llvm-svn: 74476
2009-06-29 23:43:14 +00:00
Daniel Dunbar
fca88cf26b
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74463
2009-06-29 22:00:57 +00:00
Daniel Dunbar
67828e6e0a
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74462
2009-06-29 21:58:22 +00:00
Daniel Dunbar
8be858eeb4
Fix uninitialized variable warning.
...
llvm-svn: 74457
2009-06-29 21:14:21 +00:00
Daniel Dunbar
a33d10fc4d
Don't build LLVMC when configured with --disable-pic (it needs requires shared
...
module support to build).
llvm-svn: 74456
2009-06-29 21:12:26 +00:00
Daniel Dunbar
41782dbbcd
MC: Improve expression parsing and implement evaluation of absolute expressions
...
(missed files).
llvm-svn: 74450
2009-06-29 20:40:36 +00:00
Daniel Dunbar
ade4f03bd0
MC: Improve expression parsing and implement evaluation of absolute expressions.
...
llvm-svn: 74448
2009-06-29 20:37:27 +00:00
Evan Cheng
05451335e6
Indentation.
...
llvm-svn: 74281
2009-06-26 06:57:16 +00:00
Daniel Dunbar
bfc585a86e
MC: Parse .org directives.
...
llvm-svn: 74218
2009-06-25 22:44:51 +00:00
Daniel Dunbar
d7a883b5e5
MC: Parse .set and assignments.
...
llvm-svn: 74208
2009-06-25 21:56:11 +00:00
Mikhail Glushenkov
c40a28803f
Update documentation.
...
llvm-svn: 74191
2009-06-25 18:20:44 +00:00
Jeffrey Yasskin
c431f61520
Add a JITEventListener interface that gets called back when a new function is
...
emitted or the machine code for a function is freed. Chris mentioned that we
may also want a notification when a stub is emitted, but that'll be a future
change. I intend to use this to tell oprofile where functions are emitted and
what lines correspond to what addresses.
llvm-svn: 74157
2009-06-25 02:04:04 +00:00
Mikhail Glushenkov
112972509a
Remove duplication.
...
Factor out common preprocessor-related bits to Makefile.rules.
llvm-svn: 74153
2009-06-25 01:07:00 +00:00
Daniel Dunbar
5cf59dd842
Basic .s parsing for .asci[iz], .fill, .space, {.byte, .short, ... }
...
- Includes some DG tests in test/MC/AsmParser, which are rather primitive since
we don't have a -verify mode yet.
llvm-svn: 74139
2009-06-24 23:30:00 +00:00
Owen Anderson
90f7655f57
Get rid of the global CFGOnly flag by threading a ShortNames parameters through the GraphViz rendering code.
...
Update other uses in the codebase for this change.
llvm-svn: 74084
2009-06-24 17:37:09 +00:00
Chris Lattner
07463b0a0a
remove dead makefile flags.
...
llvm-svn: 74065
2009-06-24 05:29:56 +00:00
Chris Lattner
f8a7746988
implement a bunch of synonyms for section switching.
...
llvm-svn: 74062
2009-06-24 05:13:15 +00:00
Chris Lattner
0945d20ceb
add support for parsing and emitting .section directives. We can now parse
...
things like:
.section __TEXT,__cstring,cstring_literals
llvm-svn: 74058
2009-06-24 04:43:34 +00:00
Chris Lattner
61a6509f6a
add trivial support for passing label definitions through the MCStreamer.
...
This is suboptimal in several aspects, see the commented out assertion.
I need to talk to Daniel about this.
llvm-svn: 74057
2009-06-24 04:31:49 +00:00
Chris Lattner
f76b48bc93
create an MCStreamer and provide it to AsmParser.
...
llvm-svn: 74039
2009-06-24 00:52:40 +00:00