Commit Graph

1076 Commits

Author SHA1 Message Date
Joerg Sonnenberger
a04663ecb2 Bug#9172: Don't use static in file scope, use an attribute on the
parser.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126225 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-22 16:53:11 +00:00
Joerg Sonnenberger
d45e8bf93b Handle FK_PCRel_1 and add a test case for this and FK_PCRel_4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126157 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 23:25:41 +00:00
Stuart Hastings
37c79c5942 End the line if we return early. Radar 9012638.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126141 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 21:07:07 +00:00
Stuart Hastings
6ad82d81cc Fix to correctly support attribute((section("__DATA, __common"))).
Radar 9012638.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126127 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 17:27:17 +00:00
Joerg Sonnenberger
7d0805dcb8 Use a vector of pairs to implement the section stack, not two
independent vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126099 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21 01:07:42 +00:00
Rafael Espindola
f7ad048f1e Add some limited support for labels in org directives. Hopefully enough to fix
PR9245.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126091 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 20:20:07 +00:00
Oscar Fuentes
6d857ca4d7 Move library stuff out of the toplevel CMakeLists.txt file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125968 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:06:14 +00:00
Rafael Espindola
908159b46a Gas is very inconsistent about when a relaxation/relocation is needed. Do
the right thing and stop trying to copy it. Fixes PR8944.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125648 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 03:25:55 +00:00
Rafael Espindola
7768a9dce1 Add support for pushsection and popsection. Patch by Joerg Sonnenberger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125629 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16 01:08:29 +00:00
Roman Divacky
738a00eb86 Add support for parsing [expr].
This is submitted by Joerg Sonnenberger and fixes his PR8685.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125595 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-15 20:43:39 +00:00
Rafael Espindola
5d618ef7f1 Switch llvm to using comdats. For now always use groups with a single
section.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125526 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 22:23:49 +00:00
Rafael Espindola
9de3a0701a Move broken HasCommonSymbols to ELFWriter.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125490 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-14 16:51:08 +00:00
Jim Grosbach
de2f5f423b More whitespace cleanup...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125388 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-11 19:05:56 +00:00
Shantonu Sen
80fd30563c 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>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125215 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-09 21:03:19 +00:00
Benjamin Kramer
0fd90bc12f Support for .ifdef / .ifndef in the assembler parser. Patch by Joerg Sonnenberger.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125120 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-08 22:29:56 +00:00
Jason W Kim
953a2a3dee 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124996 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-07 01:11:15 +00:00
Jason W Kim
2d7a53aec2 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.





git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124899 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 21:41:11 +00:00
Jason W Kim
685c350ae7 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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124895 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-04 19:47:15 +00:00
Bob Wilson
720b918eeb Do not sign extend floating-point values in the asm parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124831 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-03 23:17:47 +00:00
Evan Cheng
e087afa128 Fix bogus assert condition noticed by Csaba Raduly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124645 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-01 01:50:49 +00:00
Roman Divacky
bb6d14fbfe Enumerate .code16/32/64 instead of checking .code prefix. This
unbreaks some ARM tests.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124608 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31 21:19:43 +00:00
Roman Divacky
f6fbd84c56 Error on all .code* directives instead of just .code16 as they
all lead to a silent miscompilation of code.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124603 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31 20:56:49 +00:00
Roman Divacky
cb72780176 Error on .code16 instead of producing wrong (32bit) code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124498 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-28 19:29:48 +00:00
Roman Divacky
14e66553d5 Add support for parsing .float
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124485 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-28 14:20:32 +00:00
Nico Weber
4c4c732960 PR8951: Support for .equiv in integrated assembler, patch by Jörg Sonnenberger!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124467 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-28 03:04:41 +00:00
Roman Divacky
54b0f4f2a4 Add support for specifying register name in cfi-register/offset/def
as well as register number.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124379 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-27 17:16:37 +00:00
Bill Wendling
69c4ef321c 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124229 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-25 21:26:41 +00:00
Rafael Espindola
184640e96e 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124127 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24 18:02:54 +00:00
Rafael Espindola
96aa78c8c5 Add support for the --noexecstack option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124077 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-23 17:55:27 +00:00
Rafael Espindola
54104db434 Add support for lowercase variants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124071 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-23 16:11:25 +00:00
Rafael Espindola
0cf5e3d51d Delay the creation of eh_frame so that the user can change the defaults.
Add support for SHT_X86_64_UNWIND.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124059 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-23 05:43:40 +00:00
Rafael Espindola
1c13026e8f Remove more duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124056 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-23 04:43:11 +00:00
Rafael Espindola
c85dca66e6 Remove duplicated code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124054 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-23 04:28:49 +00:00
Jim Grosbach
4121e8a0bd Make sure to propogate the error code when we fail to parse a modifier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123857 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-19 23:06:07 +00:00
Anton Korobeynikov
c6585202ca Use common style for .cfi directives
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123472 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-14 21:57:39 +00:00
Evan Cheng
f3eb3bba16 Completed :lower16: / :upper16: support for movw / movt pairs on Darwin.
- Fixed :upper16: fix up routine. It should be shifting down the top 16 bits first.
- Added support for Thumb2 :lower16: and :upper16: fix up.
- Added :upper16: and :lower16: relocation support to mach-o object writer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123424 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-14 02:38:49 +00:00
Evan Cheng
8fbbd1c03d Add comment about Thumb2 fixup comments being completely bogus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123411 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-13 23:27:39 +00:00
Evan Cheng
82caf1a867 Relax an assertion. On archs like ARM, an immediate field may be scattered. So it's possible for some bits of every 8 bits to be encoded already, and the rest still needs to be fixed up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123403 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-13 21:45:26 +00:00
Evan Cheng
7597212abc Model :upper16: and :lower16: as ARM specific MCTargetExpr. This is a step
in the right direction. It eliminated some hacks and will unblock codegen
work. But it's far from being done. It doesn't reject illegal expressions,
e.g. (FOO - :lower16:BAR). It also doesn't work in Thumb2 mode at all.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123369 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-13 07:58:56 +00:00
Jason W Kim
1d8661744b Style clean up - break up the breaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123347 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-13 00:07:51 +00:00
Jason W Kim
86a97f2e4d 1. Support ELF pcrel relocations for movw/movt:
R_ARM_MOVT_PREL and R_ARM_MOVW_PREL_NC.
2. Fix minor bug in ARMAsmPrinter - treat bitfield flag as a bitfield, not an enum.
3. Add support for 3 new elf section types (no-ops)




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123294 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-12 00:19:25 +00:00
Anton Korobeynikov
16c29b5f28 Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123170 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-10 12:39:04 +00:00
Rafael Espindola
7a54997d67 Fix PR8878.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122658 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-01 19:05:35 +00:00
Benjamin Kramer
1928236514 Make a bunch of symbols internal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122642 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-30 22:34:44 +00:00
Daniel Dunbar
b2624eda5a MC/Mach-O/Thumb: Set the thumb bit in the symbol table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122630 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-29 14:14:06 +00:00
Rafael Espindola
caf1158b0f Correctly encode pcrel|indirect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-29 04:31:26 +00:00
Rafael Espindola
9c54c14cad Remove second return.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122616 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-29 02:42:33 +00:00
Rafael Espindola
a7e450574c Fix bug when trying to output uint16_t or uint32_t.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122615 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-29 02:30:49 +00:00
Rafael Espindola
b40a71fda1 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 :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122614 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-29 01:42:56 +00:00
Rafael Espindola
b4601bd2ff Implement cfi_def_cfa_register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-12-29 00:26:06 +00:00