Jim Grosbach
1daf07338c
Move state var to private class member.
...
llvm-svn: 139697
2011-09-14 16:37:04 +00:00
Kevin Enderby
7255361320
First step in supporting #line directives in assembler. This step parses the
...
#line directives with the needed support in the lexer. Next will be to build
a simple file/line# table mapping source SMLoc's for later use by diagnostics.
And the last step will be to get the diagnostics to use the mapping for file
and line numbers.
llvm-svn: 139669
2011-09-13 23:45:18 +00:00
Chris Lattner
e8baa38e79
allow \r's in .s files.
...
llvm-svn: 136908
2011-08-04 19:31:26 +00:00
Rafael Espindola
1134ab23df
Basic support for macros with explicit arguments.
...
We still don't handle
* default values
* :req
* :vararg
* \()
llvm-svn: 132656
2011-06-05 02:43:45 +00:00
Eric Christopher
ffc0e1f6e6
Match case for invalid constant error messages and add a new
...
test for invalid hexadecimals.
llvm-svn: 129326
2011-04-12 00:18:03 +00:00
Eric Christopher
64749f2a89
Lex, and then fail on invalid constants.
...
Testcase forthcoming.
rdar://8490596
llvm-svn: 129309
2011-04-11 22:24:56 +00:00
Jim Grosbach
a3df87fb01
Clean up assembly statement separator support.
...
The MC asm lexer wasn't honoring a non-default (anything but ';') statement
separator. Fix that, and generalize a bit to support multi-character
statement separators.
llvm-svn: 128227
2011-03-24 18:46:34 +00:00
Jim Grosbach
01af6c4641
More whitespace cleanup...
...
llvm-svn: 125388
2011-02-11 19:05:56 +00:00
Chris Lattner
03a102bff3
Generalize a previous change, fixing PR8855 - an valid large immediate
...
rejected by the mc assembler.
llvm-svn: 122557
2010-12-25 21:36:35 +00:00
Nick Lewycky
0de20af7ba
Add missing standard headers. Patch by Joerg Sonnenberger!
...
llvm-svn: 122193
2010-12-19 20:43:38 +00:00
Roman Divacky
71d29167ea
Add support for lexing single quotes like 'c'.
...
This fixed 8615.
llvm-svn: 122150
2010-12-18 08:56:37 +00:00
Daniel Dunbar
7484d2cbec
MC/AsmLexer: Fix bug in source location for Slash token.
...
llvm-svn: 117298
2010-10-25 20:18:53 +00:00
Daniel Dunbar
d116d8a4e9
MC/AsmParser: Handle exponents in floating point literals.
...
llvm-svn: 114861
2010-09-27 20:12:52 +00:00
Daniel Dunbar
ce17f72c38
MC/AsmParser: Handle a missed case of floating literals in the lexer.
...
llvm-svn: 114733
2010-09-24 17:10:26 +00:00
Daniel Dunbar
3068a93dc1
MC/Lexer: Add 'Real' token type for floating point literals.
...
llvm-svn: 114718
2010-09-24 01:59:31 +00:00
Chris Lattner
02db8f6415
fix rdar://7997827 - Accept and ignore LL and ULL suffixes on integer literals.
...
Also fix 0b010 syntax to actually work while we're at it :-)
llvm-svn: 111876
2010-08-24 00:43:25 +00:00
Daniel Dunbar
4042c33cd8
MC: Move getLoc() to MCAsmLexer().
...
llvm-svn: 108154
2010-07-12 17:10:00 +00:00
Duncan Sands
41b4a6b36a
Convert some tab stops into spaces.
...
llvm-svn: 108130
2010-07-12 08:16:59 +00:00
Matt Fleming
ec9d6faef0
Add support for parsing the ELF .type assembler directive.
...
llvm-svn: 104316
2010-05-21 11:36:59 +00:00
Kevin Enderby
7bcc9e9450
Incorporate Daniel's suggestion and use !isdigit(CurPtr[0]) and not
...
CurPtr[0] == '\n' when testing the character after a "0b" when looking
to see if it part of a something like "jmp 0b".
llvm-svn: 104039
2010-05-18 18:09:20 +00:00
Kevin Enderby
53e0631516
Fixed the problem with a branch to "0b" that was not parsed by llvm-mc
...
correctly. The Lexer was incorrectly eating the newline casusing it to branch
to address 0. Updated the test case to use a "0:" label and a branch to "0b".
llvm-svn: 104038
2010-05-18 17:51:35 +00:00
Kevin Enderby
0510b48fd9
Added support in MC for Directional Local Labels.
...
llvm-svn: 103989
2010-05-17 23:08:19 +00:00
Daniel Dunbar
b0ceb764b8
Revert r103137, fix for $ in labels. It looks like we can't actually handle this
...
at the token level. Consider the following horrible test case:
a = 1
.globl $a
movl ($a), %eax
movl $a, %eax
movl $$a, %eax
llvm-svn: 103178
2010-05-06 14:46:38 +00:00
Chris Lattner
482fa218d4
fix rdar://7946934 - in some limited cases, the assembler should
...
allow $ at the start of a symbol name.
llvm-svn: 103137
2010-05-05 23:51:28 +00:00
Chris Lattner
6b55cb9cd8
implement mc asmparser support for '.', which gets the
...
current PC. rdar://7834775
We now produce an identical .o file compared to the cctools
assembler for something like this:
_f0:
L0:
jmp L1
.long . - L0
L1:
jmp A
.long . - L1
.zerofill __DATA,_bss,A,0
llvm-svn: 101227
2010-04-14 04:40:28 +00:00
Chris Lattner
341b1d25f1
add a hack to allow parsing negative minint. rdar://7751341
...
llvm-svn: 98442
2010-03-13 19:25:13 +00:00
Chris Lattner
e649401824
stop using strtoll, it gives windows heartburn.
...
llvm-svn: 94167
2010-01-22 07:34:12 +00:00
Chris Lattner
5b0e01c54e
move some files out of the llvm-mc tool into the MCParser library so
...
other tools can link it.
llvm-svn: 94131
2010-01-22 01:58:08 +00:00