Daniel Dunbar
1cbd2c6c88
MC: Improve some diagnostics on uses of '.' pseudo-symbol.
...
llvm-svn: 128289
2011-03-25 17:47:17 +00:00
Daniel Dunbar
70235789e1
Tidyness.
...
llvm-svn: 128288
2011-03-25 17:47:14 +00:00
Jim Grosbach
213800d44b
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
Stuart Hastings
0c1298989f
Reapply 127939 since Daniel fixed the breakage. <rdar://problem/9012638>
...
llvm-svn: 127944
2011-03-19 02:42:31 +00:00
Stuart Hastings
0b337d0fe8
Revert 127939. <rdar://problem/9012638>
...
llvm-svn: 127943
2011-03-19 02:33:56 +00:00
Stuart Hastings
4a2b1ca9c1
Revise r126127 to address Daniel's comments. <rdar://problem/9012638>
...
llvm-svn: 127939
2011-03-19 01:32:01 +00:00
Daniel Dunbar
0e9d7aeb1f
MC/Mach-O: Fix regression introduced in r126127, this assignment shouldn't have
...
been removed.
llvm-svn: 127812
2011-03-17 16:25:24 +00:00
Jim Grosbach
bdf8053571
Darwin 'as' silently ignores the '.ident' directive.
...
llvm-svn: 127258
2011-03-08 19:17:19 +00:00
Joerg Sonnenberger
9c30c492df
Restore r125595 (reverted in r126336) with modifications:
...
Introduce a variable in the AsmParserExtension whether [] is valid in an
expression. If it is true, parse them like (). Enable this for ELF only.
llvm-svn: 126443
2011-02-24 21:59:22 +00:00
Jim Grosbach
e7be1f2990
Revert r125595, which is an X86-only undocumented assembly syntax extension
...
enabled for all targets. Non-X86 targets should not have this behavior
enabled by default.
Joerg, if you would like to resubmit with the behavior conditionalized to be
X86-ELF only, that's fine.
llvm-svn: 126336
2011-02-23 21:26:51 +00:00
Joerg Sonnenberger
cbdd830a75
Bug#9172: Don't use static in file scope, use an attribute on the
...
parser.
llvm-svn: 126225
2011-02-22 16:53:11 +00:00
Rafael Espindola
b59fdeb3de
Add support for pushsection and popsection. Patch by Joerg Sonnenberger.
...
llvm-svn: 125629
2011-02-16 01:08:29 +00:00
Roman Divacky
3277e18a42
Add support for parsing [expr].
...
This is submitted by Joerg Sonnenberger and fixes his PR8685.
llvm-svn: 125595
2011-02-15 20:43:39 +00:00
Jim Grosbach
79e4b6b045
More whitespace cleanup...
...
llvm-svn: 125388
2011-02-11 19:05:56 +00:00
Benjamin Kramer
8ff71a1384
Support for .ifdef / .ifndef in the assembler parser. Patch by Joerg Sonnenberger.
...
llvm-svn: 125120
2011-02-08 22:29:56 +00:00
Bob Wilson
f6a7104e41
Do not sign extend floating-point values in the asm parser.
...
llvm-svn: 124831
2011-02-03 23:17:47 +00:00
Roman Divacky
254f2ab16a
Enumerate .code16/32/64 instead of checking .code prefix. This
...
unbreaks some ARM tests.
llvm-svn: 124608
2011-01-31 21:19:43 +00:00
Roman Divacky
9a8a680ed2
Error on all .code* directives instead of just .code16 as they
...
all lead to a silent miscompilation of code.
llvm-svn: 124603
2011-01-31 20:56:49 +00:00
Roman Divacky
82612f08c2
Error on .code16 instead of producing wrong (32bit) code.
...
llvm-svn: 124498
2011-01-28 19:29:48 +00:00
Roman Divacky
c6a20d1728
Add support for parsing .float
...
llvm-svn: 124485
2011-01-28 14:20:32 +00:00
Nico Weber
66fd0e8119
PR8951: Support for .equiv in integrated assembler, patch by Jörg Sonnenberger!
...
llvm-svn: 124467
2011-01-28 03:04:41 +00:00
Roman Divacky
f817c82cf3
Add support for specifying register name in cfi-register/offset/def
...
as well as register number.
llvm-svn: 124379
2011-01-27 17:16:37 +00:00
Bill Wendling
195d8c3988
Add support for parsing a Real value. It stores the Real value as its binary
...
encoding. It's up to the individual back-ends to convert it to their preferred
representation when printing.
llvm-svn: 124229
2011-01-25 21:26:41 +00:00
Rafael Espindola
ead58a5259
Handle strings in section names the same way as gas:
...
* If the name is a single string, we remove the quotes
* If the name starts without a quote, we include any quotes in the name
llvm-svn: 124127
2011-01-24 18:02:54 +00:00
Rafael Espindola
aefd549139
Delay the creation of eh_frame so that the user can change the defaults.
...
Add support for SHT_X86_64_UNWIND.
llvm-svn: 124059
2011-01-23 05:43:40 +00:00
Rafael Espindola
492ad6ca06
Remove more duplicated code.
...
llvm-svn: 124056
2011-01-23 04:43:11 +00:00
Rafael Espindola
59c1246cee
Remove duplicated code.
...
llvm-svn: 124054
2011-01-23 04:28:49 +00:00
Jim Grosbach
868d2877dc
Make sure to propogate the error code when we fail to parse a modifier.
...
llvm-svn: 123857
2011-01-19 23:06:07 +00:00
Rafael Espindola
7b1b3f5d82
Correctly encode pcrel|indirect.
...
llvm-svn: 122624
2010-12-29 04:31:26 +00:00
Rafael Espindola
d51ed1fc6a
Implement cfi_def_cfa. Also don't convert to dwarf reg numbers twice. Looks
...
like 6 is a fixed point of that and so the previous tests were OK :-)
llvm-svn: 122614
2010-12-29 01:42:56 +00:00
Rafael Espindola
3fdd045643
Implement .cfi_remember_state and .cfi_restore_state.
...
llvm-svn: 122602
2010-12-28 18:36:23 +00:00
Rafael Espindola
12c30aed07
Add support for .cfi_lsda.
...
llvm-svn: 122584
2010-12-27 15:56:22 +00:00
Rafael Espindola
e7e67fce10
Add support for the same encodings of the personality function that gnu as
...
supports.
llvm-svn: 122577
2010-12-27 00:36:05 +00:00
Rafael Espindola
2ebe553431
Add support for @note. Patch by Jörg Sonnenberger.
...
llvm-svn: 122568
2010-12-26 21:30:59 +00:00
Rafael Espindola
99f1527316
Add basic support for .cfi_personality.
...
llvm-svn: 122566
2010-12-26 20:20:31 +00:00
Chris Lattner
2129ce0891
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
Kevin Enderby
ff7e68c5e7
In llvm-mc parse a Hash token as a full line comment. Allows handling of
...
preprocessed .s files and matches darwin gas. rdar://8798690
Also fix a comment on the next line of AsmParser.cpp after this new code.
llvm-svn: 122531
2010-12-24 00:12:02 +00:00
Nick Lewycky
c85935836b
Add missing standard headers. Patch by Joerg Sonnenberger!
...
llvm-svn: 122193
2010-12-19 20:43:38 +00:00
Roman Divacky
ed5bb14415
Add support for lexing single quotes like 'c'.
...
This fixed 8615.
llvm-svn: 122150
2010-12-18 08:56:37 +00:00
Rafael Espindola
a8488b04e1
Factor some code to parseSectionFlags and fix the default type of a section.
...
llvm-svn: 120145
2010-11-25 15:32:56 +00:00
Rafael Espindola
1a81f03f87
Behave a bit more like gnu as and use the symbol (instead of the section)
...
for any relocation to a symbol defined in a tls section.
llvm-svn: 120121
2010-11-24 21:57:39 +00:00
Rafael Espindola
e20c3d7c26
Add basic CFI methods to the streamer interface.
...
llvm-svn: 119972
2010-11-22 14:27:24 +00:00
Kevin Enderby
214e641d8d
Added support for the Mach-O .symbol_resolver directive. rdar://8673046
...
llvm-svn: 119816
2010-11-19 18:39:33 +00:00
Rafael Espindola
b6fcca35a2
Add support for .int.
...
llvm-svn: 119512
2010-11-17 16:24:40 +00:00
Rafael Espindola
9186952072
Add support for .2byte, .4byte and .8byte.
...
Fixes PR8631.
llvm-svn: 119511
2010-11-17 16:15:42 +00:00
Rafael Espindola
283e6bd938
Add .loc methods to the streamer.
...
Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer
and then switch codegen to use it.
llvm-svn: 119384
2010-11-16 21:20:32 +00:00
Rafael Espindola
dc0be5a0cc
Parse and ignore some .cfi_* directives.
...
llvm-svn: 119362
2010-11-16 18:34:07 +00:00
Rafael Espindola
f6c0121c93
Fix PR8565.
...
This moves most of the isUsed logic to the MCSymbol itself. With this we
get a bit more relaxed about allowing definitions after uses: uses that
don't evaluate their argument immediately (jmp foo) are accepted.
ddunbar, this was the smallest compromise I could think of that lets us
accept gcc (and clang!) assembly.
llvm-svn: 119144
2010-11-15 14:40:36 +00:00
Rafael Espindola
9cd0fd30e0
Parse and record the gnu_unique_object type.
...
llvm-svn: 118980
2010-11-13 04:51:02 +00:00
Rafael Espindola
00c5605efc
Parse and remember discriminators in .loc line. I try to output them with
...
another patch.
This lets us parse a bit more of the gcc 4.5 output.
llvm-svn: 118975
2010-11-13 03:18:27 +00:00