Commit Graph

170 Commits

Author SHA1 Message Date
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