1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

2385 Commits

Author SHA1 Message Date
Eric Christopher
f26f61b12b Move the TargetMachine MC options to MCTargetOptions. No functional
change.

llvm-svn: 208832
2014-05-15 01:08:00 +00:00
Eric Christopher
628e5ee56f Make the split function use StringRef::split.
llvm-svn: 208723
2014-05-13 19:55:17 +00:00
Joerg Sonnenberger
3111bf0da3 Check explicitly for EHABI and just use the default settings.
Code depends on the assembler and linker to fix things up...

llvm-svn: 208715
2014-05-13 17:58:13 +00:00
Rafael Espindola
bd85dfa78c Move EmitDwarfAdvanceLineAddr and EmitDwarfAdvanceFrameAddr to the obj streamer.
This lets us delete the MCAsmStreamer implementation. No functionality change.

llvm-svn: 208570
2014-05-12 14:43:25 +00:00
Rafael Espindola
28aff37ef6 Pass a MCObjectStreamer instead of a MCStreamer when possible.
No functionality change.

llvm-svn: 208569
2014-05-12 14:40:12 +00:00
Rafael Espindola
5585abd254 Pass a MCObjectStreamer instead of a MCStreamer when possible.
No functionality change.

llvm-svn: 208567
2014-05-12 14:28:48 +00:00
Rafael Espindola
f454b13416 Move EH/Debug frame handling to the object streamer.
Now that the asm streamer doesn't use it, the MCStreamer doesn't need to know
about it.

llvm-svn: 208562
2014-05-12 14:02:44 +00:00
Rafael Espindola
90b1eecc57 Remove always true argument and unused field.
llvm-svn: 208561
2014-05-12 13:47:05 +00:00
Rafael Espindola
9786f35a95 Remove always true argument and field.
llvm-svn: 208559
2014-05-12 13:40:49 +00:00
Rafael Espindola
b37ea322b3 Remove always true argument.
llvm-svn: 208558
2014-05-12 13:34:25 +00:00
Rafael Espindola
13ccdbe63e Remove an always true argument.
llvm-svn: 208557
2014-05-12 13:30:10 +00:00
Rafael Espindola
9fba6f5cc1 Remove write only field.
llvm-svn: 208555
2014-05-12 13:20:37 +00:00
Rafael Espindola
2cdf6cc14f Remove now empty method.
llvm-svn: 208554
2014-05-12 13:18:13 +00:00
Rafael Espindola
74afbcb34c Remove the always true UseCFI member.
llvm-svn: 208553
2014-05-12 13:12:22 +00:00
Rafael Espindola
07bd3d3bf7 Remove the useCFI constructor argument to MCAsmStreamer.
llvm-svn: 208551
2014-05-12 13:07:11 +00:00
Rafael Espindola
765e5e78cf Remove the UseCFI option from createAsmStreamer.
We were already always passing true, this just removes the option.

llvm-svn: 208205
2014-05-07 13:00:43 +00:00
Joerg Sonnenberger
541f85d280 Allow using normal .eh_frame based unwinding on ARM. Use the same
encodings as x86. Use this exception model for NetBSD.

llvm-svn: 208166
2014-05-07 07:49:34 +00:00
Eric Christopher
57b1515012 Use a range based for loop for the SubtargetFeatures print function.
llvm-svn: 208132
2014-05-06 21:20:29 +00:00
Eric Christopher
cc53fa7d4b Fix odd formatting that snuck into last patch.
llvm-svn: 208130
2014-05-06 21:04:27 +00:00
Eric Christopher
a4b177382a ArrayRef-ize the Feature and Processor tables for SubtargetFeatures.
This removes arguments passed everywhere and allows the use of
standard iteration over lists.
Should be no functional change.

llvm-svn: 208127
2014-05-06 20:23:04 +00:00
Eric Christopher
4b361468c0 Have the SubtargetFeature help routine just not return a number and
fall back to the normal path without a cpu. While doing this fix
llc to just exit when we don't have a module to process instead of
asserting.

llvm-svn: 208102
2014-05-06 16:29:50 +00:00
Eric Christopher
dd5ab2d0fd Revert "Walk back commits for unused function parameters - they're still being"
this reapplies 208012 and 208002.

llvm-svn: 208037
2014-05-06 02:37:26 +00:00
Eric Christopher
aca3da86bc Walk back commits for unused function parameters - they're still being
used via dragonegg for now.

llvm-svn: 208016
2014-05-05 23:26:59 +00:00
Eric Christopher
e0b6ecc84d Remove a now unnecessary function since all calls have one version
and inline it into its caller.

llvm-svn: 208012
2014-05-05 22:36:07 +00:00
Eric Christopher
6723e945a9 Remove a call to std::exit in a library. Make "Help" return
a 0 as a default answer.

llvm-svn: 208009
2014-05-05 22:01:47 +00:00
Eric Christopher
bc51107137 Remove unused argument from AddFeature.
llvm-svn: 208002
2014-05-05 21:40:44 +00:00
Rafael Espindola
bb77d317cd Fix pr19645.
The fix itself is fairly simple: move getAccessVariant to MCValue so that we
replace the old weak expression evaluation with the far more general
EvaluateAsRelocatable.

This then requires that EvaluateAsRelocatable stop when it finds a non
trivial reference kind. And that in turn requires the ELF writer to look
harder for weak references.

Last but not least, this found a case where we were being bug by bug
compatible with gas and accepting an invalid input. I reported pr19647
to track it.

llvm-svn: 207920
2014-05-03 19:57:04 +00:00
Saleem Abdulrasool
7a571c0be3 MC: place .file records into the correct section
.file records are supposed to have a section identifier of 65534
(IMAGE_SCN_DEBUG) rather than 0.  This is spelt out clearly within the PE/COFF
specification.  Fix this minor oversight with the implementation for support for
.file records.

llvm-svn: 207851
2014-05-02 17:45:24 +00:00
David Blaikie
6383ec4a59 Fix uninitialized variable introduced in r207739.
This was initialized by llvm-mc (calling setDwarfVersion) but other
clients (such as clang, llc, etc) aren't necessarily initializing this
so we were getting garbage DWARF version values in the output.
Initialize it to a reasonable default (the same default used in llvm-mc,
though this is higher than it was (2) previously).

llvm-svn: 207788
2014-05-01 19:55:34 +00:00
Rafael Espindola
f27adbd4c2 Don't propagate StorageClass and ComplexType to aliases.
This matches gas' behaviour on COFF.

I think that this yak is now sufficiently shaved for aliases with offset
to work.

llvm-svn: 207786
2014-05-01 19:02:03 +00:00
Rafael Espindola
4ce7e8e6df Compute the correct section for zed = foo + 1 in COFF.
This fixes pr19147.

There are a few more related issues to fix, but the testcase in the bug now
passes.

llvm-svn: 207763
2014-05-01 13:37:57 +00:00
Rafael Espindola
6b3eacf852 Move getBaseSymbol somewhere the COFF writer can use.
I will use it there in a second.

llvm-svn: 207761
2014-05-01 13:24:25 +00:00
Rafael Espindola
bcaa0dd2f9 Make getBaseSymbol non recursive.
llvm-svn: 207759
2014-05-01 13:09:42 +00:00
Oliver Stannard
0d1466e7c9 Record the DWARF version in MCContext
Record the DWARF version in MCContext, and use it when
emitting the dwarf version into the debug info.

llvm-svn: 207739
2014-05-01 08:46:02 +00:00
Rafael Espindola
6ed44fb3d0 Start fixing pr19147.
This makes the coff writer compute the correct symbol value for the test in
pr19147. The section is still incorrect, that will be fixed in a followup patch.

llvm-svn: 207728
2014-05-01 00:10:17 +00:00
Joerg Sonnenberger
931f18107d Add missing breaks.
llvm-svn: 207723
2014-04-30 23:36:24 +00:00
Joerg Sonnenberger
443277a751 Switch over getArch()'s result.
llvm-svn: 207721
2014-04-30 23:23:14 +00:00
Rafael Espindola
619f759608 Provide a version of getSymbolOffset that returns false on error.
This simplifies ELFObjectWriter::SymbolValue a bit more. This new version
will also be used in the COFF writer to fix pr19147.

llvm-svn: 207711
2014-04-30 21:51:13 +00:00
Rafael Espindola
df3c13c420 Simplify ELFObjectWriter::SymbolValue.
It now defers all offset computation to getSymbolOffset.

llvm-svn: 207674
2014-04-30 16:59:35 +00:00
Hans Wennborg
1f76d4c2b7 ELFObjectWriter: deduplicate suffices in strtab
We already do this for shstrtab, so might as well do it for strtab. This
extracts the string table building code into a separate class. The idea
is to use it for other object formats too.

I mostly wanted to do this for the general principle, but it does save a
little bit on object file size. I tried this on a clang bootstrap and
saved 0.54% on the sum of object file sizes (1.14 MB out of 212 MB for
a release build).

Differential Revision: http://reviews.llvm.org/D3533

llvm-svn: 207670
2014-04-30 16:25:02 +00:00
Rafael Espindola
492391e686 Grammar fix.
Thanks to Saleem Abdulrasool for noticing it.

llvm-svn: 207643
2014-04-30 12:42:22 +00:00
James Molloy
b41c043c3c [ARM64] Ensure arm64_be is dealt with when emitting debug info.
This is a partial port of r204816 (cpirker "Elf support for MC-JIT
runtime dynamic linker") from AArch64 to ARM64.

llvm-svn: 207625
2014-04-30 10:15:35 +00:00
Rafael Espindola
cc84bed91a Simplify getSymbolOffset.
We can now use EvaluateAsValue to make it non recursive and remove some code
duplication.

llvm-svn: 207604
2014-04-30 03:06:06 +00:00
Benjamin Kramer
b1deb46708 Another missing include for MSVC.
llvm-svn: 207596
2014-04-29 23:46:48 +00:00
Benjamin Kramer
4f8fb8ff6c raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary.
llvm-svn: 207593
2014-04-29 23:26:49 +00:00
Joerg Sonnenberger
2978bd4236 Parse and create GOT_PREL relocations.
llvm-svn: 207526
2014-04-29 13:42:02 +00:00
Rafael Espindola
ea5c91adc8 Centralize the handling of the thumb bit.
This patch centralizes the handling of the thumb bit around
MCStreamer::isThumbFunc and makes isThumbFunc handle aliases.

This fixes a corner case, but the main advantage is having just one
way to check if a MCSymbol is thumb or not. This should still be
refactored to be ARM only, but at least now it is just one predicate
that has to be refactored instead of 3 (isThumbFunc,
ELF_Other_ThumbFunc, and SF_ThumbFunc).

llvm-svn: 207522
2014-04-29 12:46:50 +00:00
Rafael Espindola
1fe9e6bc34 Add an option for evaluating past symbols.
When evaluating an assembly expression for a relocation, we want to
stop at MCSymbols that are in the symbol table, even if they are variables.
This is needed since the semantics may require that the relocation use them.

That is not the case when computing the value of a symbol in the symbol table.
There are no relocations in this case and we have to keep going until we hit
a section or find out that the expression doesn't have an assembly time
value.

llvm-svn: 207445
2014-04-28 20:53:11 +00:00
Rafael Espindola
b2d0a296c4 Simplify ELFObjectWriter::ExecutePostLayoutBinding.
No functionality change. This removes the last use of AliasedSymbol in
ELFObjectWriter.cpp.

llvm-svn: 207424
2014-04-28 17:05:36 +00:00
Rafael Espindola
9efc666a93 Simplify isLocal().
No functionality change.

llvm-svn: 207421
2014-04-28 14:24:44 +00:00