summaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
Commit message (Collapse)AuthorAge
* Merging r168674: into the 3.2 release branch.Pawel Wodnicki2012-11-28
| | | | | | | Fix the definition of the vfork() builtin on Haiku. PR14378. git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_32@168819 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge r168260 from trunk:Benjamin Kramer2012-11-19
| | | | | | | | | | Enable inlining of 4 byte atomic ops on ppc32, 8 byte atomic ops on ppc64. Also fixes a bit/byte mismatch when checking if a target supports atomic ops of a certain size. git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_32@168313 91177308-0d34-0410-b5e6-96231b3b80d8
* Add clang support of RTM from TSXMichael Liao2012-11-10
| | | | | | | | | | | | | | - New options '-mrtm'/'-mno-rtm' are added to enable/disable RTM feature - Builtin macro '__RTM__' is defined if RTM feature is enabled - RTM intrinsic header is added and introduces 3 new intrinsics, namely '_xbegin', '_xend', and '_xabort'. - 3 new builtins are added to keep compatible with gcc, namely '__builtin_ia32_xbegin', '__builtin_ia32_xend', and '__builtin_ia32_xabort'. - Test cases for pre-defined macro and new intrinsic codegen are added. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167665 91177308-0d34-0410-b5e6-96231b3b80d8
* Set TLSSupported to false on Haiku.Benjamin Kramer2012-11-08
| | | | | | | | | | | Haiku does not support this (yet). Leaving it set to true leads to configure scripts detecting __thread being available and Clang emitting code for it, resulting in binaries the runtime_loader will refuse to load. Patch by Jonathan Schleifer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167576 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename LangOptions members for address sanitizer and thread sanitizer fromRichard Smith2012-11-05
| | | | | | | *Sanitizer to Sanitize* in preparation for later patches. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@167405 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch adds alignment information for long double to the 64-bit PowerPCBill Schmidt2012-10-29
| | | | | | | | | | | | | | | | | | | ELF subtarget. The existing description string is moved from PPC64TargetInfo to its DarwinTargetInfo subclass, to avoid any changes to the Darwin ABI. PPC64TargetInfo now has two possible description strings: one for FreeBSD, which requires 8-byte alignment, and a default string that requires 16-byte alignment. I've added a test for PPC64 Linux to verify the 16-byte alignment. If somebody wants to add a separate test for FreeBSD, that would be great. Note that there is a companion patch to update the alignment information in LLVM, which I am committing now as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166927 91177308-0d34-0410-b5e6-96231b3b80d8
* Recommit Eric's code to validate ASM string's constraints and modifiers.Bill Wendling2012-10-25
| | | | | | | | | | | | | | This code checks the ASM string to see if the output size is able to fit within the variable specified as the output. For instance, scalar-to-vector conversions may not really work. It's on by default, but can be turned off with a flag if you think you know what you're doing. This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm'). <rdar://problem/12284092> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166737 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify the targets to set appropriate calling convention defaults and C ↵David Tweed2012-10-25
| | | | | | | | | | variables when using a gnueabihf or aapcs-vfp target. Tested by me and Wei-Ren Chen. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166679 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r166647 to rethink the patch...Bill Wendling2012-10-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166655 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some support for diagnosing possibly mismatched constraint, type size andBill Wendling2012-10-25
| | | | | | | | modifiers. (From an idea by Eric...) <rdar://problem/12284092> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166647 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pre-commit refacto failure.Daniel Dunbar2012-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166431 91177308-0d34-0410-b5e6-96231b3b80d8
* driver/Darwin: Follow up to last patch, M-class CPUs are AAPCS but not EABI.Daniel Dunbar2012-10-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166430 91177308-0d34-0410-b5e6-96231b3b80d8
* Serialize TargetOptions into an AST file, and make sure that we keepDouglas Gregor2012-10-16
| | | | | | | | target options around so they can be accessed at any point (rather than keeping them transient). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166072 91177308-0d34-0410-b5e6-96231b3b80d8
* Add pnaclcall convention to Native Client targets.Derek Schuff2012-10-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | Because PNaCl bitcode must be target-independent, it uses some different bitcode representations from other targets (e.g. byval and sret for structures). This means that without additional type information, it cannot meet some native ABI requirements for some targets (e.g. passing structures containing unions by value on x86-64). To allow generation of code which uses the correct native ABIs, we also support triples such as x86_64-nacl, which uses target-dependent IR (as opposed to le32-nacl, which uses byval and sret). To allow interoperation between the two types of code, this patch adds a calling convention attribute to be used in code compiled with the target-dependent triple, which will generate code using the le32-style bitcode. This calling convention does not need to be explicitly supported in the backend because it determines bitcode representation rather than native conventions (the backend just needs to undersand how to handle byval and sret for the Native Client OS). This patch implements __attribute__((pnaclcall)) to generate calls in bitcode according to the le32 bitcode conventions, an attribute which is accepted by any Native Client target, but issues a warning otherwise. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166065 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach TargetInfo to hold on to the TargetOptions with which it wasDouglas Gregor2012-10-15
| | | | | | | created. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165943 91177308-0d34-0410-b5e6-96231b3b80d8
* Add TargetInfo for r600.Eli Friedman2012-10-12
| | | | | | | | Patch by Tom Stellard. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165850 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly factor Native Client defines to support NaCl as an OSDerek Schuff2012-10-11
| | | | | | with x86/ARM architecture git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165722 91177308-0d34-0410-b5e6-96231b3b80d8
* Make X86_64ABIInfo clean for ABIs with 32 bit pointers, such as X32Derek Schuff2012-10-11
| | | | | | and Native Client git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165715 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: add F16C support in ClangManman Ren2012-10-11
| | | | | | | | | | Support the following intrinsics: _mm_cvtph_ps, _mm256_cvtph_ps, _mm_cvtps_ph, _mm256_cvtps_ph rdar://12407875 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165685 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR 11709: Change the definition of va_list to meet AAPCS requirementLogan Chien2012-10-10
| | | | | | | | | | | | | | | AAPCS ABI Section 7.1.4 [1] specifies that va_list should be defined as struct __va_list { void *__ap;}; And in C++, it is defined in namespace std. [1] http://infocenter.arm.com/help/topic /com.arm.doc.ihi0042d/IHI0042D_aapcs.pdf Patch by Weiming Zhao. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165609 91177308-0d34-0410-b5e6-96231b3b80d8
* Allowing individual targets to determine whether a given calling convention ↵Aaron Ballman2012-10-02
| | | | | | | | is allowed or ignored with warning. This allows for correct name mangling for x64 targets on Windows, which in turn allows for linking against the Win32 APIs. Fixes PR13782 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@165015 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ARM VFPv4 feature and enable it by default for Swift.Bob Wilson2012-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164906 91177308-0d34-0410-b5e6-96231b3b80d8
* Add armv7s and some other arm variants supported by Mach-O files.Bob Wilson2012-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164905 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable source fortification on Darwin with AddressSanitizer.Alexander Potapenko2012-09-20
| | | | | | | ASan doesn't play well with -D_FORTIFY_SOURCE, which is enabled by default starting at OS X 10.7 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164299 91177308-0d34-0410-b5e6-96231b3b80d8
* Add e500mc and e5500 to the list of valid PPC CPU names.Hal Finkel2012-09-18
| | | | | | Patch by Tobias von Koch! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@164176 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch introduces A15 as a target in Clang.Silviu Baranga2012-09-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163804 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not construct StringRef from NULL argument.Anton Korobeynikov2012-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163465 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide some ACLE C defines. This should fix PR13796Anton Korobeynikov2012-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163464 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename ANDROIDEABI to Android.Logan Chien2012-09-02
| | | | | | | | | | | | | | Most of the code guarded with ANDROIDEABI are not ARM-specific, and having no relation with arm-eabi. Thus, it will be more natural to call this environment "Android" instead of "ANDROIDEABI". Note: We are not using ANDROID because several projects are using "-DANDROID" as the conditional compilation flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163088 91177308-0d34-0410-b5e6-96231b3b80d8
* Define __mips64 / __mips64__ macros for MIPS 64-bit targets.Simon Atanasyan2012-08-29
| | | | | | | The patch suggested by Brad Smith. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162858 91177308-0d34-0410-b5e6-96231b3b80d8
* Use getTargetDefines() virtual function in MipsTargetInfoBase successorsSimon Atanasyan2012-08-29
| | | | | | | | to define all macros for MIPS targets. Remove redundant virtual function getArchDefines(). Two virtual functions for this task are really too much. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162853 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor out MIPS macro definitions common for all MIPS targets.Simon Atanasyan2012-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162852 91177308-0d34-0410-b5e6-96231b3b80d8
* Define _MIPS_ARCH and _MIPS_ARCH_<cpu name> macros for MIPS targets.Simon Atanasyan2012-08-29
| | | | | | | The patch suggested by Logan Chien. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162840 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove FIXME, the constraints contain more options than theEric Christopher2012-08-16
| | | | | | current available documentation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162065 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a missing 'break' to ensure that we reject inline assemblyEric Christopher2012-08-16
| | | | | | constraints we don't recognize. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162064 91177308-0d34-0410-b5e6-96231b3b80d8
* Frontend: define _LP64 in a target-independent wayDylan Noblesmith2012-08-10
| | | | | | | | | | | | | | Instead of adding it to each individual subclass in Targets.cpp, simply check the appropriate target values. Where before it was only on x86_64 and ppc64, it's now also defined on mips64 and nvptx64. Also add a bunch of negative tests to ensure it is *not* defined on any other architectures while we're here. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161685 91177308-0d34-0410-b5e6-96231b3b80d8
* clang support for Bitrig (an OpenBSD fork); patch by David Hill.Eli Friedman2012-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161546 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert part of r161175 which was wrong for OpenBSD's PowerPC target.Hans Wennborg2012-08-08
| | | | | | Contributed by Brad Smith <brad@comstyle.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161481 91177308-0d34-0410-b5e6-96231b3b80d8
* Add OpenBSD arch targets for powerpc, arm, mips64, mips64el and sparc.Hans Wennborg2012-08-02
| | | | | | Contributed by Brad Smith <brad@comstyle.com> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161175 91177308-0d34-0410-b5e6-96231b3b80d8
* TLS is not supported on OpenBSDHans Wennborg2012-08-01
| | | | | | | This fixes PR13502 and adds a test to keep track of which targets support TLS and which do not. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161124 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a per target max vector alignment field (e.g., 32-byte alignment for x86 ↵Chad Rosier2012-07-13
| | | | | | | | | | due to AVX). Currently, if no aligned attribute is specified the alignment of a vector is inferred from its size. Thus, very large vectors will be over-aligned with no benefit. Target owners should set this target max. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160209 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix handling of curly braces in NVPTX inline asmJustin Holewinski2012-07-11
| | | | | | | | Fixes bug 13322 Patch by Dmitry Mikushin git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160050 91177308-0d34-0410-b5e6-96231b3b80d8
* Wire up -mrdrnd for X86.Benjamin Kramer2012-07-07
| | | | | | | For some reason GCC decided to call the feature rdrnd instead of rdrand, which requires translating it for LLVM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159897 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unreachable default case to pacify clang's -Wcovered-switch-default.Benjamin Kramer2012-07-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159829 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS: Define __mips_dsp_rev / __mips_dspr2 / __mips_dsp macrosSimon Atanasyan2012-07-05
| | | | | | | if -mdsp or -mdspr2 options are provided. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159774 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS: Add -mdsp/-mno-dsp and -mdspr2/-mno-dspr2 command line options support.Simon Atanasyan2012-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159769 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS: Define __mips16 macro if -mips16 option is provided.Simon Atanasyan2012-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159753 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS: Replace the pair of boolean flags by enumeration to hold selected ↵Simon Atanasyan2012-07-05
| | | | | | float ABI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159752 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS: Add -mips16 / -mno-mips16 command line support.Simon Atanasyan2012-07-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159747 91177308-0d34-0410-b5e6-96231b3b80d8
* Add additional architecture defines for PPC targets.Hal Finkel2012-07-03
| | | | | | Patch by Andy Gibbs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159665 91177308-0d34-0410-b5e6-96231b3b80d8