Ahmed Bougacha
518cc6f811
MC CFG: Use data structures more appropriate than std::set.
...
llvm-svn: 188888
2013-08-21 07:28:51 +00:00
Ahmed Bougacha
58ed11341b
MC CFG: Add an MCObjectSymbolizer in the MCObjectDisassembler.
...
Used to detect calls to function symbol stubs (future commit).
llvm-svn: 188887
2013-08-21 07:28:48 +00:00
Ahmed Bougacha
b09d140f6b
MC CFG: Add MCObjectDisassembler Mach-O implementation.
...
Supports:
- entrypoint, using LC_MAIN.
- static ctors/dtors, using __mod_{init,exit}_func
- translation between effective and object load address, using
dyld's VM address slide.
llvm-svn: 188886
2013-08-21 07:28:44 +00:00
Ahmed Bougacha
0a89d2bf76
Add Mach-O entry_point_command declaration.
...
llvm-svn: 188885
2013-08-21 07:28:40 +00:00
Ahmed Bougacha
2eb593682a
MC CFG: Add "dynamic disassembly" support to MCObjectDisassembler.
...
It can now disassemble code in situations where the effective load
address is different than the load address declared in the object file.
This happens for PIC, hence "dynamic".
llvm-svn: 188884
2013-08-21 07:28:37 +00:00
Ahmed Bougacha
57bc9677cd
MC CFG: When disassembly is impossible, fallback to data bytes.
...
This is the behavior of sequential disassemblers (llvm-objdump, ...),
when there is no instruction size hint (fixed-length, ...)
While there, also do some minor cleanup.
llvm-svn: 188883
2013-08-21 07:28:32 +00:00
Ahmed Bougacha
a376353346
MC CFG: Add MCObjectDisassembler support for entrypoint + static ctors.
...
For now, this isn't implemented for any format.
llvm-svn: 188882
2013-08-21 07:28:29 +00:00
Ahmed Bougacha
ff12d02d51
MC CFG: Split MCBasicBlocks to mirror atom splitting.
...
When an MCTextAtom is split, all MCBasicBlocks backed by it are
automatically split, with a fallthrough between both blocks, and
the successors moved to the second block.
llvm-svn: 188881
2013-08-21 07:28:24 +00:00
Ahmed Bougacha
d3fc5b9648
MC CFG: Add a few needed methods, mainly MCModule::findFirstAtomAfter.
...
While there, do some minor cleanup.
llvm-svn: 188880
2013-08-21 07:28:17 +00:00
Ahmed Bougacha
ffeecb5c80
MC: ObjectSymbolizer can now recognize external function stubs.
...
Only implemented in the Mach-O ObjectSymbolizer.
The testcase sadly introduces a new binary.
llvm-svn: 188879
2013-08-21 07:28:13 +00:00
Ahmed Bougacha
382a6d7562
MC: Refactor ObjectSymbolizer to make relocation/section info generation lazy.
...
llvm-svn: 188878
2013-08-21 07:28:07 +00:00
Ahmed Bougacha
630f9546c0
MC CFG: Add entrypoint address to MCModule.
...
llvm-svn: 188877
2013-08-21 07:28:02 +00:00
Ahmed Bougacha
3012ac5387
MC CFG: Add more MCFunction container methods (find, empty).
...
llvm-svn: 188876
2013-08-21 07:27:59 +00:00
Ahmed Bougacha
7bfc7da6e8
MC CFG: Keep pointer to parent MCModule in created MCFunctions.
...
Also, drive-by cleaning around createFunction.
llvm-svn: 188875
2013-08-21 07:27:55 +00:00
Ahmed Bougacha
d6351e76d5
MC CFG: Don't insert preds/succs again.
...
llvm-svn: 188874
2013-08-21 07:27:50 +00:00
Ahmed Bougacha
c43aa4e88c
MC CFG: Remap enough for the inserted instruction.
...
llvm-svn: 188873
2013-08-21 07:27:47 +00:00
Ahmed Bougacha
03efde5887
MC CFG: uint64_t -> size_t for vector size.
...
llvm-svn: 188872
2013-08-21 07:27:44 +00:00
Ahmed Bougacha
729ad51905
MC CFG: Add a getter for MCDataAtom's data array.
...
While there, switch to new-style documentation.
llvm-svn: 188871
2013-08-21 07:27:40 +00:00
Timur Iskhodzhanov
88fd439a24
Abstract out virtual calls and virtual function prologue code generation; implement them for -cxx-abi microsoft
...
llvm-svn: 188870
2013-08-21 06:25:03 +00:00
David Majnemer
ed89b5c6e7
DebugInfo: Do not use the DWARF Version for the .debug_pubnames or .debug_pubtypes version field
...
Summary:
LLVM would generate DWARF with version 3 in the .debug_pubname and
.debug_pubtypes version fields. This would lead SGI dwarfdump to fail
parsing the DWARF with (in the instance of .debug_pubnames) would exit
with:
dwarfdump ERROR: dwarf_get_globals: DW_DLE_PUBNAMES_VERSION_ERROR (123)
This fixes PR16950.
Reviewers: echristo, dblaikie
Reviewed By: echristo
CC: cfe-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1454
llvm-svn: 188869
2013-08-21 06:13:34 +00:00
Craig Topper
77df9cdd0b
Synchronize VEX JIT encoding code with the MCJIT version. Fix a bug in the MCJIT code where CurOp was being incremented even if the operand it was pointing at wasn't used. Maybe only matters if there are any EVEX_K instructions that aren't VEX_4V.
...
llvm-svn: 188868
2013-08-21 05:57:45 +00:00
Craig Topper
679b53ac67
Add avx512cd, avx512er, avx512pf feature flags and enable them on KNL CPU.
...
llvm-svn: 188867
2013-08-21 05:29:10 +00:00
Nadav Rotem
7efc04cb40
In LLVM FMA3 operands are dst, src1, src2, src3, however dst is not encoded as it is always src1. This was causing the encoding of the operands to be off by one.
...
Patch by Chris Bieneman.
llvm-svn: 188866
2013-08-21 05:03:10 +00:00
Nadav Rotem
092559e6f0
Add the FMA3 feature in order to test FMA encoding using the old jit.
...
Patch by Chris Bieneman!
llvm-svn: 188865
2013-08-21 05:02:12 +00:00
Bob Wilson
e7ca6f9359
For Darwin builds, locate tools using xcrun when available.
...
The make/platform/darwin_bni.mk file already has similar code but we
apparently neglected to add it to the clang_darwin.mk file.
llvm-svn: 188864
2013-08-21 04:42:56 +00:00
Nick Lewycky
3151d7c76a
Issue fixits replacing invalid character literals with the equivalent \xNN
...
escape code.
llvm-svn: 188863
2013-08-21 04:10:58 +00:00
Craig Topper
cee6133930
Revert accidental commit.
...
llvm-svn: 188862
2013-08-21 04:01:01 +00:00
Craig Topper
2047c4c042
Revert accidental commit.
...
llvm-svn: 188861
2013-08-21 04:00:44 +00:00
Craig Topper
9c4d17f65c
Replace avx-512 with avx512f to match llvm side and what gcc patches appear to be using.
...
llvm-svn: 188860
2013-08-21 03:59:22 +00:00
Craig Topper
5c94bb8551
Rename mattr names for AVX-512 to from avx-512 -> avx512f, avx-512-pfi -> av512pf, avx-512-cdi -> avx512cd, avx-512-eri->avx512er. This matches better with official docs and what gcc patches appearto be using. I didn't touch the has* functions or the feature flag names to avoid change the td and lowering file while commits are still happening.
...
llvm-svn: 188859
2013-08-21 03:57:57 +00:00
Marshall Clow
a86d516213
LWG 2145 - mark constructor for std::error_category as inline and constexpr. Leave the (existing, out-of-line, non-constexpr) in the dylib for compatibility with existing programs)
...
llvm-svn: 188858
2013-08-21 02:57:19 +00:00
Nick Lewycky
63cc55b479
No functionality change. Adjust a bunch of formatting issues in this code and
...
fix a typo in a comment.
llvm-svn: 188857
2013-08-21 02:40:19 +00:00
NAKAMURA Takumi
de8880a23d
X86TargetMachine.cpp: Clarify to emit GOT in i686-{cygming|win32}-elf for mcjit.
...
I suppose all "lli -use-mcjit i686-*" should require GOT, (and to fail.)
llvm-svn: 188856
2013-08-21 02:37:25 +00:00
NAKAMURA Takumi
b46d3c8995
lli/RecordingMemoryManager.cpp: Make it complain if _GLOBAL_OFFSET_TABLE_ were not provided.
...
FIXME: Would it be responsible to provide GOT?
llvm-svn: 188855
2013-08-21 02:37:14 +00:00
Argyrios Kyrtzidis
7aa49d8ca6
Remove more uses of 'index' as namespace scope.
...
Follow up to r188850.
llvm-svn: 188854
2013-08-21 01:51:19 +00:00
Richard Smith
3249fed9b2
If we find an error in the range expression in a range-based for loop, and the
...
loop variable has a type containing 'auto', set the declaration to be invalid
(because we couldn't deduce its type) to prevent follow-on errors.
llvm-svn: 188853
2013-08-21 01:40:36 +00:00
Jakub Staszak
84a0ae74b0
Move #includes from .h to .cpp file.
...
llvm-svn: 188852
2013-08-21 01:20:11 +00:00
Akira Hatanaka
39f915b58a
[micromips] Print instruction alias "not" if the last operand of a nor is zero.
...
llvm-svn: 188851
2013-08-21 01:18:46 +00:00
Argyrios Kyrtzidis
5234b49854
Avoid using the 'index' namespace as scope.
...
This should fix the bogus ambiguous reference errors reported by gcc 4.2.1 that the FreeBSD bot is using.
llvm-svn: 188850
2013-08-21 00:49:25 +00:00
Bill Wendling
707f601fa5
Move registering the execution of a basic block to the beginning rather than the end.
...
There are situations which can affect the correctness (or at least expectation)
of the gcov output. For instance, if a call to __gcov_flush() occurs within a
block before the execution count is registered and then the program aborts in
some way, then that block will not be marked as executed. This is not normally
what the user expects.
If we move the code that's registering when a block is executed to the
beginning, we can catch these types of situations.
PR16893
llvm-svn: 188849
2013-08-20 23:52:00 +00:00
Akira Hatanaka
9a1fb6b9fc
[mips] Add support for mfhc1 and mthc1.
...
llvm-svn: 188848
2013-08-20 23:47:25 +00:00
Akira Hatanaka
bfb6624797
[mips] Add support for calling convention CC_MipsO32_FP64, which is used when the
...
size of floating point registers is 64-bit.
Test case will be added when support for mfhc1 and mthc1 is added.
llvm-svn: 188847
2013-08-20 23:38:40 +00:00
Fariborz Jahanian
b834352609
ObjectiveC migrator. make sure to embed audited
...
candidate functions in their CF_IMPLICIT_BRIDGING_ENABLED
pragma before exiting the header file.
llvm-svn: 188846
2013-08-20 23:35:26 +00:00
Akira Hatanaka
8dd951bc9f
[mips] Remove predicates that were incorrectly or unnecessarily added.
...
llvm-svn: 188845
2013-08-20 23:21:55 +00:00
Jakub Staszak
d184e2decc
Add some constantness.
...
llvm-svn: 188844
2013-08-20 23:04:15 +00:00
Bill Wendling
0911248b8d
Use -disable-output and to suppress output and don't use a temporary file unless we need one.
...
llvm-svn: 188843
2013-08-20 23:00:25 +00:00
Akira Hatanaka
14e31a2fe7
[mips] Define register class FGRH32 for the high half of the 64-bit floating
...
point registers. We will need this register class later when we add
definitions for instructions mfhc1 and mthc1. Also, remove sub-register indices
sub_fpeven and sub_fpodd and use sub_lo and sub_hi instead.
llvm-svn: 188842
2013-08-20 22:58:56 +00:00
Jakub Staszak
906e48f2a0
Fix include guards.
...
llvm-svn: 188841
2013-08-20 22:52:02 +00:00
Eli Friedman
85698c8d7b
Remove Extension warning for GNU local labels.
...
We generally don't warn about extensions involving keywords reserved
for the implementation, so we shouldn't warn here either: the
standard doesn't require it, and it doesn't provide useful information
to the user.
llvm-svn: 188840
2013-08-20 22:44:32 +00:00
Eli Friedman
571c3ae7d6
Add more specific flags for misc GNU extensions.
...
This adds the following as subgroups of -Wgnu: -Wgnu-alignof-expression,
-Wgnu-case-range, -Wgnu-complex-integer, -Wgnu-conditional-omitted-operand,
-Wgnu-empty-initializer, -Wgnu-label-as-value, -Wgnu-local-label,
and -Wgnu-statement-expression,
Patch by Peter Lewis.
llvm-svn: 188839
2013-08-20 22:44:28 +00:00