Chandler Carruth
5ac1e8e6b1
Begin fixing Clang's predefined macros for various architectures. This
...
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.
llvm-svn: 140673
2011-09-28 02:59:25 +00:00
David Blaikie
9c902b5502
Rename Diagnostic to DiagnosticsEngine as per issue 5397
...
llvm-svn: 140478
2011-09-25 23:23:43 +00:00
David Blaikie
76bd3c80d4
Fix missing includes for llvm_unreachable
...
llvm-svn: 140368
2011-09-23 05:35:21 +00:00
David Blaikie
83d382b1ca
Switch assert(0/false) llvm_unreachable.
...
llvm-svn: 140367
2011-09-23 05:06:16 +00:00
Justin Holewinski
0542df5198
PTX: Clean up target options code
...
llvm-svn: 140320
2011-09-22 17:57:40 +00:00
Akira Hatanaka
bef1745c9c
Define Mips64 TargetInfo classes.
...
llvm-svn: 140174
2011-09-20 19:21:49 +00:00
Akira Hatanaka
f6da331e15
Clean up TargetInfo class hierarchy. Define a base class from which TargetInfos
...
of Mips32 big and little endian derive.
llvm-svn: 140170
2011-09-20 19:00:23 +00:00
Ivan Krasin
96a806199d
Clarify PNaCl target characteristics: set LongDoubleWidth, PtrDiffType, 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!
llvm-svn: 140144
2011-09-20 14:56:54 +00:00
Francois Pichet
0706d203cf
Rename LangOptions::Microsoft to LangOptions::MicrosoftExt to make it clear 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.
llvm-svn: 139987
2011-09-17 17:15:52 +00:00
Justin Holewinski
aa78b235a5
PTX: Define target options
...
llvm-svn: 139789
2011-09-15 12:13:38 +00:00
Akira Hatanaka
f0bbc1c8fd
Add comment.
...
llvm-svn: 139700
2011-09-14 17:24:05 +00:00
Akira Hatanaka
66f6b096f8
O64 will not be supported.
...
llvm-svn: 139655
2011-09-13 22:47:52 +00:00
Akira Hatanaka
58ad90fa68
mips*-*-psp is no longer supported as a target.
...
llvm-svn: 139654
2011-09-13 22:46:13 +00:00
Douglas Gregor
79a91418bd
Switch LangOptions over to a .def file that describes header of the
...
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.
llvm-svn: 139605
2011-09-13 17:21:33 +00:00
Ivan Krasin
69a990badb
Clang/PNaCl: Improve test coverage for PNaClTargetInfo (type aligns), fixes 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).
llvm-svn: 138775
2011-08-29 22:39:12 +00:00
Ivan Krasin
9b2cbdfcff
PNaClTargetInfo: add __ELF__, _REENTRANT and _GNU_SOURCE defines and update the test
...
llvm-svn: 138607
2011-08-25 23:49:20 +00:00
Ivan Krasin
7a09d12242
Follow up to r138470 (Add PNaCl TargetInfo). I've occasionally submitted wrong patch.
...
llvm-svn: 138489
2011-08-24 21:22:25 +00:00
Ivan Krasin
dd7403e612
Add PNaCl TargetInfo.
...
llvm-svn: 138470
2011-08-24 20:22:22 +00:00
Bruno Cardoso Lopes
bf9246d1f0
"-mavx" should also enable all other SSE levels.
...
llvm-svn: 137905
2011-08-18 00:07:03 +00:00
Chad Rosier
a336c6f380
Additional comments and whitespace.
...
llvm-svn: 136892
2011-08-04 17:52:43 +00:00
Chad Rosier
18903ee2d3
Add partial support for using anonymous bitfields (e.g., int : 0) to enforce
...
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
llvm-svn: 136858
2011-08-04 01:21:14 +00:00
Benjamin Kramer
558e37858b
Remove dead code flagged by GCC's -Wunused-but-set-variable.
...
llvm-svn: 136581
2011-07-31 01:06:41 +00:00
Eric Christopher
b081ba651c
Add support for the 'Q' arm memory constraint.
...
Fixes rdar://9866494
llvm-svn: 136524
2011-07-29 21:20:35 +00:00
Chad Rosier
99ee7829ff
After further discussion it has been determined that alignof should report
...
the preferred alignment. Thus, revert r135934, r135935, and r135940.
llvm-svn: 136062
2011-07-26 07:03:04 +00:00
Chad Rosier
b23ee96cd5
Allow target to specify about using minimum alignment vs preferred. Takes care of
...
FIXME: Override "preferred align" for double and long long for ARM apcs-gnu ABI.
Also part of rdar://9802874
llvm-svn: 135940
2011-07-25 19:39:39 +00:00
Chris Lattner
0e62c1cc0b
remove unneeded llvm:: namespace qualifiers on some core types now that LLVM.h imports
...
them into the clang namespace.
llvm-svn: 135852
2011-07-23 10:55:15 +00:00
Bruno Cardoso Lopes
3aa2f0a064
Define the _MIPS_SIM builtin macro on MIPS platforms. Patch by Robert Millan!
...
llvm-svn: 135675
2011-07-21 15:10:57 +00:00
Chad Rosier
b90e40256c
Refactor r135502 to avoid an empty if else condition, per Eric's suggestion (good call!).
...
llvm-svn: 135510
2011-07-19 20:00:06 +00:00
Chad Rosier
dcf7732065
Clang asserts "Invalid environment!" when using -ccc-host-triple
...
arch-pc-win32-macho (e.g., x86_64-pc-win32-macho), which appears to be a false
positive.
rdar://9786307
llvm-svn: 135502
2011-07-19 19:36:03 +00:00
Chris Lattner
2dc4b55bd8
simplify
...
llvm-svn: 135170
2011-07-14 18:45:41 +00:00
Chris Lattner
d386df4dbd
StringMap::first() is about to start returning a StringRef, adapt.
...
llvm-svn: 135166
2011-07-14 18:24:21 +00:00
Bruno Cardoso Lopes
3472838c7a
Disable avx feature from corei7-avx, and use -mavx for now. Right now, if -mavx is
...
specified, 128 avx code is used and we're not sure yet if this the behavior
we want (and if it does, some improvements are needed before relying on it).
llvm-svn: 134939
2011-07-11 23:33:46 +00:00
Bruno Cardoso Lopes
571419bae6
Enable "avx" feature, so it can be seen by llvm
...
llvm-svn: 134935
2011-07-11 22:50:13 +00:00
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