Commit Graph

785 Commits

Author SHA1 Message Date
Tim Northover 646ddb51d2 AArch64/ARM64: update Clang after AArch64 removal.
A few (mostly CodeGen) parts of Clang were tightly coupled to the
AArch64 backend. Now that it's gone, they will not even compile.

I've also deduplicated RUN lines in many of the AArch64 tests. This
might improve "make check-all" time noticably: some of those NEON
tests were monsters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209578 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-24 12:51:25 +00:00
Matt Arsenault 280421292f Update R600 datalayout
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@209464 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-22 18:33:55 +00:00
Joerg Sonnenberger 0d5bfdd4c1 Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind
instructions.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208719 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-13 18:58:36 +00:00
Craig Topper 603e37c3dd [C++11] Use 'nullptr'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208280 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-08 06:41:40 +00:00
Matheus Almeida b9ec38bf4e [mips] Pass nan2008 info to the back-end.
Summary: The initial support for NaN2008 was added to the back-end in r206396.

Reviewers: atanasyan

Reviewed By: atanasyan

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208220 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-07 16:16:07 +00:00
Saleem Abdulrasool 424e60d770 Target: fix wchar_t definition for Windows on ARM
Windows on ARM uses AAPCS, but has some deviations.  wchar_t remains an unsigned
short on WoA, which does not conform to AAPCS.  Ensure that wchar_t is defined
accordingly.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207929 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-04 01:56:04 +00:00
Benjamin Kramer 1c4c89db69 Add support for -march=bdver4.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207848 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 15:47:51 +00:00
Bradley Smith da66f3514c [ARM64/AArch64] Define the correct value for __ARM_NEON_FP
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207842 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 15:18:38 +00:00
Bradley Smith 32f676ea19 [ARM64/AArch64] Hook up CRC32 subtarget feature to the driver
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207841 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-02 15:17:51 +00:00
Richard Smith 7afba902f2 Bitrig now supports TLS, so enable TLS support when targeting it. Patch by Patrick Wildt!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207812 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-01 23:19:06 +00:00
Reid Kleckner 5324f83f54 LLVM supports TLS on Windows and we can use it from Clang
Patch by Martell Malone!

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207470 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-29 00:11:30 +00:00
Daniel Sanders 4ec7faa64f [mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()
Summary: The condition in the base class is rather strange. It says a target has the 128-bit integer type if the size of a pointer is >= 64-bits. N32 has 32-bit pointers but 64-bit integers. I'm a bit reluctant to change this for all targets so this patch makes the method virtual and overrides it for MIPS64.

Reviewers: atanasyan

Reviewed By: atanasyan

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207121 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-24 16:05:26 +00:00
Daniel Sanders 3cc798b463 [mips] Correct size_t and ptrdiff_t for N32.
Summary:
Correct size_t to be unsigned int and ptrdiff_t to be signed long. The types were the correct size before this change but
the exact type matters for name mangling and exception handling in C++.

Reviewers: atanasyan

Reviewed By: atanasyan

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207093 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-24 09:58:52 +00:00
James Molloy fa203ed5f9 [ARM64] Change inline assembly constraints to be more lax, to match the behaviour of Clang/AArch64 and GCC.
GCC allows sub-64bit values to use the 'r' register constraint.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206963 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-23 10:26:19 +00:00
Reid Kleckner 431fb79151 Try to fix bad Twine usage in r206791 with std::string
I'm pretty sure I was referencing destroyed temporaries here.  I'm open
to suggestions on how to write this better.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206804 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-21 22:29:45 +00:00
Reid Kleckner 392e01fa2b MinGW: Define __stdcall&co when -fms-extensions is disabled
This is for compatibility with GCC.

Reviewers: asl

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206791 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-21 20:58:00 +00:00
James Molloy b51f1270ac [ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more tests.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206463 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-17 12:51:28 +00:00
Reid Kleckner 964132fcbe Revert "Move -fms-extensions predefined macros into InitPreprocessor"
This reverts commit r206413.

This was proposed before, but it's not clear if this is really a good
idea:
http://reviews.llvm.org/D3034

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206415 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 20:10:16 +00:00
Reid Kleckner 0e680249cd Move -fms-extensions predefined macros into InitPreprocessor
If someone on Linux asks for -fms-extensions, there's no reason not to
define the feature test macros that MSVC defines.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206413 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 19:47:06 +00:00
James Molloy 75ed3f354f [ARM64] Allow the disabling of NEON and crypto instructions. Update tests to pass -target-feature +neon.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206394 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 15:33:48 +00:00
James Molloy 039ed6c7d5 [ARM64] Fix up predefines, including adding big endian support to Targets.cpp
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206390 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-16 15:06:20 +00:00
Richard Sandiford dfbde3b06f [SystemZ] Don't indent SystemZTargetInfo relative to its namespace
Whitespace only.  No functional change intended.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205960 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-10 09:56:24 +00:00
Saleem Abdulrasool a92b40825a Driver: add target definition for Windows on ARM
This introduces the definitions needed for the Windows on ARM target.  Add
target definitions for both the MSVC environment and the MSVC + Itanium C++ ABI
environment.  The Visual Studio definitions correspond to the definitions
provided by Visual Studio 2012.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205650 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-04 20:31:19 +00:00
Saleem Abdulrasool 2c137f4fcc Basic: rename VisualStudio to Windows
Visual Studio is the Integrated Development Environment.  The toolchain is
generally referred to MSVC.  Rename the target information to be more precise as
per the recommendation of Reid Kleckner.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205609 91177308-0d34-0410-b5e6-96231b3b80d8
2014-04-04 05:08:53 +00:00
Hal Finkel b23fde6184 [PowerPC] Make -pg generate calls to _mcount not mcount
At least on REL6 (Linux/glibc 2.12), the proper symbol for generating gprof
data is _mcount, not mcount. Prior to this change, compiling with -pg would
generate linking errors (because of unresolved references to mcount), after
this change -pg seems at least minimally functional.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205144 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-30 13:00:06 +00:00
Tim Northover 7e0e8ef787 ARM64: initial clang support commit.
This adds Clang support for the ARM64 backend. There are definitely
still some rough edges, so please bring up any issues you see with
this patch.

As with the LLVM commit though, we think it'll be more useful for
merging with AArch64 from within the tree.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205100 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-29 15:09:45 +00:00
Christian Pirker 37a9afe9eb Add ARM big endian Target (armeb, thumbeb)
Reviewed at http://llvm-reviews.chandlerc.com/D3096



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205008 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-28 14:40:46 +00:00
Saleem Abdulrasool 1e57f17deb Use the new Windows environment for target detection
This follows the LLVM change to canonicalise the Windows target triple
spellings.  Rather than treating each Windows environment as a single entity,
the environments are now modelled properly as an environment.  This is a
mechanical change to convert the triple use to reflect that change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204978 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-27 22:50:18 +00:00
Joerg Sonnenberger 404ae9f8b2 From Matt Thomas: use long long for [u]int64_t and [u]intmax_t on
NetBSD/aarch64 to simplify code sharing with NetBSD/arm.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204798 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-26 11:48:29 +00:00
Will Schmidt d267772224 [PPC64LE] Add a CALL_ELF macro to indicate use of the ELFv2 ABI.
Additional clarification from Uli for the background on _CALL_ELF:
"Historically GCC has provided various _CALL_... predefines depending on the
ABI currently being compiled for. (_CALL_SYSV,_CALL_AIXDESC, _CALL_DARWIN )
When we needed a new define for the current ABI, we decided on using _CALL_ELF
since the official name of the ABI is the OpenPower ElfV2 ABI, with the
current Linux ABI retro-actively being renamed the ELFv1 ABI
and so we decided on using _CALL_ELF to identify the Linux (+BSD etc.) ELF ABI,
with _CALL_ELF=1 for the v1 ABI and _CALL_ELF=2 for the v2 ABI.
(Note that this matches the gcc compiler switch -mabi=elfv1 vs. -mabi=elfv2)."

In code, a (_CALL_ELF==2) check will indicate when the ELFv2 ABI is
to be used.   This is the desired default for the PPC64 LE target.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204627 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-24 17:27:03 +00:00
Will Schmidt 3022c28a0a Update DataLayout/DescriptionString for ppc64le
Update DataLayout/DescriptionString for ppc64le

Similar LLVM change made in r203664

Testcase included.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204613 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-24 15:48:02 +00:00
Christian Pirker cfd0a0cc01 AArch64_BE test case for predefined macros
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204604 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-24 13:57:21 +00:00
Craig Topper e611caa9f2 De-virtualize a method since it doesn't override anything and isn't overridden itself.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203538 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-11 04:07:52 +00:00
Craig Topper 0b436eb03b [C++11] Add 'override' keyword to virtual methods that override their base class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203537 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-11 03:39:26 +00:00
Robert Lytton f58bc2e3c5 Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacros
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203455 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-10 12:06:29 +00:00
Ahmed Charles f8b74ee5f0 [C++11] Replace OwningPtr include with <memory>.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203389 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-09 11:36:40 +00:00
Ahmed Charles 70639e8de3 Replace OwningPtr with std::unique_ptr.
This compiles cleanly with lldb/lld/clang-tools-extra/llvm.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203279 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 20:03:18 +00:00
Ahmed Charles 789a4f820d Change OwningPtr::take() to OwningPtr::release().
This is a precursor to moving to std::unique_ptr.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203275 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-07 19:33:25 +00:00
Saleem Abdulrasool b12c514753 Update for LLVM API change
Use the new getObjectFormat/setObjectFormat instead of Environment now that the
file format is a separate field.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@203161 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-06 20:47:19 +00:00
Hal Finkel 2052d938aa Add a PPC inline asm constraint type for single CR bits
This adds support for the PPC "wc" inline asm constraint (used for allocating
individual CR bits). Support for this constraint type was recently added to the
LLVM PowerPC backend. Although gcc does not currently support allocating
individual CR bits, this identifier choice has been coordinated with the gcc
PowerPC team, and will be marked as reserved for this purpose in the gcc
constraints.md file.

Prior to this change, none of the multi-character PPC constraints were handled
correctly (the '^' escape character was not being added as required by the
parsing code in LLVM). This should now be fixed. I'll add tests for these other
constraints as support is added for them in the backend.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202658 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-02 18:24:18 +00:00
Roman Divacky 016c30178d Give sparcv9 the ability to set the target cpu. Change it from accepting
-march which doesnt exist on sparc gcc to -mcpu. While here adjust a
few tests to not write an unused temporary file.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202177 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25 18:35:30 +00:00
Christian Pirker ee2e36b515 Add AArch64 big endian Target (aarch64_be)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202151 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-25 13:51:00 +00:00
Kevin Qin 491dd1c4d1 [AArch64] Change int64_t from 'long long int' to 'long int' for AArch64 target.
Most 64-bit targets define int64_t as long int, and AArch64 should
make same definition to follow LP64 model. In GNU tool chain, int64_t
is defined as long int for 64-bit target. So to get consistent with GNU,
it's better Changing int64_t from 'long long int' to 'long int',
otherwise clang will get different name mangling suffix compared with g++.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202004 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-24 02:45:03 +00:00
Daniel Sanders 3734ce4c7e [mips] Make it impossible to have UnknownABI in CodeGen and Integrated Assembler.
Summary:
This removes the need to coerce UnknownABI to the default ABI (O32 for
MIPS32, N64 for MIPS64 [*]) in both MipsSubtarget and MipsAsmParser.

Clang has been updated to disable both possible default ABI's before enabling
the ABI it intends to use.

[*] N64 being the default for MIPS64 is not actually correct.
    However N32 is not fully implemented/tested yet.

Depends on: D2830

Reviewers: jacksprat, matheusalmeida

Reviewed By: matheusalmeida

Differential Revision: http://llvm-reviews.chandlerc.com/D2832
Differential Revision: http://llvm-reviews.chandlerc.com/D2846



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@201792 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-20 14:58:19 +00:00
Tim Northover 0a3d47628a ARM: implement support for crypto intrinsics in arm_neon.h
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200708 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-03 17:28:04 +00:00
Joerg Sonnenberger 313170ade2 NetBSD uses signed wchar_t on AArch64. It also wants __LITTLE_ENDIAN__ /
__BIG_ENDIAN__ as on other architectures.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200655 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-02 21:55:10 +00:00
Tim Northover 5b6a99b6b1 ARM & AArch64: share the BI__builtin_neon enum defs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200470 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-30 14:47:51 +00:00
Jakob Stoklund Olesen 507d1f4161 SPARCv9 supports atomic operations up to 64 bits.
Patch by Roman Divacky!

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200452 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-30 04:48:04 +00:00
Artyom Skrobov 08914eb678 Cortex-M3 and Cortex-M4 should not enable hwdiv-arm (committing again, with an updated test)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200385 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-29 09:43:07 +00:00
Reid Kleckner 7329748185 Revert "Cortex-M3 and Cortex-M4 should not enable hwdiv-arm"
This reverts commit r200233.

The test required a registered ARM target, it was testing LLVM's
generated assembly, and it should have been an IRGen test.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200242 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-27 19:26:39 +00:00