Commit Graph

760 Commits

Author SHA1 Message Date
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
Artyom Skrobov 6afe5af1e7 Cortex-M3 and Cortex-M4 should not enable hwdiv-arm
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200233 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-27 18:44:25 +00:00
Robert Lytton 1bbd3da4d8 XCore target exception handling
Implement __builtin_eh_return_data_regno()

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200231 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-27 17:56:25 +00:00
Simon Atanasyan c7b54815e7 [Mips] Fix __mips macro definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200223 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-27 13:59:11 +00:00
Simon Atanasyan ad62472289 [Mips] Change default CPU for MIPS 32/64 targets. Now they are mips32r2/mips64r2 respectively.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200222 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-27 13:59:04 +00:00
Evan Cheng fe67d5ee3e Fix r195149. Triple should correctly reflect that target. If it contains ios,
e.g. thumbv7m-apple-ios3.0.0-eabi, then it should mean it's an iOS target. For
embedded targets, the OS should be unknown, e.g. thumbv7m-apple-unknown-macho.
Since Tim has recently fixed the triple, r195149 is no longer needed.
rdar://15911035


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200164 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 23:12:43 +00:00
Joerg Sonnenberger 51a64a8804 Use canonical spelling of NetBSD
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@200157 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-26 20:02:03 +00:00
Weiming Zhao 9c4750c1e5 PR18465: [Thumbv8] add predefined macros
currently, for thumbv8, two predefined macros are missing:
 define __THUMB_INTERWORK__ 1
 define __THUMB_INTERWORK__ 1

This patch adds them for thumbv8.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199819 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-22 18:42:13 +00:00
Bradley Smith f35eeda5f4 [ARM] Add ACLE enum/wchar size predefines
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199642 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-20 10:52:00 +00:00
Jakob Stoklund Olesen 95f1f55a0a SPARCv9 implements long double as an IEEE quad.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199399 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-16 16:43:19 +00:00
Tim Northover 6bd37ee37a MachO: use *-*-*-macho for MachO embedded targets.
Previously we had bodged together some hacks mapping MachO embedded
targets (i.e. mainly ARM v6M and v7M) to the "*-*-darwin-eabi" triple.
This is incorrect in both details (they don't run Darwin and they're
not EABI in any real sense).

This commit appropriates the existing "MachO" environment for the
purpose instead.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199367 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-16 08:48:16 +00:00
Bob Wilson f8c5e995cf Remove support for armv7f slice. <rdar://problem/12478440>
This was never used for anything so we should just get rid of it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199336 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 21:43:40 +00:00
Jan Wen Voung bb0ec7ba42 Ensure i686-nacl long long is aligned 8 bytes (like malign-double)
Set NaCl OSTargetInfo to have LongLongAlign = 64. Otherwise, it will
pick up the setting of 32 from X86_32TargetInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199335 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-15 21:42:41 +00:00
Hans Wennborg 11b1b8ab36 Remove the -cxx-abi command-line flag.
This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples,
Itanium otherwise. It's no longer possible to do weird combinations.

To be able to run a test with a specific ABI without constraining it to a
specific triple, new substitutions are added to lit: %itanium_abi_triple and
%ms_abi_triple can be used to get the current target triple adjusted to the
desired ABI. For example, if the test suite is running with the i686-pc-win32
target, %itanium_abi_triple will expand to i686-pc-mingw32.

Differential Revision: http://llvm-reviews.chandlerc.com/D2545

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199250 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-14 19:35:09 +00:00
Joerg Sonnenberger dd99856132 Hook up NetBSD/aarch64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199124 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-13 18:25:15 +00:00
Rafael Espindola b445db3b20 Use 'w' instead of 'c' to represent the win32 mangling.
This change was requested to avoid confusion if we ever support non windows
coff systems.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198939 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-10 13:42:17 +00:00
Rafael Espindola 4d5e0575d4 Update for llvm's DataLayout including mangling information.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198439 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-03 19:22:05 +00:00
Rafael Espindola b88a33ac1d Reformat the description strings. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198430 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-03 18:13:17 +00:00
Rafael Espindola 65f5b90a5b Remove the now unused 's' specifications.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198308 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-02 14:06:59 +00:00
Rafael Espindola 073024ca09 Pass the aapcs and apcs features down to llvm.
No functionality change, but unblocks asserting that llvm's and clang's
datalayout strings are the same.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@198306 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-02 13:57:18 +00:00
Rafael Espindola a8aedbca8a Small simplification: p0 is the same as p.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197700 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 16:54:10 +00:00
Matt Arsenault 11193103c7 Update SI datalayout for 32-bit private pointers
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197660 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 05:33:14 +00:00
Rafael Espindola 73b8843fa2 On spacv8 f128 is only aligned to 64 bits.
LLVM already got this right.

Found on "Figure 3-1: Scalar Types" on http://sparc.com/standards/psABI3rd.pdf.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197651 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-19 03:03:04 +00:00
Rafael Espindola 264ee6dc5c Fix the DataLayout string produced by clang for NaCl.
Reviewed by Derek Schuff.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197628 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 23:41:04 +00:00
Rafael Espindola 6d27724d5a Make setABIAPCS and setABIAAPCS easier to reason about.
These functions now always set the same variables in the same order and they
don't overlap with thep constructor.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197604 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 20:24:51 +00:00
Rafael Espindola 42a5145a4f Split setABI in two helpers. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197603 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 19:47:32 +00:00