Commit Graph

800 Commits

Author SHA1 Message Date
Saleem Abdulrasool d1ee08e7cd Basic: whitespace cleanup
Remove unnecessary separation of anonymous namespace.  NFC.

llvm-svn: 211990
2014-06-28 23:34:07 +00:00
Simon Atanasyan 98ba8a657d [Driver][Mips] Fix else-after-return.
No functional changes.

llvm-svn: 211984
2014-06-28 15:56:08 +00:00
Simon Atanasyan 755d7f9c28 [Driver][Mips] Remove redundant brackets.
No functional changes.

llvm-svn: 211983
2014-06-28 15:56:03 +00:00
Simon Atanasyan 9601e6bfaa [Driver][Mips] Remove redundant abstract/override function.
No functional changes.

llvm-svn: 211982
2014-06-28 15:55:55 +00:00
Yi Kong a44c4d7173 Introduce arm_acle.h supporting existing LLVM builtin intrinsics
Summary: This patch introduces ACLE header file, implementing extensions that can be directly mapped to existing Clang intrinsics. It implements for both AArch32 and AArch64.

Reviewers: t.p.northover, compnerd, rengolin

Reviewed By: compnerd, rengolin

Subscribers: rnk, echristo, compnerd, aemerson, mroth, cfe-commits

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

llvm-svn: 211962
2014-06-27 21:25:42 +00:00
Jim Grosbach be83cb8c96 ARM: Correctly identify cortex-m4 as v7em.
Get the predefined macro for the architecture correct.
cortex-m4: __ARM_ARCH_7EM__
cortex-m3: __ARM_ARCH_7M__
cortex-m0: __ARM_ARCH_6M__

rdar://17420090

llvm-svn: 211792
2014-06-26 17:24:16 +00:00
Will Schmidt f048751912 Add ppc64/power8 as a target
llvm-svn: 211778
2014-06-26 13:34:10 +00:00
Matt Arsenault 56f008d538 Add R600 builtin codegen.
llvm-svn: 211631
2014-06-24 20:45:01 +00:00
Saleem Abdulrasool 9d45e77dca Driver: enhance MSC version compatibility
The version information for Visual Studio is spread over multiple variables.
The newer Windows SDK has started making use of some of the extended versioning
variables that were previously undefined.  Enhance our compatibility definitions
for these cases.

_MSC_VER is defined to be the Major * 100 + Minor.  _MSC_FULL_VER is defined to
be Major * 10000000 + Minor * 100000 + Build.  And _MSC_BUILD is the build
revision of the compiler.

Extend the -fmsc-version option in a compatible manner.  If the value is the
previous form of MMmm, then we assume that the build number is 0.  Otherwise, a
specific build number may be passed by using the form MMmmbbbbb.  Due to
bitwidth limitations of the option, it is currently not possible to define a
revision value.

The version information can be passed as either the decimal encoded value
(_MSC_FULL_VER or _MSC_VER) or as a dot-delimited value.

The change to the TextDiagnostic is to deal with the updated encoding of the
version information.

llvm-svn: 211420
2014-06-20 22:58:35 +00:00
Saleem Abdulrasool 0e3258cea8 Preprocessor: improve ACLE 6.4.1, 6.4.2 support
This improves conformance with ACLE 6.4.1.  Define additional macros that
indicate support for the ARM and Thumb instruction set architecture.  This
includes the following set of macros:

  __ARM_ARCH
  __ARM_ARCH_ISA_ARM
  __ARM_ARCH_ISA_THUMB
  __ARM_32BIT_STATE

These help identify the environment that the code is intended to execute on.

Adjust the handling for ACLE 6.4.2 to be more correct.  We would define the
profile as a free-standing token rather than a quoted single character.

llvm-svn: 210991
2014-06-15 18:35:07 +00:00
Kevin Qin afd8847189 [AArch64] Add default features for CPUs on AArch64 target.
For ARM target, we can use CRYPTO and CRC features if we select
cortex-a57 by '-mcpu', but for AArch64 target, it doesn't work
unless adding with '-mfpu=crypto-neon-fp-armv8'. To keep consistency
between front-end and back-end and get end-users more easier to use,
we'd better add default feature for CPUs on AArch64 target as well.

llvm-svn: 210625
2014-06-11 01:42:16 +00:00
Alp Toker 4925ba7ffe StringRefize TargetInfo::getABI()
llvm-svn: 210402
2014-06-07 23:30:42 +00:00
Matheus Almeida b84b37d606 [mips] Add macros _MIPS_ISA and __mips_isa_rev (same expansion as defined by GCC).
Summary: The Linux Kernel is one example of a piece of software that relies on them.

Reviewers: atanasyan

Reviewed By: atanasyan

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

llvm-svn: 210270
2014-06-05 14:59:18 +00:00
Tim Northover 2a0783db23 AArch64: combine arm64 & aarch64 cases in switch
There shouldn't be any difference in behaviour here, at least not in
any configurations people care about and possibly not in any reachable
configurations.

llvm-svn: 209899
2014-05-30 14:14:07 +00:00
Tim Northover 573cbee543 AArch64/ARM64: rename ARM64 components to AArch64
This keeps Clang consistent with backend naming conventions.

llvm-svn: 209579
2014-05-24 12:52:07 +00:00
Tim Northover 25e8a6754e 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.

llvm-svn: 209578
2014-05-24 12:51:25 +00:00
Matt Arsenault 23e7b084b4 Update R600 datalayout
llvm-svn: 209464
2014-05-22 18:33:55 +00:00
Joerg Sonnenberger cc1edb5a45 Add __ARM_DWARF_EH__ to signify the use of Itanium ABI for unwind
instructions.

llvm-svn: 208719
2014-05-13 18:58:36 +00:00
Craig Topper f1186c5a8f [C++11] Use 'nullptr'.
llvm-svn: 208280
2014-05-08 06:41:40 +00:00
Matheus Almeida 602bff3184 [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

llvm-svn: 208220
2014-05-07 16:16:07 +00:00
Saleem Abdulrasool 6323a2d63c 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.

llvm-svn: 207929
2014-05-04 01:56:04 +00:00
Benjamin Kramer 56c582279b Add support for -march=bdver4.
llvm-svn: 207848
2014-05-02 15:47:51 +00:00
Bradley Smith 9a6b29540e [ARM64/AArch64] Define the correct value for __ARM_NEON_FP
llvm-svn: 207842
2014-05-02 15:18:38 +00:00
Bradley Smith 418c5935f8 [ARM64/AArch64] Hook up CRC32 subtarget feature to the driver
llvm-svn: 207841
2014-05-02 15:17:51 +00:00
Richard Smith 7d3192fca5 Bitrig now supports TLS, so enable TLS support when targeting it. Patch by Patrick Wildt!
llvm-svn: 207812
2014-05-01 23:19:06 +00:00
Reid Kleckner 982a589d3a LLVM supports TLS on Windows and we can use it from Clang
Patch by Martell Malone!

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

llvm-svn: 207470
2014-04-29 00:11:30 +00:00
Daniel Sanders 81ea601b54 [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

llvm-svn: 207121
2014-04-24 16:05:26 +00:00
Daniel Sanders ff1c044ada [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

llvm-svn: 207093
2014-04-24 09:58:52 +00:00
James Molloy 8bdd24b1a9 [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.

llvm-svn: 206963
2014-04-23 10:26:19 +00:00
Reid Kleckner 70cfa66fe3 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.

llvm-svn: 206804
2014-04-21 22:29:45 +00:00
Reid Kleckner 4760683b04 MinGW: Define __stdcall&co when -fms-extensions is disabled
This is for compatibility with GCC.

Reviewers: asl

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

llvm-svn: 206791
2014-04-21 20:58:00 +00:00
James Molloy ec78aa46f2 [ARM64] Teach Targets.cpp about Cortex-A53 and Cortex-A57, and enable more tests.
llvm-svn: 206463
2014-04-17 12:51:28 +00:00
Reid Kleckner 6f6e76dfe0 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

llvm-svn: 206415
2014-04-16 20:10:16 +00:00
Reid Kleckner ae4759df00 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.

llvm-svn: 206413
2014-04-16 19:47:06 +00:00
James Molloy 75f5f9e629 [ARM64] Allow the disabling of NEON and crypto instructions. Update tests to pass -target-feature +neon.
llvm-svn: 206394
2014-04-16 15:33:48 +00:00
James Molloy 5e73df5cf0 [ARM64] Fix up predefines, including adding big endian support to Targets.cpp
llvm-svn: 206390
2014-04-16 15:06:20 +00:00
Richard Sandiford d03f7b7bd3 [SystemZ] Don't indent SystemZTargetInfo relative to its namespace
Whitespace only.  No functional change intended.

llvm-svn: 205960
2014-04-10 09:56:24 +00:00
Saleem Abdulrasool f4c9e49f94 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.

llvm-svn: 205650
2014-04-04 20:31:19 +00:00
Saleem Abdulrasool 79ed5d44e7 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.

llvm-svn: 205609
2014-04-04 05:08:53 +00:00
Hal Finkel ecdb454aa7 [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.

llvm-svn: 205144
2014-03-30 13:00:06 +00:00
Tim Northover a2ee433c8d 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.

llvm-svn: 205100
2014-03-29 15:09:45 +00:00
Christian Pirker f01cd6f57b Add ARM big endian Target (armeb, thumbeb)
Reviewed at http://llvm-reviews.chandlerc.com/D3096

llvm-svn: 205008
2014-03-28 14:40:46 +00:00
Saleem Abdulrasool 377066a5f5 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.

llvm-svn: 204978
2014-03-27 22:50:18 +00:00
Joerg Sonnenberger 1f5984ca82 From Matt Thomas: use long long for [u]int64_t and [u]intmax_t on
NetBSD/aarch64 to simplify code sharing with NetBSD/arm.

llvm-svn: 204798
2014-03-26 11:48:29 +00:00
Will Schmidt 22d2435a00 [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.

llvm-svn: 204627
2014-03-24 17:27:03 +00:00
Will Schmidt 0c67b7e3f2 Update DataLayout/DescriptionString for ppc64le
Update DataLayout/DescriptionString for ppc64le

Similar LLVM change made in r203664

Testcase included.

llvm-svn: 204613
2014-03-24 15:48:02 +00:00
Christian Pirker 227f5ed547 AArch64_BE test case for predefined macros
llvm-svn: 204604
2014-03-24 13:57:21 +00:00
Craig Topper e6f17d0cac De-virtualize a method since it doesn't override anything and isn't overridden itself.
llvm-svn: 203538
2014-03-11 04:07:52 +00:00
Craig Topper 3164f33f8f [C++11] Add 'override' keyword to virtual methods that override their base class.
llvm-svn: 203537
2014-03-11 03:39:26 +00:00
Robert Lytton 2c942c64fb Make __LITTLE_ENDIAN__/__BIG_ENDOAN__ common PredefinedMacros
llvm-svn: 203455
2014-03-10 12:06:29 +00:00