Jan Sjödin
6791bc64a2
Add constructors to MCElfStreamer and MCObjectStreamer to take an extra MCAssembler * argument.
...
llvm-svn: 127343
2011-03-09 17:33:05 +00:00
Jim Grosbach
bdf8053571
Darwin 'as' silently ignores the '.ident' directive.
...
llvm-svn: 127258
2011-03-08 19:17:19 +00:00
Anton Korobeynikov
917ca94111
Preliminary support for ARM frame save directives emission via MI flags.
...
This is just very first approximation how the stuff should be done
(e.g. ARM-only for now). More to follow.
llvm-svn: 127101
2011-03-05 18:43:32 +00:00
Anton Korobeynikov
62e48532b9
Some first rudimentary support for ARM EHABI: print exception table in "text mode".
...
llvm-svn: 127099
2011-03-05 18:43:15 +00:00
Joerg Sonnenberger
5f2f5fa638
Be nice to Xcore and the XMOS assembler and avoid quoting section names
...
that contain only letters, digits and the characters "_" and ".".
llvm-svn: 127028
2011-03-04 20:03:14 +00:00
Joerg Sonnenberger
bb93506f95
Bug#9033: For the ELF assembler output, always quote the section name.
...
llvm-svn: 126963
2011-03-03 22:31:08 +00:00
Jan Sjödin
3c1fa9a68b
Split MCEELFStreamer and ELFObjectWriter into .h and .cpp files, so that other components can use them.
...
llvm-svn: 126942
2011-03-03 14:52:12 +00:00
Eli Friedman
f7eb4cce13
PR9352: Always emit a relocation for weak symbols. Not emitting relocations
...
for calls to weak symbols with a definition has the appearance of working
with LLVM-generated code because weak symbol definitions are put in their
own sections.
llvm-svn: 126933
2011-03-03 07:24:36 +00:00
Oscar Fuentes
15a668f50b
Fixes warnings emitted by Visual Studio 2010 compiler.
...
Patch by Erik Olofsson!
llvm-svn: 126796
2011-03-01 23:11:57 +00:00
Jan Sjödin
6bc6d6ab39
Make all static functions become static class methods. Move shared (duplicated) functions to new MCELF class.
...
llvm-svn: 126686
2011-02-28 21:45:04 +00:00
Cameron Zwarich
974208a607
Roll out r126425 and r126450 to see if it fixes the failures on the buildbots.
...
llvm-svn: 126488
2011-02-25 16:30:32 +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
Devang Patel
f2b2417c2c
Enable DebugInfo support for COFF object files.
...
Patch by Nathan Jeffords!
llvm-svn: 126425
2011-02-24 21:04:00 +00:00
Benjamin Kramer
feccb33180
Plug some leaks in edis.
...
- Don't leak parsed operands during tokenization.
- Don't leak printed insts in llvm-mc.
llvm-svn: 126381
2011-02-24 11:03:19 +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
Rafael Espindola
993a4ef35c
Put in the symbol table symbols only used in a .globl statement.
...
Fixes PR9292.
llvm-svn: 126330
2011-02-23 20:22:07 +00:00
Sean Callanan
e1308394f1
Fixed a bug in the enhanced disassembler that caused
...
it to ignore valid uses of FS and GS as additional
base registers in address computations. Added a test
case for this.
llvm-svn: 126302
2011-02-23 03:31:28 +00:00
Stuart Hastings
c0c38e8673
Omit private_extern declarations of extern symbols; followup to
...
r124468. Patch by Rafael Avila de Espindola!
llvm-svn: 126297
2011-02-23 02:27:05 +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
Joerg Sonnenberger
dfe33572b5
Handle FK_PCRel_1 and add a test case for this and FK_PCRel_4.
...
llvm-svn: 126157
2011-02-21 23:25:41 +00:00
Stuart Hastings
8181f2d5a3
End the line if we return early. Radar 9012638.
...
llvm-svn: 126141
2011-02-21 21:07:07 +00:00
Stuart Hastings
d7ca2e5b61
Fix to correctly support attribute((section("__DATA, __common"))).
...
Radar 9012638.
llvm-svn: 126127
2011-02-21 17:27:17 +00:00
Joerg Sonnenberger
2204260330
Use a vector of pairs to implement the section stack, not two
...
independent vectors.
llvm-svn: 126099
2011-02-21 01:07:42 +00:00
Rafael Espindola
5fd4a261e7
Add some limited support for labels in org directives. Hopefully enough to fix
...
PR9245.
llvm-svn: 126091
2011-02-20 20:20:07 +00:00
Oscar Fuentes
6e5d344a2e
Move library stuff out of the toplevel CMakeLists.txt file.
...
llvm-svn: 125968
2011-02-18 22:06:14 +00:00
Rafael Espindola
4ef1268b39
Gas is very inconsistent about when a relaxation/relocation is needed. Do
...
the right thing and stop trying to copy it. Fixes PR8944.
llvm-svn: 125648
2011-02-16 03:25:55 +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
Rafael Espindola
3c32af5834
Switch llvm to using comdats. For now always use groups with a single
...
section.
llvm-svn: 125526
2011-02-14 22:23:49 +00:00
Rafael Espindola
a667a598aa
Move broken HasCommonSymbols to ELFWriter.cpp.
...
llvm-svn: 125490
2011-02-14 16:51:08 +00:00
Jim Grosbach
79e4b6b045
More whitespace cleanup...
...
llvm-svn: 125388
2011-02-11 19:05:56 +00:00
Shantonu Sen
70e390fa15
Fix comparator used for looking up previously instantiated EDDisassemblers.
...
Now, Syntax is only used as a tie-breaker if the Arch
matches. Previously, a request for x86_64 disassembler followed by the
i386 disassembler in a single process would return the cached x86_64
disassembler. Fixes <rdar://problem/8958982>
llvm-svn: 125215
2011-02-09 21:03:19 +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
Jason W Kim
7342155b4c
Teach ARM/MC/ELF about gcc compatible reloc output to get past odd linkage
...
failures with relocations.
The code committed is a first cut at compatibility for emitted relocations in
ELF .o.
Why do this? because existing ARM tools like emitting relocs symbols as
explicit relocations, not as section-offset relocs.
Result is that with these changes,
1) relocs are now substantially identical what to gcc outputs.
2) larger apps (including many spec2k tests) compile, cross-link, and pass
Added reminder fixme to tests for future conversion to .s form.
llvm-svn: 124996
2011-02-07 01:11:15 +00:00
Jason W Kim
056e5aacb7
Teach ARM/MC/ELF about EF_ARM_EABI_VERSION. The magic number is set to
...
5 to match the current doc.
Added FIXME reminder Make it really configurable later.
llvm-svn: 124899
2011-02-04 21:41:11 +00:00
Jason W Kim
10c1a81736
Teach ARM/MC/ELF to handle R_ARM_JUMP24 relocation type for conditional jumps.
...
(yes, this is different from R_ARM_CALL)
- Adds a new method getARMBranchTargetOpValue() which handles the
necessary distinction between the conditional and unconditional br/bl
needed for ARM/ELF
At least for ARM mode, the needed fixup for conditional versus unconditional
br/bl is identical, but the ARM docs and existing ARM tools expect this
reloc type...
Added a few FIXME's for future naming fixups in ARMInstrInfo.td
llvm-svn: 124895
2011-02-04 19:47:15 +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
Evan Cheng
3689d1302d
Fix bogus assert condition noticed by Csaba Raduly.
...
llvm-svn: 124645
2011-02-01 01:50:49 +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
547873da60
Add support for the --noexecstack option.
...
llvm-svn: 124077
2011-01-23 17:55:27 +00:00
Rafael Espindola
14333be1af
Add support for lowercase variants.
...
llvm-svn: 124071
2011-01-23 16:11:25 +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