Eli Friedman
3346582bca
Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx should not imply -mno-sse.
...
Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__.
clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much.
<rdar://problem/9694837>
llvm-svn: 134770
2011-07-08 23:31:17 +00:00
Evan Cheng
491f56d41e
Fix a FIXME in clang ARM driver that was exposed as a bug with ARM backend
...
change.
Previously clang was passing the following feature strings to the ARM backend
when CPU is cortex-a8: +neon,-vfp2,-vfp3
This used to work because -vfp2,-vfp3 had no effect after +neon. Now that the
features are controlled by individual bits (with implied hierarchy), the net
effect is all three features will be turned off.
llvm-svn: 134691
2011-07-08 06:40:11 +00:00
Eric Christopher
0c912c5f9b
Fix a typo in the fpsr register and add the fpcr register.
...
Fixes PR10299 and rdar://9740322
llvm-svn: 134654
2011-07-07 22:55:26 +00:00
Joerg Sonnenberger
c46e3ce58c
FreeBSD gets FreeBSD target, just mipsel.
...
llvm-svn: 134619
2011-07-07 17:01:45 +00:00
Joerg Sonnenberger
fbc0b3a826
Fix C&P error
...
llvm-svn: 134490
2011-07-06 11:00:56 +00:00
Eli Friedman
bb5c9ae425
Remove unused member of Builtin::Info.
...
llvm-svn: 134443
2011-07-05 21:53:01 +00:00
Joerg Sonnenberger
8360e523cf
Hook up mipsel-netbsd and mipsel-freebsd for OS specific handling.
...
llvm-svn: 134425
2011-07-05 18:24:04 +00:00
Joerg Sonnenberger
d60cccfecc
Use OS-specific configuration for mips-netbsd and mips-freebsd.
...
llvm-svn: 134422
2011-07-05 18:05:54 +00:00
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
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
Michael J. Spencer
2fb548cc05
Cleanup and fix predefined macros for windows.
...
llvm-svn: 116988
2010-10-21 03:13:04 +00:00
Michael J. Spencer
a9e009e5bd
CodeGen: Fix long double on Windows using MSVC runtime.
...
llvm-svn: 116700
2010-10-18 07:11:10 +00:00
Michael J. Spencer
feb799c14b
Fix Whitespace.
...
llvm-svn: 116699
2010-10-18 07:10:59 +00:00
Chris Lattner
a09e8efd1f
Per discussion with Sanjiv, remove the PIC16 target from mainline. When/if
...
it comes back, it will be largely a rewrite, so keeping the old codebase
in tree isn't helping anyone.
llvm-svn: 116191
2010-10-11 05:44:49 +00:00
Cameron Esfahani
eb85650e67
Fix Windows64 target info so pointer arithmetic is done correctly, and no sign extension code is emitted: PtrDiffType needs to be a signed long long. Add a corresponding test case.
...
llvm-svn: 113910
2010-09-15 00:28:12 +00:00
Chris Lattner
04dc957260
Add support for windows x86-64 varargs, patch by Cameron Esfahani!
...
llvm-svn: 112603
2010-08-31 16:44:54 +00:00
Dale Johannesen
46742a4771
Add some missing X86-specific asm constraint letters, and fix
...
some bugs in setting allowsRegister on the ones there.
8348447.
llvm-svn: 111980
2010-08-24 22:33:12 +00:00
Eli Friedman
04831926ec
Detabify.
...
llvm-svn: 111768
2010-08-22 01:00:03 +00:00
John McCall
86353416a7
The ARM C++ ABI is sufficiently different from the Itanium C++ ABI that
...
it deserves its own enumerator. Obviously the implementations should
closely follow the Itanium ABI except in cases of divergence.
llvm-svn: 111749
2010-08-21 22:46:04 +00:00
Sebastian Redl
dd0087154a
Get rid of pretty non-ASCII quotes.
...
llvm-svn: 111316
2010-08-17 22:42:34 +00:00
Chris Lattner
b5050f3cd0
apparently msvc defines _STDCALL_SUPPORTED, so we should
...
too. Patch by Per Linden!
llvm-svn: 111236
2010-08-17 16:02:32 +00:00
Daniel Dunbar
9034aa36c7
ARM: Recognize single precision float register names.
...
- We don't recognize double or NEON register names yet -- we don't have the
infrastructure to generate the right clobbers for them.
llvm-svn: 110775
2010-08-11 02:17:20 +00:00
Daniel Dunbar
256e1f3ad0
ARM: Swap which registers we consider real / aliases to match LLVM and llvm-gcc.
...
llvm-svn: 110774
2010-08-11 02:17:11 +00:00
Douglas Gregor
7617cb8440
Define _INTEGRAL_MAX_BITS for the win32 and win64 targets, from Per Lindén!
...
llvm-svn: 110442
2010-08-06 12:37:52 +00:00
Chris Lattner
dc7ee3cd6b
fix the va_list definition for vc++64, patch by Cameron Esfahani!
...
llvm-svn: 110370
2010-08-05 20:04:20 +00:00
Bruno Cardoso Lopes
d81ef1c85c
Add -mavx and -mno-avx command line support
...
llvm-svn: 110265
2010-08-04 22:29:13 +00:00
Nate Begeman
45595cf99f
Catch thinko that Daniel Dunbar found.
...
llvm-svn: 109023
2010-07-21 18:11:42 +00:00
Nate Begeman
6e8865a150
Fix win64 compilation of constants like 0xFFFFFFFFFFFFFFFFULL
...
intmax_t is __int64 (long long to clang), per VS 2010 stdint.h
llvm-svn: 108980
2010-07-21 02:02:56 +00:00
Daniel Dunbar
6f2e839693
CodeGen/ObjC/NeXT: Fix Obj-C message send to match llvm-gcc when choosing
...
whether to use objc_msgSend_fpret; the choice is target dependent, not Obj-C ABI
dependent.
- <rdar://problem/8139758> arm objc _objc_msgSend_fpret bug
llvm-svn: 108379
2010-07-14 23:39:36 +00:00
John Thompson
ab71ead011
Revert 107953, remove comma ignoring from PPC constraints.
...
llvm-svn: 107956
2010-07-09 04:53:08 +00:00
John Thompson
7099f0c0d5
Updating PPC target to ignore commas in asm contrains, as apparently that is what gcc does.
...
llvm-svn: 107953
2010-07-09 02:01:40 +00:00
Chris Lattner
3e2ee147d0
add driver support for minix, patch by Kees van Reeuwijk
...
from PR7583
llvm-svn: 107788
2010-07-07 16:01:42 +00:00