Commit Graph

4974 Commits

Author SHA1 Message Date
Rafael Espindola
ec7ab53570 clang-format a bit of code to make the next patch easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203203 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 05:32:03 +00:00
Elena Demikhovsky
b0a3627443 AVX-512: Added rrk, rrkz, rmk, rmkz, rmbk, rmbkz versions of AVX512 FP packed instructions, added encoding tests for them.
By Robert Khazanov.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203098 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 08:45:30 +00:00
Ahmed Charles
f4ccd11075 Replace OwningPtr<T> with std::unique_ptr<T>.
This compiles with no changes to clang/lld/lldb with MSVC and includes
overloads to various functions which are used by those projects and llvm
which have OwningPtr's as parameters. This should allow out of tree
projects some time to move. There are also no changes to libs/Target,
which should help out of tree targets have time to move, if necessary.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203083 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 05:51:42 +00:00
Ahmed Charles
1a6eca243f [C++11] Replace OwningPtr::take() with OwningPtr::release().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202957 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 10:19:29 +00:00
Craig Topper
0bfd526b6b [C++11] Add 'override' keywords to tablegen code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202937 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-05 05:17:42 +00:00
Chandler Carruth
1decd56b8d [cleanup] Re-sort all the includes with utils/sort_includes.py.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202811 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-04 10:07:28 +00:00
Aaron Ballman
288da8c618 Adding support for MSVC debugger visualization of the Optional datatype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202760 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 21:15:07 +00:00
Benjamin Kramer
9efaf2f2da [C++11] Use std::tie to simplify compare operators.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202751 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 19:58:30 +00:00
Benjamin Kramer
a0fb58010d Unbreak the C++11 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202714 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-03 13:59:41 +00:00
Benjamin Kramer
d628f19f5d [C++11] Replace llvm::next and llvm::prior with std::next and std::prev.
Remove the old functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202636 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 12:27:27 +00:00
Chandler Carruth
0a3eef53d7 [C++11] Switch all uses of the llvm_move macro to use std::move
directly, and remove the macro.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202612 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 04:08:41 +00:00
Benjamin Kramer
ee5e607355 Now that we have C++11, turn simple functors into lambdas and remove a ton of boilerplate.
No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202588 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-01 11:47:00 +00:00
Hal Finkel
c72cf87285 Add an OutPatFrag TableGen class
Unfortunately, it is currently impossible to use a PatFrag as part of an output
pattern (the part of the pattern that has instructions in it) in TableGen.
Looking at the current implementation, this was clearly intended to work (there
is already code in place to expand patterns in the output DAG), but is
currently broken by the baked-in type-checking assumption and the order in which
the pattern fragments are processed (output pattern fragments need to be
processed after the instruction definitions are processed).

Fixing this is fairly simple, but requires some way of differentiating output
patterns from the existing input patterns. The simplest way to handle this
seems to be to create a subclass of PatFrag, and so that's what I've done here.

As a simple example, this allows us to write:

def crnot : OutPatFrag<(ops node:$in),
                       (CRNOR $in, $in)>;

def       : Pat<(not i1:$in),
                (crnot $in)>;

which captures the core use case: handling of repeated subexpressions inside
of complicated output patterns.

This will be used by an upcoming commit to the PowerPC backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202450 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-28 00:26:56 +00:00
Craig Topper
9572b75e5b Fix indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202344 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-27 03:30:36 +00:00
NAKAMURA Takumi
5fb5076e28 [CMake] Use LINK_LIBS instead of target_link_libraries().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202238 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 06:41:29 +00:00
Craig Topper
df24b19e45 [x86] Simplify disassembler code slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202233 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-26 06:01:21 +00:00
Rafael Espindola
ac69459e0f Replace the F_Binary flag with a F_Text one.
After this I will set the default back to F_None. The advantage is that
before this patch forgetting to set F_Binary would corrupt a file on windows.
Forgetting to set F_Text produces one that cannot be read in notepad, which
is a better failure mode :-)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202052 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24 18:20:12 +00:00
Filip Pizlo
23ffb3ea10 Stackmaps are used for OSR exits, which is a custom kind of unwinding. Hence, they
should not be marked nounwind.

Marking them nounwind caused crashes in the WebKit FTL JIT, because if we enable 
sufficient optimizations, LLVM starts eliding compact_unwind sections (or any unwind 
data for that matter), making deoptimization via stackmaps impossible.

This changes the stackmap intrinsic to be may-throw, adds a test for exactly the 
sympton that WebKit saw, and fixes TableGen to handle un-attributed intrinsics.

Thanks to atrick and philipreames for reviewing this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201826 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20 23:57:31 +00:00
Adrian Prantl
22559cc099 test_debuginfo.pl: Make failures easier to debug by printing the debugger
output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201809 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20 19:55:44 +00:00
Craig Topper
46aa7fb720 [x86] Switch PAUSE instruction to use XS prefix instead of HasREPPrefix. Remove HasREPPrefix support from disassembler table generator since its now only used by CodeGenOnly instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201767 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20 07:59:43 +00:00
Alexey Samsonov
2228d01073 Support GTest for FreeBSD platforms (9.x)
Patch by Viktor Kutuzov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201683 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 15:18:30 +00:00
Craig Topper
fa0cf99585 Remove special FP opcode maps and instead add enough MRM_XX formats to handle all the FP operations. This increases format by 1 bit, but decreases opcode map by 1 bit so the TSFlags size doesn't change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201649 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 08:25:02 +00:00
Craig Topper
75116bc27e Put some of the X86 formats in a more logical order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201645 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 06:59:13 +00:00
Craig Topper
82a644adf2 Remove A6/A7 opcode maps. They can all be handled with a TB map, opcode of 0xa6/0xa7, and adding MRM_C0/MRM_E0 forms. Removes 376K from the disassembler tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201641 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-19 05:34:21 +00:00
Rafael Espindola
1836fe5651 Rename a DebugLoc variable to DbgLoc and a DataLayout to DL.
This is quiet a bit less confusing now that TargetData was renamed DataLayout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201606 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 22:05:46 +00:00
Tim Northover
eb720cc3a1 Darwin builds: handle different possible form for SDKROOT.
Modifying build_llvm to handle SDKROOT being the name of an SDK rather than a
path. This will still work if SDKROOT is a path.

rdar://problem/15162322

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201560 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 11:20:44 +00:00
Craig Topper
7d2bb38164 Add an x86 prefix encoding for instructions that would decode to a different instruction with 0xf2/f3/66 were in front of them, but don't themselves have a prefix. For now this doesn't change any bbehavior, but plan to use it to fix some bugs in the disassembler.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201538 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-18 00:21:49 +00:00
NAKAMURA Takumi
a938c51444 llvmbuild: Exclude disabled targets from LLVMExports.cmake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201490 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-16 12:14:24 +00:00
Craig Topper
611c2c3804 Remove unused method declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201301 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 07:12:40 +00:00
Craig Topper
1ee7e39dd4 Remove filtering concept from X86 disassembler table generation. It's no longer necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201299 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-13 07:07:16 +00:00
Craig Topper
cfd14e6aea Remove special case filtering for instructions with lock prefix as they are all marked with isCodeGenOnly already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201216 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12 08:09:20 +00:00
Craig Topper
56d749a86b Mark XACQUIRE_PREFIX/XRELEASE_PREFIX as isAsmParserOnly so they'll disappear from the disassembler table build without custom filtering code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201215 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-12 08:02:29 +00:00
NAKAMURA Takumi
ac27d7151c [CMake] Add dependencies to gtest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201079 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 11:27:41 +00:00
NAKAMURA Takumi
fdc6308fa1 [CMake] LLVMSupport should be responsible to provide system_libs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201077 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 10:52:19 +00:00
Craig Topper
ced2756280 Recommit r201059 and r201060 with hopefully a fix for its original failure.
Original commits messages:

Add MRMXr/MRMXm form to X86 for use by instructions which treat the 'reg' field of modrm byte as a don't care value. Will allow for simplification of disassembler code.

Simplify a bunch of code by removing the need for the x86 disassembler table builder to know about extended opcodes. The modrm forms are sufficient to convey the information.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201065 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 06:55:41 +00:00
Bob Wilson
70ff3e91f7 Revert r201059 and r201060.
r201059 appears to cause a crash in a bootstrapped build of clang. Craig
isn't available to look at it right now, so I'm reverting it while he
investigates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201064 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 05:28:30 +00:00
Craig Topper
a73f0e2d49 Simplify a bunch of code by removing the need for the x86 disassembler table builder to know about extended opcodes. The modrm forms are sufficient to convey the information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201060 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 01:58:12 +00:00
Craig Topper
d8fdb19a7f Add MRMXr/MRMXm form to X86 for use by instructions which treat the 'reg' field of modrm byte as a don't care value. Will allow for simplification of disassembler code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201059 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10 00:50:34 +00:00
NAKAMURA Takumi
4c56efbd44 Provide CMake package modules in install tree
Teach the Makefile build system to generate and install CMake modules
LLVMConfig.cmake and LLVMConfigVersion.cmake so that applications that
build with CMake can use 'find_package(LLVM)' even when LLVM is not
built with CMake.  These modules tell such applications about available
LLVM libraries and their dependencies.

Run llvm-config to generate the list of libraries and use the results of
llvm-build to generate the library dependencies.  Use sed to perform
substitutions in the LLVMConfig.cmake.in and LLVMConfigVersion.cmake.in
sources that our CMake build system uses.

Teach the Makefile build system to generate the LLVMExports.cmake file
with content similar to that produced by the CMake install(EXPORT)
command.  Extend llvm-build with an option to generate the library
dependencies fragment for this file.

Contributed by Brad King.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201053 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-09 16:37:02 +00:00
Craig Topper
a01427c15a Remove unnecessary include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201041 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-09 07:55:19 +00:00
Craig Topper
426497e2fb Remove some unnecessary code. The conditions it was checking had already been ruled out by the caller.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201039 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-09 07:13:41 +00:00
Nikola Smiljanic
40bb66bc3a Improve existing visualizers by:
- Properly displaying non null terminated StringRef.
- Auto expanding pointer types.
- Displaying real type names for PointerUnions.
- Using "size" and "capacity" across all containers.
- Simplifying code where possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201004 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-07 22:57:20 +00:00
Oliver Stannard
c8f5d43820 LLVM-1163: AAPCS-VFP violation when CPRC allocated to stack
According to the AAPCS, when a CPRC is allocated to the stack, all other
VFP registers should be marked as unavailable.

I have also modified the rules for allocating non-CPRCs to the stack, to make
it more explicit that all GPRs must be made unavailable. I cannot think of a
case where the old version would produce incorrect answers, so there is no test
for this.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200970 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-07 11:19:53 +00:00
Craig Topper
a4f328f68b Delete all of the CodeGenInstructions from CodeGenTarget destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200906 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-06 06:27:59 +00:00
Craig Topper
51dd765139 Shrink the size of CodeGenInstruction a little bit by using bitfields. 32 bools seemed excessive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200829 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 09:10:40 +00:00
Craig Topper
49d687d58f Get rid of a vector copy by just making a pointer out of the reference returned by getInstructionsByEnumValue instead of assigning it to a new vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200828 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:56:49 +00:00
Craig Topper
725d7946c7 Fix a vector that was passed by value instead of reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200827 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:27:49 +00:00
Craig Topper
7583b60306 Fix a doxygen comment referencing the wrong method name.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200825 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 07:21:07 +00:00
Craig Topper
3211c86b96 Add CheckChildInteger to ISelMatcher operations. Removes nearly 2000 bytes from X86 matcher table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200821 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-05 05:44:28 +00:00
NAKAMURA Takumi
3328a1dadc TableGen/X86RecognizableInstr.h: Prune out-of-date "@param isSSE". [-Wdocumentation]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200628 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-02 10:53:36 +00:00
Craig Topper
6b6dfa5c5a Merge x86 HasOpSizePrefix/HasOpSize16Prefix into a 2-bit OpSize field with 0 meaning no 0x66 prefix in any mode. Rename Opsize16->OpSize32 and OpSize->OpSize16. The classes now refer to their operand size rather than the mode in which they need a 0x66 prefix. Hopefully can merge REX_W into this as OpSize64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200626 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-02 09:25:09 +00:00
Craig Topper
3c53b6f1ec Simplify some code since VEX and EVEX instructions never have HasOpSizePrefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200625 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-02 07:46:05 +00:00
Craig Topper
1415ca1781 Merge HasVEXPrefix/HasEVEXPrefix/HasXOPPrefix into a 2-bit 'encoding' field in TSFlags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200624 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-02 07:08:01 +00:00
Craig Topper
f0b161d774 Separate x86 opcode maps and 0x66/0xf2/0xf3 prefixes from each other in the TSFlags. This greatly simplifies the switch statements in the disassembler tables and the code emitters.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200522 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31 08:47:06 +00:00
Craig Topper
45b8e5fa49 Move REP out of the Prefix field of the X86 format. Give it its own bit. It had special handling anyway and this enables a future patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200520 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-31 07:00:55 +00:00
Renato Golin
b68991fd87 Comment out unused macro because of warning
Modern compilers (Clang 3.4, GCC 4.8) warn on variadic macros being
introduced in C99, which produces a huge number of useless diagnostics
since this macro is unused in the whole project.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200479 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-30 18:55:47 +00:00
Craig Topper
28d965d300 Couple minor formatting fixes to the XXXGenDAGISel.inc files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200459 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-30 06:42:52 +00:00
Craig Topper
01a5c17219 Delete the Matchers stored in the SmallVectors in SwitchOpcodeMatcher/SwitchTypeMatcher.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200377 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-29 07:06:07 +00:00
David Woodhouse
4faa861f19 Propagate MCSubtargetInfo through TableGen's getBinaryCodeForInstr()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200349 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-28 23:13:18 +00:00
David Woodhouse
4396f5d9d2 Change MCStreamer EmitInstruction interface to take subtarget info
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200345 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-28 23:12:42 +00:00
Owen Anderson
6cccb32fb0 Use the proper SDK when building iOS sim builds of LLVM and/or Mac OS X builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200335 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-28 19:57:18 +00:00
Craig Topper
90790c3217 Improve handling of EnforceSmallerThan. Remove all types that are smaller from the larger set not just the smallest type from the smaller set. Ensure 'smaller' vectors have the same or fewer total bits. Similar for 'larger' vectors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200287 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-28 04:49:01 +00:00
Craig Topper
55604d9716 Don't use EnforceSmallerThan for EnforceVectorSubVectorTypeIs. EnforceSmallerThan doesn't handle vectors quite right and should really enforce that vectors have the same number of elements. Add explicit checks for vector element count differing in EnforceVectorSubVectorTypeIs instead. This removes some unnecessary type checks in X86GenDAGISel.inc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200091 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 17:40:33 +00:00
Craig Topper
858594edb0 Fix typo in commment tyep->type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200089 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 17:34:23 +00:00
Craig Topper
f6deb18968 Use isConcrete and getConcrete instead of using TypeVec directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200071 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 05:33:48 +00:00
Craig Topper
f5f44a149e Fix EnforceSmallerThan to check !hasVectorTypes on the other type instead of this type to force this type to be scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200070 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-25 05:17:38 +00:00
Craig Topper
82f50dc0c2 Remove TGValueTypes.cpp from CMakeLists.txt which I forgot to do in r200036.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200037 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-24 20:51:32 +00:00
Craig Topper
f3474549ba Replace tablegen uses of EVT with MVT. Add isOverloaded() to MVT to facilitate. Remove TGValueTypes.cpp since its unused now (and may have been before).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200036 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-24 20:50:47 +00:00
Alp Toker
ae43cab6ba Fix known typos
Sweep the codebase for common typos. Includes some changes to visible function
names that were misspelt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200018 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-24 17:20:08 +00:00
David Woodhouse
674140fc3e ]x86] Allow segment and address-size overrides for CMPS[BWLQ] (PR9385)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199806 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-22 15:08:36 +00:00
David Woodhouse
ccbfd5b18a [x86] Allow address-size overrides for STOS[BWLQ] (PR9385)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199804 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-22 15:08:21 +00:00
David Woodhouse
db9fa461d7 [x86] Allow segment and address-size overrides for LODS[BWLQ] (PR9385)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199803 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-22 15:08:08 +00:00
Craig Topper
8f74ea3fa1 Use ArrayRef to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199712 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-21 07:20:05 +00:00
David Woodhouse
9334b07527 [x86] Fix disassembly of MOV16ao16 et al.
The addition of IC_OPSIZE_ADSIZE in r198759 wasn't quite complete. It
also turns out to have been unnecessary. The disassembler handles the
AdSize prefix for itself, and doesn't care about the difference between
(e.g.) MOV8ao8 and MOB8ao8_16 definitions. So just let them coexist and
don't worry about it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199654 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-20 12:02:53 +00:00
Craig Topper
85026d9375 Allow x86 mov instructions to/from memory with absolute address to be encoded and disassembled with a segment override prefix. Fixes PR16962.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199364 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-16 07:36:58 +00:00
Kostya Serebryany
3846ce9490 replace LeakSanitizerIsTurnedOffForTheCurrentProcess with __lsan_is_turned_off, but this time hide it under __has_feature(address_sanitizer); also include <sanitizer/lsan_interface.h>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199303 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 07:59:37 +00:00
Craig Topper
38e6f7301d Simplify x86 disassembler table handling of when to use TYPE_Rv/TYPE_R16/TYPE_R32 now that HasOpSizePrefix only means 16-bit instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199295 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 05:02:02 +00:00
Joey Gouly
808054f81f Add the lld root to llvm-lit, so llvm-lit can be used
to run lld tests individually.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199264 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 22:52:24 +00:00
Lang Hames
5f33cbc414 Add FPExt option to CCValAssign::LocInfo. When generating calling-convention
promotion code, Tablegen will now select FPExt for floating point promotions
(previously it had returned AExt, which is not valid for floating point types).

Any out-of-tree targets that were relying on AExt being returned for FP
promotions will need to update their code check for FPExt instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199252 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 19:56:36 +00:00
Craig Topper
8e31bc35ec Remove stray comma in enum to satisfy -Wpedantic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199194 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 08:07:10 +00:00
Craig Topper
525ae45240 Separate the concept of 16-bit/32-bit operand size controlled by 0x66 prefix and the current mode from the concept of SSE instructions using 0x66 prefix as part of their encoding without being affected by the mode.
This should allow SSE instructions to be encoded correctly in 16-bit mode which r198586 probably broke.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199193 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 07:41:20 +00:00
Elena Demikhovsky
1f044d443d AVX-512: Embedded Rounding Control - encoding and printing
Changed intrinsics for vrcp14/vrcp28 vrsqrt14/vrsqrt28 - aligned with GCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199102 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-13 12:55:03 +00:00
Alp Toker
ca179f4de8 lit: Provide source locations in cfg files with older Python versions
This commit prospectively brings the benefits of r198766 to older supported
Python versions (2.5+).

Tested with Python 2.6, 2.7, 3.1 and 3.3 (!)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199009 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-11 14:34:18 +00:00
Alp Toker
4c28d2024f lit: execfile() isn't present in Python 3.3
On the other hand, exec(compile()) doesn't work in older Python versions in the
2.x series.

This commit introduces exec(compile()) with a fallback to plain exec(). That'll
hopefully hit the sweet spot in terms of version support.

Followup to r198766 which added enhanced source locations for lit cfg parsing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199006 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-11 13:27:28 +00:00
Roman Divacky
af43b47c5a Constant propagate MachineInstrClassName.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198969 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-10 22:59:49 +00:00
Rafael Espindola
dd86e54b61 All backends use MC now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198959 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-10 21:49:27 +00:00
NAKAMURA Takumi
f1a1e4a723 Sink add_llvm_library(gtest_main) to UnitTestMain/CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198933 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-10 11:02:26 +00:00
Kostya Serebryany
ab39685c77 reapply r198858: Disable LeakSanitizer in TableGen binaries, see PR18325; this time LeakSanitizerIsTurnedOffForTheCurrentProcess is used instead of __lsan_is_turned_off
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198922 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-10 08:05:42 +00:00
Alp Toker
d92ff21d6f Revert "Disable LeakSanitizer in TableGen binaries, see PR18325"
To declare or define reserved identifers is undefined behaviour in standard
C++. This needs to be addressed in compiler-rt before it can be used in LLVM.

See the list discussion for details.

This reverts commit r198858.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198884 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-09 19:40:55 +00:00
Kostya Serebryany
c50299bab6 Disable LeakSanitizer in TableGen binaries, see PR18325
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198858 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-09 09:26:26 +00:00
Alp Toker
598887906b lit: Provide file location in cfg error messages
Python doesn't do a good job at diagnosing string exec() so use execfile()
where available.

This should be a timesaver when trying to get to the bottom of build bot
failures.

Before:

    File "llvm/utils/lit/lit/TestingConfig.py", line 93, in load_from_path
      exec("exec data in cfg_globals")
    File "<string>", line 1, in <module>
    File "<string>", line 194, in <module>
  NameError: name 'typo' is not defined

After:

    File "llvm/utils/lit/lit/TestingConfig.py", line 95, in load_from_path
    execfile(path, cfg_globals)
    File "clang/test/lit.cfg", line 194, in <module>
      typo
      ^~~~
  NameError: name 'typo' is not defined

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198766 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-08 14:20:59 +00:00
David Woodhouse
aab59870a4 [x86] Fix MOV8ao8 et al for 16-bit mode, fix up disassembler to understand
It seems there is no separate instruction class for having AdSize *and*
OpSize bits set, which is required in order to disambiguate between all
these instructions. So add that to the disassembler.

Hm, perhaps we do need an AdSize16 bit after all?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198759 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-08 12:58:24 +00:00
Craig Topper
c8fd2c57c8 The rest of r198588. Remove SegOvrBits from X86 TSFlags since they weren't being used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198589 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-06 06:57:27 +00:00
Craig Topper
adb7d3b49b Use patterns to remove some duplicate instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198550 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-05 06:55:48 +00:00
Craig Topper
6a69266fed Fix encoding for PUSH64i16. Add In64BitMode Predicate. Remove disassembler hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198547 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-05 05:46:38 +00:00
Craig Topper
09104ff9df Remove no longer needed x86 disassembler hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198546 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-05 05:10:07 +00:00
Craig Topper
01cb7fa977 Mark x86 _alt instructions as AsmParserOnly so they will be omitted from disassembler without string matches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198545 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-05 04:55:55 +00:00
Craig Topper
2b5dc93948 Use new ForceDisassemble flag on the 2-byte forms of INC/DEC for 32-bit mode and remove disassmbler table emitter hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198544 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-05 04:32:42 +00:00
Craig Topper
527f132627 Add a new x86 specific instruction flag to force some isCodeGenOnly instructions to go through to the disassembler tables without resorting to string matches. Apply flag to all _REV instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198543 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-05 04:17:28 +00:00
Craig Topper
e43a0f8015 Mark the 64-bit x86 push/pop instructions as In64BitMode. Mark the corresponding 32-bit versions with the same encodings Not64BitMode. Remove hack from tablegen disassembler table emitter. Fix bad test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198530 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-05 01:35:51 +00:00