Commit Graph

322 Commits

Author SHA1 Message Date
Joerg Sonnenberger 870b3c5429 Don't define _BIG_ENDIAN for NetBSD/PowerPC.
llvm-svn: 134411
2011-07-05 14:56:12 +00:00
Joerg Sonnenberger a6d11777f9 Fix indentation
llvm-svn: 134410
2011-07-05 14:54:41 +00:00
Joerg Sonnenberger f031fd9e77 Add explicit default case for -Wswitch-enum.
llvm-svn: 134399
2011-07-04 23:11:58 +00:00
Joerg Sonnenberger 025949c366 Use switch(os) style consistently. Add a bunch of NetBSD branches.
llvm-svn: 134393
2011-07-04 21:59:44 +00:00
Joerg Sonnenberger e72d9b1f85 On PowerPC, both FreeBSD and NetBSD use ints for (s)size_t
llvm-svn: 134392
2011-07-04 21:57:55 +00:00
Eric Christopher bf15d2b311 Update for llvm commit r134291.
Fixes rdar://9714064

llvm-svn: 134292
2011-07-02 00:20:22 +00:00
Douglas Gregor 9fabd851c8 Add initial *-*-rtems* target, from Joel Sherrill
llvm-svn: 134283
2011-07-01 22:41:14 +00:00
Bob Wilson 1957a2feb5 Use preferred 64-bit alignment for i64 & f64 for Thumb targets. Radar 9695134.
llvm-svn: 134070
2011-06-29 16:09:20 +00:00
Eric Christopher cdd3635b09 Move additional register names to their own lookup, separate from
register aliases. Fixes unnecessary renames of clobbers.

Fixes part of rdar://9425559

llvm-svn: 133485
2011-06-21 00:05:20 +00:00
John McCall 0c32925aa0 As a hopefully temporary workaround for a header mistake, treat
__bridge_retain as a synonym for __bridge_retained.

llvm-svn: 133295
2011-06-17 21:23:37 +00:00
Eric Christopher d10485412d Add some more memory constraints for ARM.
Part of rdar://9197685

llvm-svn: 133225
2011-06-17 01:40:49 +00:00
Eric Christopher 7d237c1882 On ARM make sure that we continue translating 'p' to 'r' for the
constraints.

rdar://9618597

llvm-svn: 133222
2011-06-17 00:40:18 +00:00
Evan Cheng d863adb201 Stylistic fix: move virtual keyword before return type.
llvm-svn: 133181
2011-06-16 19:13:15 +00:00
John McCall 5d36a8cc70 Unconditionally #define the ARC ownership qualifiers, instead of #defining
them only on Darwin tool chains.

llvm-svn: 133112
2011-06-16 00:03:19 +00:00
John McCall 31168b077c Automatic Reference Counting.
Language-design credit goes to a lot of people, but I particularly want
to single out Blaine Garst and Patrick Beard for their contributions.

Compiler implementation credit goes to Argyrios, Doug, Fariborz, and myself,
in no particular order.

llvm-svn: 133103
2011-06-15 23:02:42 +00:00
Stuart Hastings 5b7b11cedb Followup to 132737; make two-character string explicit, add some
comments.  rdar://problem/9037836

llvm-svn: 132752
2011-06-08 16:06:31 +00:00
Stuart Hastings 7fdc6707ac Clang support for ARM Uv/Uy/Uq inline-asm constraints.
rdar://problem/9037836

llvm-svn: 132737
2011-06-07 23:45:05 +00:00
Akira Hatanaka b579fe5f15 Add stuff for o32 ABI conformance.
llvm-svn: 132443
2011-06-02 00:09:17 +00:00
Benjamin Kramer 85e1664fb2 sandybridge is now called corei7-avx
llvm-svn: 131729
2011-05-20 15:11:23 +00:00
Bob Wilson 19c1b88c55 Define __ARM_NEON__ in both ARM and Thumb modes. Radar 9431992.
llvm-svn: 131301
2011-05-13 18:56:03 +00:00
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