Commit Graph

746 Commits

Author SHA1 Message Date
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
Rafael Espindola 24215ff299 Add -f64:32:64 to the darwin ppc32 DataLayout.
A f64 inside a struct can be 32 bit aligned on darwin.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197577 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 15:16:50 +00:00
Rafael Espindola 668221f79f Print the 'p' specification before the 'i' specification.
No functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197548 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-18 04:14:53 +00:00
Rafael Espindola a11a957a03 Add a 's' specifications to AArch64.
This has no functionality change as clang adds explicit alignment info for
byval arguments. The only difference is that now the clang produced
DataLayout string for AArch64 is identical to the LLVM produced one.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197538 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 23:30:58 +00:00
Rafael Espindola 35acee10f8 Remove -f128:128 from the DataLayout strings. It is the default.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197504 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 16:07:35 +00:00
Rafael Espindola 129d23376f The PS3 is a ppc64 and has 64 bit registers. Update DataLayout accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197502 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 15:40:00 +00:00
Rafael Espindola cd85af2841 Remove -f16:16:32 from the XCore DataLayout string.
This makes it identical to the string llvm produces.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197500 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 14:34:42 +00:00
Rafael Espindola 8a95424dac Reorder these DataLayout entries to match the order LLVM uses.
This completes the cleanup/refactoring of DataLayout on the clang side. Next
is figuring out the differences between the llvm and clang produced strings

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197442 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-17 00:04:48 +00:00
Rafael Espindola 2bd61e7052 The preferred alignment defaults to the ABI one. Omit it if it is the same.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197440 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 23:27:41 +00:00
Rafael Espindola d07586a8c3 Remove another default I missed before.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197437 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 23:03:23 +00:00
Rafael Espindola db087c6586 Clang DataLayout string cleanup: don't print other defaults.
I missed these in previous commits.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197435 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 22:50:41 +00:00
Rafael Espindola 2c39dcb2e1 Remove dead data.
The f80:128:128 was followed by a f80:32:32 and so never used. Looks like this
was there since r91746.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197433 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 22:15:35 +00:00
Rafael Espindola 250e083e60 Clang DataLayout string cleanup: don't print the pointer defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197430 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 21:59:14 +00:00
Rafael Espindola ffe22cd8f5 Clang DataLayout string cleanup: don't print the aggregate defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197429 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 21:51:30 +00:00
Rafael Espindola 8bf0d165c3 Clang DataLayout string cleanup: don't print the vector defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197427 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 21:38:22 +00:00