aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
AgeCommit message (Collapse)Author
2012-03-12Use ZeroLengthBitfieldAlignment for AAPCS, as well as APCS-GNU.James Molloy
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152552 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-05TargetInfo: create less temporary strings.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152029 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02Fix an ABI problem with ptrdiff_t and intptr_t on PPC32Hal Finkel
ptrdiff_t on PPC32 on Linux, etc. should be int not long. This does not matter for C, but it does matter for C++ because of name mangling. The preprocessor test has been changed accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151935 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02Add the Solaris support directory to the header search when using libc++.David Chisnall
Unconditionally define __C99FEATURES__ when using C++ on Solaris. This is a (hopefully temporary) work around for libc++ exposing C99-but-not-C++98 features in C++98 mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151889 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-28Some more Solaris fixes. Now successfully building libc++ on Solaris with ↵David Chisnall
clang (and linking clang against it). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@151632 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-17On Solaris, define some standard macros that the Solaris headers require inDavid Chisnall
order to not be broken (by Solaris standards). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150822 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-10Set UserLabelPrefix and MCountName correctly for DragonFly BSD. Patch by ↵Eli Friedman
Sascha Wildner. Setting UserLabelPrefix correctly fixes PR11949. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@150280 91177308-0d34-0410-b5e6-96231b3b80d8
2012-02-05Basic: import OwningPtr<> into clang namespaceDylan Noblesmith
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149798 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Use the new Triple::getMacOSXVersion function in another place.Bob Wilson
I removed support for "*-darwin*-iphoneos" triples, since we now have iOS listed as a separate OS in the triples. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149455 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-31Fix "long double" and __SIZE_TYPE__ on powerpc, now with test fix.Nico Weber
Fixes PR11867. Patch from Jeremy Huddleston! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149334 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Revert r149285, it breaks test/Preprocessor/init.c.Nico Weber
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149301 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Fix "long double" and __SIZE_TYPE__ on powerpc.Nico Weber
Fixes PR11867. Patch from Jeremy Huddleston! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149285 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-30Introduce TargetInfo::hasFeature() to query various feature names inDouglas Gregor
each of the targets. Use this for module requirements, so that we can pin the availability of certain modules to certain target features, e.g., provide a module for xmmintrin.h only when SSE support is available. Use these feature names to provide a nearly-complete module map for Clang's built-in headers. Only mm_alloc.h and unwind.h are missing, and those two are fairly specialized at the moment. Finishes <rdar://problem/10710060>. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149227 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-29Complain about attempts to use 'protected' visibility on targetsJohn McCall
like Darwin that don't support it. We should also complain about invalid -fvisibility=protected, but that information doesn't seem to exist at the most appropriate time, so I've left a FIXME behind. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149186 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-28Use defined-at-zero behavior for CLZ/CTZ builtins on PowerPC.Bob Wilson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149181 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-26Make clz/ctz builtins defined for zero on ARM targets. rdar://10732455Bob Wilson
ARM supports clz and ctz directly and both operations have well-defined results for zero. There is no disadvantage in performance to using the defined-at-zero versions of llvm.ctlz/cttz intrinsics. We're running into ARM-specific code written with the assumption that __builtin_clz(0) == 32, even though that value is technically undefined. The code is failing now because of llvm optimizations that are taking advantage of the undef behavior (specifically svn r147255). There's nothing wrong with that optimization on x86 where any incorrect assumptions about __builtin_clz(0) will quickly be exposed. For ARM, though, optimizations based on that undef behavior are likely to cause subtle bugs. Other targets with defined-at-zero clz/ctz support may want to override the default behavior as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149086 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20rename -ccc-host-triple into -targetSebastian Pop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148582 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17fix for PR11655Anton Yartsev
changes i64 alignment from 64 to 32 for powerpc-darwin git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148345 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-17Remove unreachable code in Clang. (replace with llvm_unreachable where ↵David Blaikie
appropriate or when GCC requires it) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148292 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-13Revert r148138; it's causing test failures.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148141 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-13remove assertions in the Hexagon backend specific clang driverSebastian Pop
Patch from Jyotsna Verma: I have made the changes to remove assertions in the Hexagon backend specific clang driver. Instead of asserting on invalid arch name, it has been modified to use the default value. I have changed the implementation of the CPU flag validation for the Hexagon backend. Earlier, the clang driver performed the check and asserted on invalid inputs. In the new implementation, the driver passes the last CPU flag (or sets to "v4" if not specified) to the compiler (and also to the assembler and linker which perform their own check) instead of asserting on incorrect values. This patch changes the setCPU function for the Hexagon backend in clang/lib/Basic/Targets.cpp which causes the compiler to error out on incorrect CPU flag values. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148139 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-13rename -ccc-host-triple into -targetSebastian Pop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148138 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-11Fix -mfpu parsing on ARM.Evgeniy Stepanov
- Support gcc-compatible vfpv3 name in addition to vfp3. - Support vfpv3-d16. - Disable neon feature for -mfpu=vfp* (yes, we were emitting Neon instructions for those!). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147943 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10Add definitions for AMD's bobcat (aka btver1)Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147849 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10Enable POPCNT and LZCNT with sse4a.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147848 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-10Factor the repetitive cpu macro definition into a helper function.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147847 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-09Merge AVX/AVX2 into the SSE level.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147771 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-06__FLT_EVAL_METHOD__ should be 1 on NetBSD/i386, since it defaults toJoerg Sonnenberger
"double" rounding. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147669 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-04Penryn doesn't support sse4.2, don't enable it in the first place.Benjamin Kramer
While the code took care of disabling the sse42 flag it didn't know about popcnt. This broke -march=native on penryn. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147531 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-30Add FMA4 feature flag. Intrinsics coming soon. Also make sse4a feature flag ↵Craig Topper
imply sse3. Matches gcc behavior. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147370 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-29Add popcnt feature flag to match gcc. This flag is implied when sse42 is ↵Craig Topper
enabled, but can be disabled separately. Move popcnt intrinsics to popcntintrin.h to match gcc. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147340 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-28Add a target hook for FLT_EVAL_METHOD and use it to set the value on x86 ↵Benjamin Kramer
with sse disabled. x87 math evaluates everything with 80 bits precision, so we have to set FLT_EVAL_METHOD to "2". git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147311 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-25Add BMI, BMI2, and LZCNT feature flags to enable adding intrinsics.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147262 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-22Add support for bitcasts to vector type in Evaluate.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-21Bump suitable alignment on darwin ppc 32/64 and x86-32 to 16 bytes. I don'tNick Lewycky
actually know about the other OSes on X86-32 besides Linux... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147034 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-19objc-arc: bridge casts in non-objc-arc mode are ignord.Fariborz Jahanian
But, warn too. // rdar://10597832 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146904 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-17Add -mavx2 and -mno-avx2 command line support. Also add core-avx2 processor ↵Craig Topper
type. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146835 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-16Add the value of "suitably aligned" from the C++11 standard to Basic/TargetInfo.Nick Lewycky
This is equal to alignof(std::max_align_t) on the platform and equal to the alignment provided by malloc. (Platform owners please double-check your platform's value.) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146762 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-16Fix 80-column violation and whitespace. No functionality change.Nick Lewycky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146761 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-15gcov-style profiling support for OpenBSD. Patch by Jonathan Gray.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146631 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-12Hexagon backend supportTony Linthicum
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146413 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-08Misc Minix-specific changes to clang:Eli Friedman
. move compiler-rt to a separate directory so the -L argument only includes compiler-rt (thanks joerg) . build all clang subdirs . switches the Minix platform to ELF . normalizes toolchain invocation Patch by Ben Gras. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146206 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02Add support for AVX registers to clang inline asm. Add a small testcaseEric Christopher
and update the Sema testcase with a register that we won't hit for a while I hope. Fixes rdar://10510405 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145671 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-02When we're passing a vector with an illegal type through memory on x86-64, ↵Eli Friedman
use byval so we're sure the backend does the right thing. Fixes va_arg with illegal vectors and an obscure ABI mismatch with __m64 vectors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145652 91177308-0d34-0410-b5e6-96231b3b80d8
2011-12-01Add support for AMD's bulldozer.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145606 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-27Make our handling of MMX x SSE closer to what gcc does:Rafael Espindola
* Enabling sse enables mmx. * Disabling (-mno-mmx) mmx, doesn't disable sse (we got this right already). * The order in not important. -msse -mno-mmx is the same as -mno-mmx -msse. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145194 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-23AAPCS compliance - 32-bit wchar_t should be unsigned for both aapcs and ↵James Molloy
aapcs-linux. Original behaviour of defining wchar_t as signed int has been kept for apcs-gnu as I don't have any spec for this to validate against. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@145102 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-09Define some built-ins macros on mips32 platform, from Simon Atanasyan!Douglas Gregor
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144189 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-05Move definitions of SizeType and PtrDiffType to Mips32TargetInfoBase.Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143775 91177308-0d34-0410-b5e6-96231b3b80d8
2011-11-02Fix various minor issues find via unreachable code warnings, fromDouglas Gregor
Ahmed Charles! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143569 91177308-0d34-0410-b5e6-96231b3b80d8