Daniel Dunbar
bd4bf3d4f7
llvm-mc: Evaluation for relocatable expressions.
...
llvm-svn: 74496
2009-06-30 01:49:52 +00:00
Daniel Dunbar
c9dc78ae40
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
a5508c893a
llvm-mc: Parse symbol attribute directives.
...
llvm-svn: 74487
2009-06-30 00:33:19 +00:00
Daniel Dunbar
cc566a714b
llvm-mc: Parse .{,b,p2}align{,w,l} directives.
...
llvm-svn: 74478
2009-06-29 23:46:59 +00:00
Daniel Dunbar
ae7ac01059
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
5992b4a211
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74463
2009-06-29 22:00:57 +00:00
Daniel Dunbar
6b22f9ca45
llvm-mc: Recognize C++ style comments.
...
llvm-svn: 74462
2009-06-29 21:58:22 +00:00
Daniel Dunbar
231898baf5
Fix uninitialized variable warning.
...
llvm-svn: 74457
2009-06-29 21:14:21 +00:00
Daniel Dunbar
84bfd7b184
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
7e8d6c7215
MC: Improve expression parsing and implement evaluation of absolute expressions.
...
llvm-svn: 74448
2009-06-29 20:37:27 +00:00
Daniel Dunbar
4a5a561a24
MC: Parse .org directives.
...
llvm-svn: 74218
2009-06-25 22:44:51 +00:00
Daniel Dunbar
2d2ee150eb
MC: Parse .set and assignments.
...
llvm-svn: 74208
2009-06-25 21:56:11 +00:00
Daniel Dunbar
a10e519e04
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
Chris Lattner
f7ebca4db6
implement a bunch of synonyms for section switching.
...
llvm-svn: 74062
2009-06-24 05:13:15 +00:00
Chris Lattner
bedf6c2995
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
3f5738d599
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
92ffdd15f8
create an MCStreamer and provide it to AsmParser.
...
llvm-svn: 74039
2009-06-24 00:52:40 +00:00
Chris Lattner
4c501fc196
make the lexer unique strings it lexes instead of passing them back as
...
std::strings.
llvm-svn: 74036
2009-06-24 00:33:19 +00:00
Daniel Dunbar
ca29e4d7f4
Start flushing out MCContext.
...
- Lives inside new library lib/MC (LLVMMC.a)
llvm-svn: 74013
2009-06-23 22:01:43 +00:00
Chris Lattner
3417d71ff4
refactor a bunch of X86 specific stuff out to its own file.
...
llvm-svn: 73982
2009-06-23 18:41:30 +00:00
Chris Lattner
f97d8bbe73
implement a trivial binary expression parser, we can now parse all of 176.gcc.llc.s
...
llvm-svn: 73950
2009-06-23 05:57:07 +00:00
Chris Lattner
9ec76a0b79
get a definition of strull on windows, thanks to Howard Su.
...
llvm-svn: 73929
2009-06-23 00:24:36 +00:00
Duncan Sands
376c6f16de
Include cstdio to get EOF, needed with gcc-4.4.
...
llvm-svn: 73879
2009-06-22 06:59:32 +00:00
Chris Lattner
1d1fe918de
process memory operands with a parenthesized expression for a displacement,
...
like "(4+5)(%eax)".
llvm-svn: 73878
2009-06-22 06:35:58 +00:00
Chris Lattner
7fdbce7a60
Implement full support for parsing primary expressions. We can now parse
...
all of health and voronoi (ignoring directives). We only get 409 lines into
176.gcc though because we don't have binary operators yet:
Parsing 176.gcc.llc.s:409: unexpected token in operand list
movsbl _arityvec+1(,%edi,8), %eax
^
llvm-svn: 73877
2009-06-22 06:32:03 +00:00
Chris Lattner
a7b51ed5e6
implement parser support for '*' operands, as in "call *%eax".
...
llvm-svn: 73876
2009-06-22 06:02:13 +00:00
Chris Lattner
78db36271c
implement memory operand parsing.
...
llvm-svn: 73875
2009-06-22 05:51:26 +00:00
Chris Lattner
e5074c46b2
start implementing some simple operand parsing.
...
llvm-svn: 73867
2009-06-22 01:29:09 +00:00
Chris Lattner
2adc9e739c
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
36e0212c16
set up the top-level parsing loop.
...
llvm-svn: 73860
2009-06-21 20:54:55 +00:00
Chris Lattner
b013345338
stub out parser for asm files. Change invariant on lexer to always
...
print its error message when it returns an asmtok::Error token.
Compute a proper error code for llvm-mc in 'lex' mode. Add new
-as-lex option to enable lexing mode (vs parsing mode).
llvm-svn: 73859
2009-06-21 20:16:42 +00:00
Chris Lattner
419a97491a
add string literals.
...
llvm-svn: 73858
2009-06-21 19:56:35 +00:00
Chris Lattner
99f0b60f45
hopefully fix the build on linux.
...
llvm-svn: 73857
2009-06-21 19:43:50 +00:00
Chris Lattner
d0765617d2
implement enough of a lexer to get through Olden/health/Output/health.llc.s
...
without errors.
llvm-svn: 73855
2009-06-21 19:21:25 +00:00
Chris Lattner
d485848229
oh yeah, cmake needs to be told explicitly about new files :)
...
llvm-svn: 73849
2009-06-21 07:19:34 +00:00
Chris Lattner
c8dfbcbb31
some baby steps.
...
llvm-svn: 73848
2009-06-21 07:19:10 +00:00
Chris Lattner
d70e15b46f
start wiring up support for asm parsing.
...
llvm-svn: 73846
2009-06-21 05:22:37 +00:00
Chris Lattner
2cce7d5988
fix build problem pointed out by John Thompson!
...
llvm-svn: 73739
2009-06-18 23:46:04 +00:00
Chris Lattner
c7ab953177
fix file header
...
llvm-svn: 73733
2009-06-18 23:05:21 +00:00
Chris Lattner
8dd8a52533
Add a skeleton driver for new machine code level fun. llvm-mc is meant
...
to be a test driver of other components in the system, which will develop
over time.
llvm-svn: 73732
2009-06-18 23:04:45 +00:00