aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/Targets.cpp
AgeCommit message (Collapse)Author
2011-10-31In x86_64, when calling an Objective-C method that returns a _Complex long ↵Anders Carlsson
double, make sure to use the objc_msgSend_fp2ret function which ensures that the return value will be {0, 0} if the receiver is nil. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143350 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30Add support for sse4a and enable it for amdfam10 cpu.Roman Divacky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143312 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-30Add support for amdfam10 cpu.Roman Divacky
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@143305 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-25Remove the Blackfin backend.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142881 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-24Remove the SystemZ backend.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142879 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-22Make changes necessary for N32/64 ABI conformance.Akira Hatanaka
- Size of long double is 16 bytes for both N32 and N64. - Size of pointers and long is 8 bytes for N64. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142705 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-18Use llvm::Triple's methods to parse FreeBSD version numbers.Benjamin Kramer
Who could've thought that FreeBSD would ever reach version 10! Patch from Dimitry Andric. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142349 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-15Place static initializers on linux into the ".text.startup" section, so the ↵Benjamin Kramer
linker can group them together for performance. This only has an effect with fairly new binutils (2.21.51 or later). Other ELF targets probably want this as well, but on BSDs binutils is usually old so it doesn't matter. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142076 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-14Misc fixes for atomics. Biggest fix is doing alignment correctly for ↵Eli Friedman
_Atomic types. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@142002 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-12Add target info for Linux on PPC & Sparc.Anton Korobeynikov
Patch by Hal Finkel! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141772 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11Allow regparm attribute for PNaCl targetDavid Meyer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141638 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-11Fixed natural stack alignment for Linux x86-32. Thanks Eli.Lang Hames
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141617 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-10Update target data strings for ARM and X86 to include the natural stackLang Hames
alignment parameter "S<size>" that was introduced in r141599. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141601 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-07Add address spaces for TCE target. Patch by Pekka Jääskeläinen.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141390 91177308-0d34-0410-b5e6-96231b3b80d8
2011-10-03PTX: Add some basic support for OpenCL address spacesJustin Holewinski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141008 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Fix a typo spotted by Jonathan Sauer.Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140708 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Attempt to silence the GCC -Wreturn-type warning...Chandler Carruth
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140693 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Generate tests for all of the x86 SIMD instruction feature setChandler Carruth
predefines based on the output of GCC as well as the CPU predefines. Invert tests for __AVX__, Clang's AVX feature is hard coded off still. Switch Atom from 'SSE3' to 'SSSE3'. This matches GCC's behavior, Intel's documentation, and ICC's documentation (such as I could dig up). Switch Athlon and Geode to enable 3dnowa rather than just 3dnow and nothing (resp.). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140692 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Fix a think-o on my part that got enshrined in a FIXME by setting up theChandler Carruth
__tune_...__ define as well. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140690 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Move some of the defines down to more natural locations, consolidatingChandler Carruth
the target identifying macros at the top, including subtarget macros. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140689 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Teach Clang to reject 32-bit only CPUs when compiling in 64-bit mode.Chandler Carruth
Add 64-bit preprocessor macro tests. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140688 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Simplify the control flow for predefined macro selection by usingChandler Carruth
fallthrough now that we're working with a switch. Also remove a dubious "feature" regarding k6 processors and 3dnow and leave a fixme... Not that anyone is likely to care about correct tuning for k6 processors with and w/o 3dnow... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140687 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Switch the X86TargetInfo object from a string representation of theChandler Carruth
selected CPU model to the enumeration. This parses the string representation once using a StringSwitch on SetCPU. It returns an error for strings which are not recognized (yay!). Finally it replaces ridiculous if-chains with switches that cover all enumerators. The last change required adding several missing entries to the features function. These were obvious on inspection. Yay for a pattern that gives warnings when we miss one. No new test cases yet, as I want to get the 64-bit errors working first. I'll then start fleshing out the testing more. Currently I'm primarily testing on Linux, but I'm hoping check whether there are interesting differences on darwin before long... git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140685 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Introduce an enumeration for the x86 CPUs recognized by Clang. I'veChandler Carruth
tried to give these nice doxyments, but if I've gotten any of my history wrong, please chime in. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140684 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Clean up a bit of the uses of CPU in the TargetInfo classes. This makesChandler Carruth
it an error if a CPU is provided for a target that doesn't implement logic handling CPU settings, to match the ABI settings. It also removes the CPU parameter from the getDefaultFeatures method. This parameter was always filled in with the same value as setCPU was called with, and at this point every single target implementation that referenced the CPU within this function has needed to store the CPU via setCPU anyways in order to implement other interface points. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140683 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-28Begin fixing Clang's predefined macros for various architectures. ThisChandler Carruth
is *very* much a WIP that I'll be refining over the next several commits, but I need to get this checkpoint in place for sanity. This also adds a much more comprehensive test for architecture macros, which is roughly generated by inspecting the behavior of a trunk build of GCC. It still requires some massaging, but eventually I'll even check in the script that generates these so that others can use it to append more tests for more architectures, etc. Next up is a bunch of simplification of the Targets.cpp code, followed by a lot more test cases once we can reject invalid architectures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140673 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-25Rename Diagnostic to DiagnosticsEngine as per issue 5397David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140478 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23Fix missing includes for llvm_unreachableDavid Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140368 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-23Switch assert(0/false) llvm_unreachable.David Blaikie
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140367 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-22PTX: Clean up target options codeJustin Holewinski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140320 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20Define Mips64 TargetInfo classes.Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140174 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20Clean up TargetInfo class hierarchy. Define a base class from which TargetInfosAkira Hatanaka
of Mips32 big and little endian derive. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140170 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-20Clarify PNaCl target characteristics: set LongDoubleWidth, PtrDiffType, ↵Ivan Krasin
IntPtrType, change __builtin_va_list to from a structure to int[4] (same alignment and size, but with a simpler representation). Patch by David Meyer! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140144 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-17Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear ↵Francois Pichet
that this flag must be used only for Microsoft extensions and not emulation; to avoid confusion with the new LangOptions::MicrosoftMode flag. Many of the code now under LangOptions::MicrosoftExt will eventually be moved under the LangOptions::MicrosoftMode flag. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139987 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-15PTX: Define target optionsJustin Holewinski
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139789 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-14Add comment.Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139700 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13O64 will not be supported.Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139655 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13mips*-*-psp is no longer supported as a target.Akira Hatanaka
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139654 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-13Switch LangOptions over to a .def file that describes header of theDouglas Gregor
language options. Use that .def file to declare the LangOptions class and initialize all of its members, eliminating a source of annoying initialization bugs. AST serialization changes are next up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@139605 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-29Clang/PNaCl: Improve test coverage for PNaClTargetInfo (type aligns), fixes ↵Ivan Krasin
nits: - wrong alignment for double (it was 4, but 8 is desired), - added checks for _REENTRANT define, - fixed the issue that defines were not tested (because the check for inside #ifdef). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138775 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-25PNaClTargetInfo: add __ELF__, _REENTRANT and _GNU_SOURCE defines and update ↵Ivan Krasin
the test git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138607 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-24Follow up to r138470 (Add PNaCl TargetInfo). I've occasionally submitted ↵Ivan Krasin
wrong patch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138489 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-24Add PNaCl TargetInfo.Ivan Krasin
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138470 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-18"-mavx" should also enable all other SSE levels.Bruno Cardoso Lopes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137905 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04Additional comments and whitespace.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136892 91177308-0d34-0410-b5e6-96231b3b80d8
2011-08-04Add partial support for using anonymous bitfields (e.g., int : 0) to enforce Chad Rosier
alignment. This fixes cases where the anonymous bitfield is followed by a non-bitfield member. E.g., struct t4 { int foo : 1; long : 0; char bar; }; Part of rdar://9859156 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136858 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-31Remove dead code flagged by GCC's -Wunused-but-set-variable.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136581 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-29Add support for the 'Q' arm memory constraint.Eric Christopher
Fixes rdar://9866494 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136524 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-26After further discussion it has been determined that alignof should report Chad Rosier
the preferred alignment. Thus, revert r135934, r135935, and r135940. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@136062 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-25Allow target to specify about using minimum alignment vs preferred. Takes ↵Chad Rosier
care of FIXME: Override "preferred align" for double and long long for ARM apcs-gnu ABI. Also part of rdar://9802874 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@135940 91177308-0d34-0410-b5e6-96231b3b80d8