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
Eric Christopher
17c7b89054
Translate numbers properly.
...
llvm-svn: 106873
2010-06-25 19:04:52 +00:00
John Thompson
ceebdf1fc6
Fixed another double-char in PPC-specific asm constraints.
...
llvm-svn: 106812
2010-06-25 00:02:05 +00:00
John Thompson
07a61a41c8
Added PPC-specific asm constraints, PS3 configuration changes.
...
llvm-svn: 106806
2010-06-24 22:44:13 +00:00
Eric Christopher
03256c32ff
More clang support for darwin tls. Add a __has_feature macro and
...
target specific preprocessor define as well.
llvm-svn: 106715
2010-06-24 02:02:00 +00:00
Charles Davis
95a546ee4d
Add an option to specify the target C++ ABI to the frontend. Use it to
...
select either the default Itanium ABI or the new, experimental Microsoft ABI.
llvm-svn: 105804
2010-06-11 01:06:47 +00:00
Rafael Espindola
ad8fed53ff
Create a LinuxTargetInfo on ARM. This make clang correctly expand
...
__USER_LABEL_PREFIX__.
llvm-svn: 105771
2010-06-10 00:46:51 +00:00
Anders Carlsson
851318a93a
On Darwin, initialization and destruction functions should go into the __StaticInit section.
...
llvm-svn: 105650
2010-06-08 22:47:50 +00:00
Rafael Espindola
e971b9a260
Correctly align large arrays in x86-64. This fixes PR5599.
...
llvm-svn: 105500
2010-06-04 23:15:27 +00:00
Daniel Dunbar
0e15c9aef6
Accept '#pragma options align=mac68k' on Darwin/PPC and Darwin/PPC64.
...
llvm-svn: 105116
2010-05-30 00:07:30 +00:00
John McCall
61d8258fa3
Roll back r104941.
...
llvm-svn: 104990
2010-05-28 18:25:28 +00:00
John McCall
2177a9b65a
Add a new attribute on records, __attribute__((adl_invisible)), and define
...
the x86-64 __va_list_tag with this attribute. The attribute causes the
affected type to behave like a fundamental type when considered by ADL.
(x86-64 is the only target we currently provide with a struct-based
__builtin_va_list)
Fixes PR6762.
llvm-svn: 104941
2010-05-28 08:20:36 +00:00
Daniel Dunbar
3eeeccd6e2
Darwin/ARM seems to support mac68k align as well.
...
llvm-svn: 104828
2010-05-27 07:00:26 +00:00
Daniel Dunbar
bd60652ace
Sema: Reject '#pragma options align=mac68k' everywhere except i386-apple-darwin.
...
llvm-svn: 104789
2010-05-27 00:35:16 +00:00
Chris Lattner
1a8f394a1f
david conrad points out that {|} in inline assembly on arm are not asm
...
variants. This fixes neon inline asm which my patch for PR6780 broke.
llvm-svn: 102181
2010-04-23 16:29:58 +00:00
Chris Lattner
8b29021712
another tweak for haiku support, patch by Paul Davey!
...
llvm-svn: 102098
2010-04-22 17:48:00 +00:00
Daniel Dunbar
f812506912
ARM/APCS: Don't respect bit-field types when laying out structures.
...
- This fixes the last known ABI issues with ARM/APCS.
- I've run the first 1k ABITests with '--no-unsigned --no-vector --no-complex'
on {armv6, armv7} x {-mno-thumb, -mthumb}, and the first 10k tests for armv7
-mthumb, for both function return types and single argument calls. These all
pass now (they failed horribly before without --no-bitfield).
llvm-svn: 102070
2010-04-22 16:14:54 +00:00
Douglas Gregor
3ecc665505
Sink the _GNU_SOURCE definition down into the target configuration,
...
and only define it where we know we need it---Linux and Cygwin. Thanks
to Chris for the prodding.
llvm-svn: 101989
2010-04-21 05:52:38 +00:00
Chris Lattner
b986aba6db
add haiku support, patch by Paul Davey!
...
llvm-svn: 100982
2010-04-11 19:29:39 +00:00
Eric Christopher
e1ddaf911b
Add option and macro definition for AES instructions. Now produces real
...
assembly for testcases.
llvm-svn: 100253
2010-04-02 23:50:19 +00:00
John Thompson
957816fbf3
PS3 needs __PPC__. Should this be in the PPC target?
...
llvm-svn: 99513
2010-03-25 16:18:32 +00:00
Nuno Lopes
4cbc8bd1bc
fix PR6584: __SSE3__ not defined with -mss3
...
llvm-svn: 98342
2010-03-12 10:20:09 +00:00
Chris Lattner
5178f56255
add mblaze target support, patch by Wesley Peck!
...
llvm-svn: 97890
2010-03-06 21:21:27 +00:00
Chris Lattner
09797543bd
add TCE target support, patch by Pekka J!
...
llvm-svn: 97746
2010-03-04 21:07:38 +00:00
Eric Christopher
cfeceffa27
Add in disabled case as well.
...
llvm-svn: 97716
2010-03-04 02:31:44 +00:00
Eric Christopher
399ffa55d2
Add in -msse4.1 and -msse4.2 options and continuing a rather
...
hacky solution for translating. Expanded on comment explaining
the hack a bit.
llvm-svn: 97714
2010-03-04 02:26:37 +00:00
Chris Lattner
5cc15e058b
add framework for ARM builtins, Patch by Edmund Grimley Evans!
...
llvm-svn: 97656
2010-03-03 19:03:45 +00:00
Eric Christopher
0b26a616eb
Add in some more MIPS command line options.
...
Patch by Oleksandr Tymoshenko!
llvm-svn: 97544
2010-03-02 02:41:08 +00:00
Chris Lattner
db5c16bc9c
add freebsd/ppc[64] support, patch by Nathan Whitehorn, PR6318
...
llvm-svn: 96362
2010-02-16 18:14:57 +00:00
Sanjiv Gupta
ecd2600c52
Re-applying 96173. Looks like finally I got the test case right.
...
llvm-svn: 96321
2010-02-16 03:37:11 +00:00
Sanjiv Gupta
9d23f93d52
reverting back 96242 as it still causes a test failure.
...
llvm-svn: 96244
2010-02-15 18:02:12 +00:00
Sanjiv Gupta
af56d377f1
Re-applying 96173 with corresponding changes in test.
...
llvm-svn: 96242
2010-02-15 17:19:13 +00:00
Chris Lattner
d0413848cc
temporarily revert 96173, it is causing test failures.
...
llvm-svn: 96176
2010-02-14 18:38:38 +00:00
Sanjiv Gupta
1ef8cdd29b
renamed pic16 specifiic macros.
...
llvm-svn: 96173
2010-02-14 18:20:18 +00:00
Daniel Dunbar
3241d400c8
Switch to using -fsjlj-exceptions instead of hard-coding it. Notably, this fixes
...
calls to the UnwindResumeOrRethrow function for C++/Obj-C exception handling,
for Darwin ARM.
llvm-svn: 95787
2010-02-10 18:49:11 +00:00
Chris Lattner
5b5d2db3f6
Don't explicitly force utf strings into the __TEXT,__ustring
...
by setting the section of the generated global. This is an
optimization done by the code generator, and the code being
removed didn't handle the case when the string contained an
embedded nul (which the code generator does correctly
handle). This is rdar://7589850
llvm-svn: 95003
2010-02-01 20:59:08 +00:00
Benjamin Kramer
31a68e70a5
Simplify FreeBSD version parsing.
...
llvm-svn: 94919
2010-01-30 19:55:01 +00:00
Anders Carlsson
0b0a122fde
StringRef-ize the TargetInfo::ConstraintInfo constructor.
...
llvm-svn: 94916
2010-01-30 18:33:31 +00:00
Anton Korobeynikov
cbc4e98381
Fix alignment for msp430 integer types.
...
llvm-svn: 94879
2010-01-30 12:55:11 +00:00
Daniel Dunbar
377dc2f91f
ARM/APCS: Fix alignment of long double.
...
llvm-svn: 94685
2010-01-27 20:23:08 +00:00
Anders Carlsson
e437c6870a
Add support for 3dnow and 3dnowa, and define the target macros accordingly. (This is needed in order to build Qt).
...
llvm-svn: 94658
2010-01-27 03:47:49 +00:00
Daniel Dunbar
d86666ffd7
Driver/Darwin: Stuff iPhoneOS into environment portion of the (llvm/clang) triple instead of keying off architecture. Also, fix version define to properly include the revision/micro component of the version number.
...
llvm-svn: 94487
2010-01-26 01:44:04 +00:00
Chandler Carruth
26b29a0892
Move the MacroBuilder utilitiy to its own header. Update references.
...
Comments and/or improvements to the documentation are welcome.
llvm-svn: 93982
2010-01-20 06:13:02 +00:00
Chandler Carruth
5b6d9265ba
Actually remove the include that r93974 made unnecessary.
...
llvm-svn: 93975
2010-01-20 04:09:11 +00:00
Anton Korobeynikov
6bedbf1039
long long is 64 bits on msp430
...
llvm-svn: 93451
2010-01-14 20:22:45 +00:00
Fariborz Jahanian
3f7b8b274d
Predefine __weak attribute when doing objective-c
...
rewriting for any target. (refixes radar 7530235).
llvm-svn: 93331
2010-01-13 18:51:17 +00:00
Fariborz Jahanian
42c06998ea
Define __weak attribute for objective-c pointers in
...
win32 targets. Fixes radar 7530235. Daniel please review.
llvm-svn: 93246
2010-01-12 18:33:57 +00:00
Benjamin Kramer
dc2f006f4e
Hopefully unbreak build with g++ >= 4.3.
...
llvm-svn: 93060
2010-01-09 18:20:57 +00:00
Benjamin Kramer
2d6fda3205
Use MacroBuilder for TargetDefines instead of std::vector.
...
llvm-svn: 93058
2010-01-09 17:55:51 +00:00
Chris Lattner
002ba6b4d0
improve support for dragonfly, patch by Sascha Wildner!
...
llvm-svn: 93044
2010-01-09 05:41:14 +00:00
Nuno Lopes
cfca1f0dc1
move a few more symbols to .rodata/.data.rel.ro
...
llvm-svn: 92012
2009-12-23 17:49:57 +00:00
Daniel Dunbar
42fe663e3b
ARM: Remove a FIXME, it's not actually more complicated than that.
...
llvm-svn: 91924
2009-12-22 21:59:17 +00:00
Daniel Dunbar
0def3d17cb
ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
...
- Correctly is in quotes, because we are following what I interpreted as GCC's
intent (which diverges from practice, naturally).
- Also, fix the arch define for arm1136jf-s.
llvm-svn: 91855
2009-12-21 23:28:17 +00:00
Daniel Dunbar
893d475ba8
ARM: Use front-end specific target features "soft-float" and "soft-float-abi" to communicate FP mode to target; __SOFTFP__ is set correctly now.
...
llvm-svn: 91755
2009-12-19 04:15:38 +00:00
Daniel Dunbar
7b245eda5e
Targets: Allow CreateTargetInfo to mutate the target features.
...
- In particular, it can claim features for itself instead of always passing them on to LLVM.
- This allows using the target features as a generic mechanism for passing target specific options to the TargetInfo instance, which may need them for initializing preprocessor defines, etc.
llvm-svn: 91753
2009-12-19 03:30:57 +00:00
Anton Korobeynikov
d7e4a095c9
Add f80 entry for windows targets
...
llvm-svn: 91746
2009-12-19 02:05:07 +00:00
Anton Korobeynikov
d94329a545
Use proper alignment for i16/i32 on msp430. This fixes PR5815.
...
llvm-svn: 91739
2009-12-19 01:32:37 +00:00
Daniel Dunbar
c454ecf9d0
ARM: Define __thumb2__ for V6T2 targets and only define
...
__USING_SJLJ_EXCEPTIONS__ on Darwin.
llvm-svn: 91705
2009-12-18 19:57:13 +00:00
Daniel Dunbar
acde99ea52
ARM: Fix predefines (__ARM_ARCH_..., __REGISTER_PREFIX).
...
- This should be done leveraging the backend, but I'm a little refactored
out. I'll fix it one day, I promise.
llvm-svn: 91700
2009-12-18 18:42:37 +00:00
John Thompson
6f8dba7f9e
Tweaks for PS3 target.
...
llvm-svn: 91685
2009-12-18 14:21:08 +00:00
Edward O'Callaghan
847f2a10ee
Add SigAtomicType to TargetInfo, Needed for MSP and PIC Targets, Credit to Ken Dyck.
...
llvm-svn: 89520
2009-11-21 00:49:54 +00:00
John Thompson
e467e19766
Added preliminary support step for PS3
...
llvm-svn: 89362
2009-11-19 17:18:50 +00:00
Daniel Dunbar
2208c57116
Eliminate TargetInfo::getDefaultLangOptions, this kind of logic is better done
...
in the driver.
llvm-svn: 89073
2009-11-17 09:15:44 +00:00
Daniel Dunbar
4656c53e12
Move -fnext-runtime defaulting to driver (and change clang-cc default to
...
-fnext-runtime), instead of using getDefaultLangOptions.
llvm-svn: 89058
2009-11-17 07:07:28 +00:00
Daniel Dunbar
0730e4f7e0
Move -fms-extensions defaulting to driver, instead of using getDefaultLangOptions.
...
llvm-svn: 89057
2009-11-17 07:06:20 +00:00
Daniel Dunbar
d609b7bbe9
Move char-is-signed defaulting to driver, instead of using
...
getDefaultLangOptions.
llvm-svn: 89053
2009-11-17 06:37:03 +00:00
Edward O'Callaghan
e9a58b10ad
Add MIPS support to Triple for Linux and the PSP. Credit to Bruno Cardoso Lopes.
...
llvm-svn: 88850
2009-11-15 10:22:07 +00:00
Daniel Dunbar
b9bbd54fdb
Add TargetOptions and use it when constructing targets.
...
- This ended up being hard to factor, sorry for the large diff.
- Some post-commit cleanup to come.
llvm-svn: 88833
2009-11-15 06:48:46 +00:00
Chris Lattner
0fb5bbd401
do not store wchar/char16/char32/intmax width/alignment info
...
into TargetInfo, just derive this based on the underlying type.
This prevents them from getting out of synch, patch by Ken Dyck!
llvm-svn: 86976
2009-11-12 08:04:33 +00:00
Daniel Dunbar
979586e755
Simplifiy target feature handling by coalescing all the logic into
...
InitializeCompileOptions.
llvm-svn: 86826
2009-11-11 09:38:56 +00:00
Chris Lattner
5c67237ff6
teach the various targets what native integer types they have.
...
llvm-svn: 86395
2009-11-07 18:59:41 +00:00
Sanjiv Gupta
84f0f776e9
Add a preprocessor define for adding a "near" section attribute for allowing
...
objects to be placed at shared memory.
llvm-svn: 85007
2009-10-24 18:08:20 +00:00
Edward O'Callaghan
9dda8e98d4
The AuroraUX toolchain has conflicting wchar_t between the system stdlib.h header and the clang stddef.h header where clang was defining as int where we use long.
...
llvm-svn: 84416
2009-10-18 13:33:59 +00:00
Anton Korobeynikov
051913bb86
Disallow arbitrary custom inline asm constraints for msp430.
...
llvm-svn: 84219
2009-10-15 23:17:13 +00:00
Chris Lattner
4f8a2e22c0
fix some cfstring related issues:
...
1) -fwritable-string does affect the non-utf16 version of cfstrings
just not the utf16 ones.
2) utf16 strings should always be marked constant, as the __TEXT segment
is readonly.
3) The name of the global doesn't matter, remove it from TargetInfo.
4) Trust the asmprinter to drop cstrings into the right section, like llvmgcc does now.
This fixes rdar://7115750
llvm-svn: 84077
2009-10-14 05:55:45 +00:00
Mike Stump
af9afe9bc9
"Someone pointed out that in my previous Targets.cpp patch I didn't
...
handle the long size difference for one of the Windows targets." Patch
by John Thompson.
llvm-svn: 83592
2009-10-08 23:00:00 +00:00
Cedric Venet
bc8d0dec5d
Handle Eli remark on mingw __declspec macro definition
...
llvm-svn: 82894
2009-09-27 10:09:11 +00:00
Daniel Dunbar
3e7a723fef
Factor Windows target into VS, MinGW and Cygwin variants.
...
- Patch by John Thompson!
llvm-svn: 82621
2009-09-23 07:31:35 +00:00
Chris Lattner
d545ad1301
implement support for __builtin_eh_return_data_regno on x86-32 and x86-64.
...
This implements PR5034 and rdar://6836445.
llvm-svn: 82614
2009-09-23 06:06:36 +00:00
Daniel Dunbar
03184798c3
Reconcile Clang/ARM target data string with llvm-gcc (module eabi weirdness).
...
llvm-svn: 82578
2009-09-22 21:44:58 +00:00
Mike Stump
faacf018a3
Fix typo.
...
llvm-svn: 82164
2009-09-17 21:15:00 +00:00
Daniel Dunbar
2f5c75e17d
ARM: Incremental improvement to preprocessor defines.
...
- Based on patch by Shantonu.
llvm-svn: 82147
2009-09-17 16:21:10 +00:00
Daniel Dunbar
1da76c4e58
Add ARM register names and aliases.
...
- Patch by Shantonu Sen!
<rdar://problem/6922650> clang doesn't know about ARM registers for inline asm clobber lists
llvm-svn: 82132
2009-09-17 07:03:19 +00:00
Chris Lattner
f7ff53d4d9
fix some ppc register name issues, patch by Richard Pennington!
...
llvm-svn: 82009
2009-09-16 05:05:27 +00:00
Daniel Dunbar
b4091a9c6a
Add TargetInfo::getABI(), and base ARM APCS vs AAPCS choice on that.
...
llvm-svn: 81735
2009-09-14 00:35:03 +00:00
Daniel Dunbar
125f8fb761
ARM target tweaks.
...
- Change TargetData string to match llvm-gcc.
- Some -target-abi support for 'apcs-gnu', most importantly the alignment of double and long long changes.
llvm-svn: 81732
2009-09-14 00:02:24 +00:00
Daniel Dunbar
33a004e9eb
Swizzle the target triple based on -mthumb, and update clang-cc to recognize
...
thumb-foo-bar as an ARM target.
llvm-svn: 81497
2009-09-11 01:14:50 +00:00
Mike Stump
11289f4280
Remove tabs, and whitespace cleanups.
...
llvm-svn: 81346
2009-09-09 15:08:12 +00:00
Daniel Dunbar
a77eaeb1e6
Add basic support for -pthread.
...
- Patch by David Chisnall, with PCH and Darwin support mixed in.
llvm-svn: 80883
2009-09-03 04:54:28 +00:00
Daniel Dunbar
576d90d39b
Remove TargetInfo::getTargetPrefix().
...
llvm-svn: 79907
2009-08-24 09:54:37 +00:00
Daniel Dunbar
40165180f7
Switch TargetInfo to store an llvm::Triple.
...
- Primarily to discourage clients form making decisions based on the string.
llvm-svn: 79901
2009-08-24 09:10:05 +00:00
Sanjiv Gupta
b841d1baa1
Issue an error if the user specifies parameters in a function marked as ISR.
...
llvm-svn: 79544
2009-08-20 17:48:52 +00:00
Eli Friedman
a9c3d71b59
Add TCE target to clang; patch by Mikael Lepistö.
...
llvm-svn: 79462
2009-08-19 20:47:07 +00:00
Daniel Dunbar
58bc48c14e
Switch to SmallString::str from SmallString::c_str.
...
- Several FIXMEs due to non-Twinification of IRBuilder.
llvm-svn: 79455
2009-08-19 20:04:03 +00:00
Daniel Dunbar
5232203234
Convert CreateTargetInfo to use a Triple instead of manul string munging.
...
- Patch by Yonggang Luo (with some formatting tweaks by Eli and myself).
llvm-svn: 79320
2009-08-18 05:47:58 +00:00
Jakob Stoklund Olesen
0de52f906d
Support compilation for the blackfin back-end
...
llvm-svn: 79271
2009-08-17 20:08:44 +00:00
Chris Lattner
859c37a5d9
use the new llvm::Triple parsing stuffola for handling darwin version #'s.
...
llvm-svn: 78794
2009-08-12 06:24:27 +00:00
Chris Lattner
30ba674391
fix a couple of problems with section attributes:
...
1. Passing something that isn't a string used to cause:
"argument to annotate attribute was not a string literal"
make it say "section attribute" instead.
2. Fix the location of the above message to point to the
bad argument instead of the section token.
3. Implement rdar://4341926, by diagnosing invalid section
specifiers in the frontend rather than letting them slip all
the way to the assembler (a QoI win).
An example of #3 is that we used to produce something like this:
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Expected comma after segment-name
/var/folders/n7/n7Yno9ihEm894640nJdSQU+++TI/-Tmp-//ccFPFGtT.s:2:Rest of line ignored. 1st junk character valued 46 (.).
Daniel improved clang to use llvm_report_error, so now we got:
$ clang t.c -c
fatal error: error in backend: Global variable 'x' has an invalid section specifier 'sadf': mach-o section specifier
requires a segment and section separated by a comma.
with no loc info. Now we get:
$ clang t.c -fsyntax-only
t.c:4:30: error: argument to 'section' attribute is not valid for this target: mach-o section specifier requires a segment
and section separated by a comma
int x __attribute__((section("sadf")));
^
which is nice :)
llvm-svn: 78586
2009-08-10 19:03:04 +00:00
Mike Stump
b0dd95d6d3
Add armv7 support.
...
llvm-svn: 78092
2009-08-04 19:48:52 +00:00
Anton Korobeynikov
b5b703b2f7
Hook in s390x stuff into clang
...
llvm-svn: 76099
2009-07-16 20:09:57 +00:00
Chris Lattner
3afa3e1d91
codegen string literals using private linkage now like llvm-gcc, eliminating
...
some target hooks.
llvm-svn: 75895
2009-07-16 05:03:48 +00:00
Chris Lattner
d1d820ed51
add netbsd support, patch by Krister Kalfridsson!
...
llvm-svn: 75492
2009-07-13 20:29:08 +00:00
Duncan Sands
9cb27e9c08
Correct FreeBSD target info, fixing PR4514.
...
Patch by Roman Divacky.
llvm-svn: 75003
2009-07-08 13:55:08 +00:00
Sanjiv Gupta
30f95ec27d
pic16 preproc defs.
...
llvm-svn: 74893
2009-07-07 04:42:23 +00:00
Eli Friedman
245f229df4
More tweaks to types for OpenBSD. Patch by Jonathan Gray.
...
llvm-svn: 74805
2009-07-05 22:31:18 +00:00
Eli Friedman
e3aa454e2f
Per PR4506, fix the type of size_t on OpenBSD.
...
llvm-svn: 74795
2009-07-05 18:47:56 +00:00
Eli Friedman
fb36b02591
Add an intermediate typedef for __builtin_va_tag to make it a bit easier
...
to deal with for AST pretty-printing/rewriting. Patch by Abramo
Bagnara.
llvm-svn: 74752
2009-07-03 00:45:06 +00:00
Douglas Gregor
c05d2a11d7
Two fixes to make Clang build on Visual C++ (again), from Alisdair Meredith.
...
llvm-svn: 74606
2009-07-01 15:12:53 +00:00
Eli Friedman
2857ccbaa7
Fix for PR4192: fix the definition of int64_t on x86_64 Linux.
...
Note that I'm guessing that *BSD and Solaris do the same thing as Linux
here, but it's quite possible I'm wrong; if the following testcase
gives an error on x86-64 with gcc for any of those operating systems, please
tell me:
#include <stdint.h>
int64_t x; long x;
llvm-svn: 74583
2009-07-01 03:36:11 +00:00
Torok Edwin
b2b37c62d0
Reapply r74532, and inherit from OSTargetInfo instead of from Target.
...
'make test' passes now.
llvm-svn: 74539
2009-06-30 17:10:35 +00:00
Torok Edwin
4e0541649b
Revert 74532 till I figure out why it breaks a bunch of tests.
...
llvm-svn: 74536
2009-06-30 17:00:25 +00:00
Torok Edwin
45d60b5bc3
Use templates instead of creating a new class for each OS/Target combination.
...
This unifies all the targets supported by an OS into a template.
It also cleans up the differences between the darwin targets.
Also __LP64__ wasn't needed for *BSD, since x86-64 target defines it anyway.
llvm-svn: 74532
2009-06-30 16:30:17 +00:00
Daniel Dunbar
86e35b3aba
Use true/false instead of 1/0.
...
llvm-svn: 74479
2009-06-29 23:58:47 +00:00
Daniel Dunbar
302ab13b1a
Don't define __KPRINTF_ATTRIBUTE__ unconditionally on OpenBSD.
...
llvm-svn: 74467
2009-06-29 22:45:37 +00:00
Daniel Dunbar
10de9e6602
OpenBSD support.
...
- Patch by Jonathan Gray!
llvm-svn: 74453
2009-06-29 20:52:51 +00:00
Bill Wendling
1835107ed0
Make the StackProtector bitfield use enums instead of obscure numbers.
...
llvm-svn: 74414
2009-06-28 23:01:01 +00:00
Bill Wendling
d63bbadbef
Add stack protector support to clang. This generates the 'ssp' and 'sspreq'
...
function attributes. There are predefined macros that are defined when stack
protectors are used: __SSP__=1 with -fstack-protector and __SSP_ALL__=2 with
-fstack-protector-all.
llvm-svn: 74405
2009-06-28 07:36:13 +00:00
Chris Lattner
46be2e1557
fix the type of wchar_t for windows, PR4417
...
llvm-svn: 74083
2009-06-24 17:12:15 +00:00
Chris Lattner
2fe5b26414
__APPLE_CC__ should only be set when building for darwin targets.
...
llvm-svn: 73934
2009-06-23 00:43:21 +00:00
Chris Lattner
5abdec7978
move the various builtins stuff from libast to libbasic. This
...
fixes a layering violation in lib/Basic/Targets.cpp.
llvm-svn: 73318
2009-06-14 01:05:48 +00:00
Daniel Dunbar
eed62b7c4b
Add stack alignment to x86_64 target data.
...
- <rdar://problem/6948443> WARNING: Linking two modules of different data
layouts!
llvm-svn: 73093
2009-06-08 22:39:13 +00:00
Eli Friedman
ebb9e4dc4d
Minor tweaks to the Windows target.
...
llvm-svn: 73083
2009-06-08 21:16:17 +00:00
Eli Friedman
cf432d3c7b
PR4346: add "R" asm register constraint.
...
llvm-svn: 73081
2009-06-08 20:45:44 +00:00
Eli Friedman
aa27a87ab3
Misc minor fixes for clang for the Windows target.
...
llvm-svn: 73050
2009-06-08 06:11:14 +00:00
Eli Friedman
9ffd4a9b96
Move CharIsSigned from TargetInfo to LangOptions.
...
llvm-svn: 72928
2009-06-05 07:05:05 +00:00
Eli Friedman
fd4b1559db
Move a couple Darwin-specific defines into getDarwinDefines.
...
llvm-svn: 72900
2009-06-04 23:00:29 +00:00
Eli Friedman
3d2c8fd3a6
Back out r72764; I should have looked more carefully before committing
...
this. The correct replacement for "Y" and "Yt" is "x".
llvm-svn: 72765
2009-06-03 10:41:42 +00:00
Eli Friedman
ffc8748faa
PR3678: Add support for "Yt" asm register constraint.
...
llvm-svn: 72764
2009-06-03 10:33:05 +00:00
Sanjiv Gupta
7c72007e2a
Add floating point details to PIC16 Target.
...
llvm-svn: 72713
2009-06-02 04:43:46 +00:00
Eli Friedman
20da71e3b6
Add a couple missing ARM defines.
...
llvm-svn: 72583
2009-05-29 19:00:15 +00:00
Eli Friedman
7942674be0
A few more tweaks for Solaris; please correct me if it's wrong somehow.
...
llvm-svn: 72240
2009-05-22 01:12:57 +00:00
Douglas Gregor
4871c4739d
Improve target support for Solaris.
...
llvm-svn: 72237
2009-05-21 23:51:30 +00:00
Eli Friedman
678d3bac03
Targets without long long should reduce the size of intmax_t
...
accordingly.
llvm-svn: 71966
2009-05-16 23:30:57 +00:00
Anton Korobeynikov
2f910827eb
Provide dummy va_list typedef for msp430
...
llvm-svn: 71233
2009-05-08 18:24:57 +00:00
Daniel Dunbar
f9d90275f9
Handle -march for the LLVM recognized cpu names.
...
- x86 target feature handling should not be feature complete, even if
the code quality is lacking.
llvm-svn: 71123
2009-05-06 21:56:32 +00:00
Daniel Dunbar
bb36aed06b
More x86 target feature support.
...
- Apologies for the extremely gross code duplication, I want to get
this working and then decide how to get this information out of the
back end.
- This replaces -m[no-]sse4[12] by -m[no-]sse4, it appears gcc
doesn't distinguish them?
- -msse, etc. now properly disable/enable related features.
- Don't always define __SSE3__...
- The main missing functionality bit here is that we don't initialize
the features based on the CPU for all -march options.
llvm-svn: 71117
2009-05-06 21:07:50 +00:00
Daniel Dunbar
e5ae096bf8
Tweak x86 -mcpu defaults.
...
- Default to yonah on Darwin (to get SSE3).
- Default to Pentium4 (32-bit) and x86-64 (64-bit) on
non-Darwin. Welcome to the 21st century.
llvm-svn: 71069
2009-05-06 04:58:14 +00:00
Daniel Dunbar
4dbaaa6f43
Improve handling of (X86) target features.
...
- This is a WIP...
- This adds -march= handling to the driver, and fixes the defaulting
of -mcpu on Darwin (which was using the wrong test).
Instead of handling -m{sse, ...} in the driver, pass them to clang-cc as
-target-feature [+-]name
In clang-cc, communicate with the (clang) target to discover the legal
features of a target, and the features which are enabled based on
-mcpu. This is currently hardcoded just enough to not be a feature
regression, we need to get this information from the backend's
TableGen information somehow.
This is used to construct the full list of features which are being
used, which is in turn used to initialize the predefines.
llvm-svn: 71061
2009-05-06 03:16:41 +00:00
Anton Korobeynikov
a0f5437c03
Hook msp430 in
...
llvm-svn: 70774
2009-05-03 13:43:08 +00:00
Anton Korobeynikov
9d026dd985
Whitespace cleanup
...
llvm-svn: 70773
2009-05-03 13:42:53 +00:00
Chris Lattner
d9725f7041
change TargetInfo::ConstraintInfo to be a struct that contains
...
the enum along with some other data.
llvm-svn: 70114
2009-04-26 07:16:29 +00:00
Chris Lattner
0dc102624f
some arm triples have weird characters in them, just fuzzy match
...
on armv* to be more compatible
llvm-svn: 69864
2009-04-23 04:22:04 +00:00
Sanjiv Gupta
4c5dfd3c45
Pass and return aggregate types directly to function calls.
...
llvm-svn: 69668
2009-04-21 06:01:16 +00:00
Eli Friedman
d88c8a104f
Add target property for whether thread-local storage is supported.
...
Let me know if I messed up for some target. Note that for Windows, we
should be able to support it (MSVC supports "__declspec(thread)"), but
I'm pretty sure LLVM doesn't know how to generate the correct code.
llvm-svn: 69552
2009-04-19 21:38:35 +00:00
Chris Lattner
6df41af7fb
actually just do this on all x86 targets, it won't hurt
...
non-glibc ones.
llvm-svn: 69528
2009-04-19 17:32:33 +00:00
Chris Lattner
4997b8ef98
Define __NO_MATH_INLINES on linux/x86 so that we don't get inline
...
functions in glibc header files that use FP Stack inline asm which the
backend can't deal with (PR879).
This "fixes" PR3970 for linux. Other affected systems should do similar
things. Maybe this should just go to the general i386/x86-64 sections?
llvm-svn: 69527
2009-04-19 17:29:50 +00:00
Daniel Dunbar
497ff13243
Support -miphoneos-version-min in clang-cc.
...
- Patch by Shantonu Sen (with a minor tweak to split out
getDarwin{OSX,IPhoneOS}Defines)!
- <rdar://problem/6776277> Need clang-cc/ccc-analyzer support for
-miphoneos-version-min
llvm-svn: 68815
2009-04-10 19:52:24 +00:00
Chris Lattner
8bc98d9bed
remove fixme!
...
llvm-svn: 68589
2009-04-08 03:47:39 +00:00
Mike Stump
9d54bd77c0
Add basic support for arm static analysis checking. Radar 6699395
...
llvm-svn: 68582
2009-04-08 02:07:04 +00:00
Chris Lattner
2a5c0a3688
Fariborz points out that weak is now defined to the attribute even
...
in C mode.
llvm-svn: 68520
2009-04-07 16:50:40 +00:00
Chris Lattner
c2d140156c
The __weak and __strong defines are common to all darwin targets
...
and are even set in C mode. As such, move them to Targets.cpp.
__OBJC_GC__ is also darwin specific, but seems reasonable to always
define it when in objc-gc mode.
This fixes rdar://6761450
llvm-svn: 68494
2009-04-07 04:48:21 +00:00
Anton Korobeynikov
6953ef2de3
Provide sema proper values of maximal number of arguments passed in registers.
...
llvm-svn: 68413
2009-04-03 23:38:25 +00:00
Daniel Dunbar
fd6cfcffa2
Add target hook for setting symbol prefix and section of unicode
...
string literals.
llvm-svn: 68363
2009-04-03 00:57:44 +00:00
Daniel Dunbar
08b216abf1
Add Target hooks for IRgen of [cf]string literals.
...
- Notably, set section on cfstring literal string data (for now, this
is done everywhere because it matches what we were already doing
for the CFString data itself)
- <rdar://problem/6599098> [irgen] linker requires objc string data
to go into cstring
llvm-svn: 68160
2009-03-31 23:42:16 +00:00
Eli Friedman
32ca82a450
Fix the default for intptr_t on *BSD x86-32 and Windows. Slight cleanup
...
by moving the general case to the generic x86-32 target.
llvm-svn: 68015
2009-03-29 20:31:09 +00:00
Daniel Dunbar
c53305fd42
Ad FreeBSD ARM target info.
...
- Patch by Ed Schoeten!
llvm-svn: 67527
2009-03-23 16:09:04 +00:00
Chris Lattner
1e1c0b9fd3
refactor some code, fixing a problem discovered by the dragonfly bsd people, where
...
clang was defining "i386" even when in non-gnu mode.
llvm-svn: 67378
2009-03-20 16:06:38 +00:00
Chris Lattner
a1321f1632
pass langoptions around.
...
llvm-svn: 67376
2009-03-20 15:55:34 +00:00
Chris Lattner
4ba73aa0c2
pass LangOptions into TargetInfo::getTargetDefines, so that targets
...
can have language-specific defines.
llvm-svn: 67375
2009-03-20 15:52:06 +00:00
Chris Lattner
5c3529634a
implement support for propagating *features* down to the code generator
...
and defining target-specific macros based on them (like __SSE3__ and
friends). After extensive discussion with Daniel, this work will need
driver support, which will translate things like -msse3 into a -mattr
feature. Until this work is done, the code in clang.cpp is disabled and
the X86TargetInfo ctor still defaults to SSE2. With these two things
changed, this code will work. PR3634
llvm-svn: 65966
2009-03-03 19:56:18 +00:00