Commit Graph

302 Commits

Author SHA1 Message Date
John McCall e155a3d8aa __builtin_va_list is void* on ARM, not char*.
rdar://problem/9391966

llvm-svn: 131080
2011-05-09 02:19:37 +00:00
Daniel Dunbar ea1f098dbe Revert r130750, "Make the mno flags match GCC. Patch by Alexander Best!", it breaks tests.
llvm-svn: 130753
2011-05-03 15:34:01 +00:00
Michael J. Spencer c30448222a Make the mno flags match GCC. Patch by Alexander Best!
llvm-svn: 130750
2011-05-03 04:35:54 +00:00
Eric Christopher 956d96ce34 Remove this assert, I don't think it's being helpful and people have
been running into it.

llvm-svn: 130296
2011-04-27 05:48:06 +00:00
Daniel Dunbar bbd482226e Driver/Darwin: Allow OS X deployment targets like 10.4.11, even though they
can't be represented in the environment define.

llvm-svn: 129939
2011-04-21 21:27:33 +00:00
Justin Holewinski 514cce8e43 PTX: Add PTX intrinsics as builtins and add ptx32 and ptx64 as valid architectures for triples, e.g. ptx32-unknown-unknown
llvm-svn: 129870
2011-04-20 19:34:15 +00:00
Daniel Dunbar fcd2389b7a TWEAK
llvm-svn: 129835
2011-04-19 23:34:21 +00:00
Daniel Dunbar 308cfd045f Driver/Darwin: Switch to using -macosx for OS name in triples.
llvm-svn: 129834
2011-04-19 23:34:17 +00:00
Daniel Dunbar 14ad22f09d ADT/Triple: Switch to using .isOSDarwin() predicate.
llvm-svn: 129823
2011-04-19 21:43:27 +00:00
Daniel Dunbar ecf1356057 Basic/Darwin: Add support for new -osx and -ios style triples (not yet used).
llvm-svn: 129820
2011-04-19 21:40:34 +00:00
Michael J. Spencer a9e4117991 Make -mno-mmx imply -mno-3dnow. This is what gcc does, and it makes sense.
Also, fold the sse4 and sse4.1 cases together.

Patch by Alexander Best!

llvm-svn: 129665
2011-04-17 19:22:03 +00:00
Roman Divacky 27ec14fad7 Enable sse4 and aes for SandyBridge. Leave avx support commented out for now.
llvm-svn: 128923
2011-04-05 20:32:44 +00:00
Sandeep Patel f87b3739cc Explain why layout prefers 32 for small types on Thumb.
llvm-svn: 128850
2011-04-04 22:58:12 +00:00
Bob Wilson e3a15fed08 Change ARM data layout strings to match llvm-gcc.
Sandeep Patel noticed that the alignment was wrong for Neon vector types,
and this change is partly derived from his patch.  For the APCS ABI, however,
additional changes were required: the maximum ABI alignment is 32 bits and
the preferred alignment for i64 and f64 types should be 64 bits.

llvm-svn: 128825
2011-04-04 16:53:11 +00:00
Douglas Gregor 20b2ebd785 Implement a new 'availability' attribute, that allows one to specify
which versions of an OS provide a certain facility. For example,

  void foo()
  __attribute__((availability(macosx,introduced=10.2,deprecated=10.4,obsoleted=10.6)));

says that the function "foo" was introduced in 10.2, deprecated in
10.4, and completely obsoleted in 10.6. This attribute ties in with
the deployment targets (e.g., -mmacosx-version-min=10.1 specifies that
we want to deploy back to Mac OS X 10.1). There are several concrete
behaviors that this attribute enables, as illustrated with the
function foo() above:

  - If we choose a deployment target >= Mac OS X 10.4, uses of "foo"
    will result in a deprecation warning, as if we had placed
    attribute((deprecated)) on it (but with a better diagnostic)
  - If we choose a deployment target >= Mac OS X 10.6, uses of "foo"
    will result in an "unavailable" warning (in C)/error (in C++), as
    if we had placed attribute((unavailable)) on it
  - If we choose a deployment target prior to 10.2, foo() is
    weak-imported (if it is a kind of entity that can be weak
    imported), as if we had placed the weak_import attribute on it.

Naturally, there can be multiple availability attributes on a
declaration, for different platforms; only the current platform
matters when checking availability attributes.

The only platforms this attribute currently works for are "ios" and
"macosx", since we already have -mxxxx-version-min flags for them and we
have experience there with macro tricks translating down to the
deprecated/unavailable/weak_import attributes. The end goal is to open
this up to other platforms, and even extension to other "platforms"
that are really libraries (say, through a #pragma clang
define_system), but that hasn't yet been designed and we may want to
shake out more issues with this narrower problem first.

Addresses <rdar://problem/6690412>.

As a drive-by bug-fix, if an entity is both deprecated and
unavailable, we only emit the "unavailable" diagnostic.

llvm-svn: 128127
2011-03-23 00:50:03 +00:00
Eli Friedman 015d6288d4 Make the definition of "long double" consistent for llvm::Triple::Win32 for
both 32-bit and 64-bit targets.

llvm-svn: 128110
2011-03-22 21:25:11 +00:00
Bob Wilson 87ba1d329a Another cortex-m0 patch from James Orr.
llvm-svn: 128029
2011-03-21 21:55:25 +00:00
Daniel Dunbar 7594237964 Unbreak build.
llvm-svn: 127942
2011-03-19 02:06:21 +00:00
NAKAMURA Takumi b2beb018b8 lib/Basic/Targets.cpp: __declspec(attr) should be provided on mingw as macro, alias of __attribute__.
On mingw without -fms-extensions, we can provide "as-is" __declspec.

llvm-svn: 127655
2011-03-15 02:32:50 +00:00
NAKAMURA Takumi 2b7eeb2b4b lib/Basic/Targets.cpp: mingw-w64 should define __MINGW32__, too.
llvm-svn: 127238
2011-03-08 12:06:46 +00:00
Daniel Dunbar 13adc7fefd Targets/Darwin: mcount name on Darwin needs to be unmangled.
llvm-svn: 126152
2011-02-21 23:12:51 +00:00
Peter Collingbourne 8f5cf74c77 Re-instate r125819 and r125820 with no functionality change
llvm-svn: 126060
2011-02-19 23:03:58 +00:00
Rafael Espindola a6d2bff0c5 Revert 125820 and 125819 to fix PR9266.
llvm-svn: 126050
2011-02-19 21:39:31 +00:00
NAKAMURA Takumi dba4ed3502 [Heikki Kultala] This patch contains the ABI changes for the TCE target.
TCE target has some too strict alignment rules (that the HW really does not require, but which caused problems elsewhere) for data types and an ABI change was decided.

llvm-svn: 125833
2011-02-18 08:44:38 +00:00
Peter Collingbourne 3ae6caaf1b Move TargetInfo::adjustInlineAsmType to TargetCodeGenInfo
llvm-svn: 125819
2011-02-18 02:24:56 +00:00
NAKAMURA Takumi 31ea2f14bc Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 instead.
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32.

llvm-svn: 125742
2011-02-17 08:51:38 +00:00
Roman Divacky 178e0160b7 Implement mcount profiling, enabled via -pg.
llvm-svn: 125282
2011-02-10 16:52:03 +00:00
Douglas Gregor de7a357a30 Support EFI target triple, from Carl Norum!
llvm-svn: 124660
2011-02-01 15:06:18 +00:00
NAKAMURA Takumi a2e468cb0a lib/Basic/Targets.cpp: __builtin_va_list is as same on win64 mingw64!
llvm-svn: 123691
2011-01-17 22:56:23 +00:00
NAKAMURA Takumi ce5519a790 lib/Basic/Targets.cpp: Fix __declspec() on Mingw-w64.
It should be defined as-is. Some headers would detect existence of __declspec and use one.

llvm-svn: 123690
2011-01-17 22:56:16 +00:00
NAKAMURA Takumi f7c3022369 lib/Basic/Targets.cpp: Set user_label_prefix on Win64 both mingw and msvc.
llvm-svn: 123689
2011-01-17 22:56:08 +00:00
Douglas Gregor e6d6e51686 wint_t is defined as 'unsigned int' on Linux. Fixes PR8938.
llvm-svn: 123320
2011-01-12 21:19:25 +00:00
Bob Wilson 44acad8e60 Add cortex-m3 CPU to getCPUDefineSuffix mapping.
Patch by Sylvère Teissier.

llvm-svn: 122965
2011-01-06 16:57:20 +00:00
Roman Divacky 965b0b72b1 PowerPC fixes.
Fix the width and align of bool type on Darwin to be 32bits
while keeping it 8 everywhere else.

Change the definition of va_list to default to SV4 ABI one
and let darwin subtarget override this.

Both changes submitted by Nathan Whitehorn and reviewed
by Rafael Espindola.

llvm-svn: 122956
2011-01-06 08:27:10 +00:00
Roman Divacky dacbfe49ec set features for k8-sse3
llvm-svn: 122629
2010-12-29 13:28:29 +00:00
Wesley Peck 69bf128b2f Change MBlaze target to have the same description string as its LLVM equivalent.
llvm-svn: 121640
2010-12-12 20:56:47 +00:00
Fariborz Jahanian e8473c2feb Such function decls,as objc's objc_msgSend, builtins in
a specific language. We are adding such language info. by
extensing Builtins.def and via a language flag added
to LIBBUILTIN/BUILTIN and check for that when deciding
a name is builtin or not. Implements //rdar://8689273.

llvm-svn: 120429
2010-11-30 17:35:24 +00:00
Bruno Cardoso Lopes e7f211c89f Add support for soft/hard float options to the Sparc target
llvm-svn: 118514
2010-11-09 17:21:19 +00:00
Rafael Espindola c55be6d317 Include System/DataTypes.h in Diagnostic.h to get intptr_t.
Set Haiku's UserLabelPrefix to "".
Patch by Paul Davey.

llvm-svn: 118510
2010-11-09 16:41:02 +00:00
Dale Johannesen 182addf159 Handle Type.h a better way.
llvm-svn: 117743
2010-10-29 23:24:33 +00:00
Dale Johannesen 7d3dfc0622 Generate bitcasts going in and out of MMX parameters
in asm's.  PR 8501, 8602988.
I don't like including Type.h where it is; the idea was
to get references to X86_MMXTy out of the common code.
Maybe there's a better way?

llvm-svn: 117736
2010-10-29 23:12:32 +00:00
Dale Johannesen d2b2ad093c Ahem. Add rest of D and Q registers to ARM inline asm handling.
llvm-svn: 117517
2010-10-28 01:05:37 +00:00
Dale Johannesen 7fd51bc1e6 Add D and Q register names to ARM inline asm handling.
No aliasing is needed, these work as given in the BE.

llvm-svn: 117508
2010-10-27 23:34:42 +00:00
Dale Johannesen 70f564e0e8 Change handling of inline asm 'p' constraint to match llvm-gcc.
llvm-svn: 117149
2010-10-22 21:07:10 +00:00
Francois Pichet ebdb43d54d Revert r117005, WIN32 is not predefined after all.
llvm-svn: 117026
2010-10-21 16:14:56 +00:00
Francois Pichet 1ef4eb196d MSVC defines WIN32 as a predefined macro.
llvm-svn: 117005
2010-10-21 09:39:28 +00:00
Michael J. Spencer 54bf3c3cfb Targets: Fix MinGW and VisualStudio predefined macros.
llvm-svn: 117003
2010-10-21 08:22:51 +00:00
Michael J. Spencer 4992ca4b17 Reorganize predefined macros for all Windows targets.
This adds an option to set the _MSC_VER macro without
recompiling. This is very useful when testing compatibility
with the Windows SDK and c++stdlib headers.

-fmsc-version=<version> (defaults to VS2003 (1300))

llvm-svn: 116999
2010-10-21 05:21:48 +00:00
Michael J. Spencer 4c0ffa823f Fix Whitespace.
llvm-svn: 116990
2010-10-21 03:16:25 +00:00
Michael J. Spencer 7b726c3fc8 Revert "Cleanup and fix predefined macros for windows."
Didn't realize this was on my branch ;/.

llvm-svn: 116989
2010-10-21 03:14:35 +00:00