Commit Graph

785 Commits

Author SHA1 Message Date
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
Rafael Espindola 9a42fed3d0 Clang DataLayout string cleanup: don't print the FP defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197422 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 20:34:33 +00:00
Rafael Espindola 0c22b1feed Clang DataLayout string cleanup: don't print the integer defaults.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197421 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-16 20:21:07 +00:00
Rafael Espindola 88a4f5457d Delete dead code.
This is always overwritten by the one in NaClTargetInfo.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197346 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-15 17:21:28 +00:00
Rafael Espindola c614b2d1a9 Delete dead code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197270 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-13 20:27:54 +00:00
Rafael Espindola f20b43f409 Use a: and s: instead of a0: and s0: in the DataLayout strings.
They are equivalent and the size of 'a' and 's' is unused.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197256 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-13 18:40:15 +00:00
Tim Northover 009ba3be47 ARM: teach Sema that "r" can match 64-bit values
We already support using "r" on 64-bit values (a GPRPair is
allocated), but Sema doesn't know this yet so issues a warning. This
should fix it.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196724 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-08 15:24:55 +00:00
Ana Pazos 69a9e166e0 Added support for mcpu krait
- krait processor currently modeled with the same features as A9.
- Krait processor additionally has VFP4 (fused multiply add/sub)
and hardware division features enabled.
- krait has currently the same Schedule model as A9
- krait cpu flag is not recognized by the GNU assembler yet,
it is replaced with march=armv7-a to avoid a lower march
from being used.




git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196618 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-06 22:43:17 +00:00
Joerg Sonnenberger 870edad757 Assume ARMv6 for NetBSD for now for strex/ldrex.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196115 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 16:12:05 +00:00
Joerg Sonnenberger bc7d524034 NetBSD uses long derived size_t / ssize_t in all ARM ABIs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196114 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-02 16:09:34 +00:00
Joerg Sonnenberger 4adac373de NetBSD uses signed wchar_t on ARM platforms.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195970 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-30 00:38:16 +00:00
Richard Barton 4e74fdcd05 Add support for Cortex-A12.
Patch by Oliver Stannard!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195449 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-22 11:53:28 +00:00
Tim Northover 4e42f6ad34 ARM: define & use __ARM_NEON on ARM32 (as per ACLE)
There seem to be quite a few references to the old macro __ARM_NEON__ on the
internet, so I don't think it's a good idea to remove it entirely (at least
yet), but the canonical name does not have the trailing underscores so we
should use that ourselves.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195353 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-21 12:36:34 +00:00
Jim Grosbach 5f96d3cbdd ARM: embedded v7 'darwin' doesn't get min-version defines.
Make sure armv7 doesn't get the iOS deployment version definitions when
it's being used for non-iOS.

rdar://15497681

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195149 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 20:18:39 +00:00
Jiangning Liu 769187a95a Clean up predefined macros for AArch64 to follow ACLE 2.0.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@195068 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-19 01:33:17 +00:00
Tom Stellard 0de6bc8ea3 R600: Add processor type for Hawaii
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194751 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-14 23:45:53 +00:00
Daniel Sanders 838f9337a1 [mips][msa] Enable inlinse assembly for MSA.
Like GCC, this re-uses the 'f' constraint and a new 'w' print-modifier:
  asm ("ldi.w %w0, 1", "=f"(result));

Unlike GCC, the 'w' print-modifer is not _required_ to produce the intended
output. This is a consequence of differences in the internal handling of
the registers in each compiler. To be source-compatible between the
compilers, users must use the 'w' print-modifier.

MSA registers (including control registers) are supported in clobber lists.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194476 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 12:56:01 +00:00
Robert Lytton 1816219b01 XCore target Type defines.
Change SizeType, PtrDiffType, IntPtrType, WCharType, WIntType
to follow the XMOS llvm-gcc front end's settings.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194461 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-12 10:09:30 +00:00
Akira Hatanaka dda91e0c4b [mips] Partially revert r193640. Stack alignment should not be determined by
the floating point register mode.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194426 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-11 22:10:46 +00:00
Tim Northover 9b79630004 Darwin(ish): we don't want __ARM_EABI__ even on v7a embedded targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194408 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-11 19:11:22 +00:00
Joerg Sonnenberger 8daa7fe574 NetBSD 6.99.26 switched to default rounding mode, so adjust
__FLT_EVAL_METHOD__ accordingly. Add test case for this and the SSE2
variances on NetBSD.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194377 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-11 14:00:37 +00:00
Benjamin Kramer a2420960fd Driver: Add support for -march=bdver3 on x86.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193985 91177308-0d34-0410-b5e6-96231b3b80d8
2013-11-04 10:29:51 +00:00
Amara Emerson 3bb1b5c953 [AArch64] Add some CPU targets for "generic", A-53 and A-57.
Enables the clang driver to begin targeting specific CPUs. Introduced a
"generic" CPU which will ensure that the optional FP feature is enabled
by default when it gets to LLVM, without needing any extra arguments.
Cortex-A53 and A-57 are also introduced with tests, although backend
handling of them does not yet exist.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193740 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-31 09:32:33 +00:00
Akira Hatanaka 2669986562 [mips] Delete unused functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193674 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-30 02:38:17 +00:00
Akira Hatanaka 550ed2077e [mips] Align the stack to 16-bytes for -mfp64.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193640 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 19:00:35 +00:00
Akira Hatanaka 4d1c2364d6 [mips] Move setDescriptionString to base class MipsTargetInfoBase and call it
at the end of handleTargetFeatures.

No intended functionality change.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193636 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 18:30:33 +00:00
Tom Stellard 423170442b R600: Add Sea Islands GPUs
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193622 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 16:38:29 +00:00
Bernard Ogden 909f35a884 ARM: Add -m[no-]crc to dis/enable CRC subtargetfeature from clang
Allow users to disable or enable CRC subtarget feature.

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193600 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-29 09:47:51 +00:00
Bernard Ogden f779e65390 Add driver support for FP, SIMD and crypto defaults.
Although we wire up a bit for v8fp for macro setting
purposes, we don't set a macro yet. Need to ask list
about that.

Change-Id: Ic9819593ce00882fbec72757ffccc6f0b18160a0

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193367 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-24 18:32:51 +00:00
Bernard Ogden 51f997dfc0 Clean up char/numeric comparisons in ARM getTargetDefines
Change-Id: Ie07228411b68252adcd5cf80b27ccd2eb3b031d9

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193366 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-24 18:32:44 +00:00
Bernard Ogden c427249cb7 Teach clang driver about Cortex-A53 and Cortex-A57.
Adds some Cortex-A53 strings where they were missing before.
Cortex-A57 is entirely new to clang.

Doesn't touch code only used by Darwin, in consequence of which
one of the A53 lines has been removed.

Change-Id: I5edb58f6eae93947334787e26a8772c736de6483

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193364 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-24 18:32:36 +00:00
Tim Northover 66b5dac8b7 ARM-Darwin: Use the *-*-darwin-eabi triple for v6m & v7m archs
These arch arguments are used for embedded targets (obviously) which need a
different calling convention to iOS.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193328 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-24 10:48:50 +00:00
Silviu Baranga c6c9cf4b18 Set the default hardware division features for ARM cpus. Also set it as default for A32 armv8.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193075 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-21 10:59:33 +00:00
Silviu Baranga 1db2e27911 Add the __ARM_ARCH_EXT_IDIV__ predefine. It is set to 1 if we have hardware divide in the mode that we are compiling in (depending on the target features), not defined if we don't. Should be compatible with the GCC conterpart. Also adding a -hwdiv option to overide the default behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193074 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-21 10:54:53 +00:00
Simon Atanasyan ddb2ad21d2 [Mips] Define __mips_fpr and _MIPS_FPSET macros.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192969 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-18 13:13:53 +00:00
Eric Christopher 3d11cedeb5 Rename HandleTargetFeatures->handleTargetFeatures to match
everything else in the class.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192851 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16 21:26:26 +00:00
Eric Christopher 165432092b Add preprocessor support for powerpc vsx.
The test should be expanded upon for more powerpc checking.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192849 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16 21:19:26 +00:00
Eric Christopher f217400fd5 Fix comments.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192847 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16 21:19:19 +00:00
Yunzhong Gao 15dbacc7cb Enabling 3DNow! prefetch instruction support for a few AMD processors in the
clang front end. This change will allow the __PRFCHW__ macro to be set on these
processors and hence include prfchwintrin.h in x86intrin.h header. Support for
the intrinsic itself seems to have already been added in r178041.

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



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192829 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-16 19:07:02 +00:00
Nick Lewycky af94546359 Add support for -mcx16, and predefine __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 when
it is enabled. Also enable it on the same architectures that GCC does.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@192045 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-05 20:14:27 +00:00
Weiming Zhao 8712ded79d Fix PR 12730: Add _GCC_HAVE_SYNC_COMPARE_AND_SWAP macros for ARM
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191707 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 22:51:32 +00:00
Ed Schouten 5ada7a5e97 Add character set related __STDC_* definitions.
Clang uses UTF-16 and UTF-32 for its char16_t's and char32_t's
exclusively. This means that we can define __STDC_UTF_16__ and
__STDC_UTF_32__ unconditionally.

While there, define __STDC_MB_MIGHT_NEQ_WC__ for FreeBSD. FreeBSD's
wchar_t's don't encode characters as ISO-10646; the encoding depends on
the locale used. Because the character set used might not be a superset
of ASCII, we must define __STDC_MB_MIGHT_NEQ_WC__.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191631 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-29 07:54:52 +00:00
Yunzhong Gao a8f7d9dd92 Adding -mtbm and -mno-tbm command line options to the clang front end for the
x86 TBM instruction set. Also adding a __TBM__ macro if the TBM feature is
enabled. Otherwise there should be no functionality change to existing features.

Phabricator code review is located here: http://llvm-reviews.chandlerc.com/D1693



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191326 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 19:00:58 +00:00
Simon Atanasyan fc12c4aa20 [Mips] Support -mnan=2008 option. Define "__mips_nan2008" macros and pass
this option to the assembler.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191282 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-24 09:09:16 +00:00
Petar Jovanovic bbac9aacc4 [Mips] Allocate NaClTargetInfo for MIPSEL NaCl
A patch to AllocateTarget function to recognize llvm::Triple::NaCl for
MIPSEL and return NaClTargetInfo. Additional test has been added to check
if the expected macros get defined.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@191124 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-21 01:27:01 +00:00
Ben Langmuir b83f5a7733 Add C intrinsics for Intel SHA Extensions
Intrinsics added shaintrin.h, which is included from x86intrin.h if __SHA__ is
enabled. SHA implies SSE2, which is needed for the __m128i type.

Also add the -msha/-mno-sha option.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190999 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 13:22:04 +00:00
Craig Topper b22352e7c4 Use curly braces all the way through long if/else chain for consistency and readability.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190982 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 01:13:07 +00:00
Craig Topper a6cbc27012 Disabling sse2 should disable aes and pclmul support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190977 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 00:01:05 +00:00
Joey Gouly 520ec1e553 [ARMv8] Add builtins for CRC instructions.
Patch by Bradley Smith!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190931 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-18 10:07:09 +00:00
Craig Topper 85bfef69f9 Push contents of X86TargetInfo::setFeatureEnabled down to a static function called by the virtual version and all the places in getDefaultFeatures. This way getDefaultFeatures doesn't make so many virtual calls.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190847 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 04:51:29 +00:00
Craig Topper 319d81f235 Mark setSSELevel/setMMXLevel/setXOPLevel as static since they don't access anything in the class.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190846 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-17 04:12:55 +00:00
Amara Emerson 2440fb1f91 Add error checking to reject neon_vector_type attribute on targets without NEON.
Patch by Artyom Skrobov.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190801 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 18:07:35 +00:00
Craig Topper 84f007b173 Make F16C feature imply AVX. Matches GCC behavior.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190776 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-16 04:54:13 +00:00
Cameron Esfahani 57b1da1588 Clean up some Triple usage in clang.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190737 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-14 01:09:11 +00:00
Preston Gurd c57ea68783 Update Atom Silvermont (SLM) support by adding enabled features.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190718 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 19:27:17 +00:00
Renato Golin 5df4045db5 Add more Cortex CPUs and tests
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190703 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 17:02:54 +00:00
Renato Golin 1302f9fec0 Fix Neon detection for Cortex-A class, plus adds some more CPUs to default features
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190702 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 17:02:45 +00:00
David Tweed 1eef85246b Certain multi-platform languages, such as OpenCL, have the concept of
address spaces which is both (1) a "semantic" concept and
(2) possibly a hardware level restriction. It is desirable to
be able to discard/merge the LLVM-level address spaces on arguments for which
there is no difference to the current backend while keeping
track of the semantic address spaces in a funciton prototype. To do this
enable addition of the address space into the name-mangling process. Add
some tests to document this behaviour against inadvertent changes.

Patch by Michele Scandale!


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190684 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 12:04:22 +00:00
Craig Topper 56bed97d75 Fix a bug where -msse followed by -mno-sse would leave MMX enabled.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190496 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-11 06:48:53 +00:00
Alexey Samsonov 3f46e6f459 Delete unused static class members
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190394 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10 09:26:48 +00:00
Craig Topper 89a5e796be Separate popcnt and sse4.2 feature control somewhat to match gcc behavior.
Enabling sse4.2 will implicitly enable popcnt unless popcnt is explicitly disabled.
Disabling sse4.2 will not disable popcnt if popcnt is explicitly enabled.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190387 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-10 06:55:47 +00:00
Sylvestre Ledru deb77991a2 Fix the profile of the function (fix commit 190048)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@190051 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-05 13:58:07 +00:00