summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/Targets.cpp
Commit message (Collapse)AuthorAgeFilesLines
* More fallout from r58501: primary fix is some more corrections to make Eli Friedman2008-11-021-7/+18
| | | | | | | | | | | | | | | | | the types for size_t and ptrdiff_t more accurate. I think all of these are correct, but please compare the defines for __PTRDIFF_TYPE__ and __SIZE_TYPE__ to gcc to double-check; this particularly applies to those on BSD variants, since I'm not sure what they do here; I assume here that they're the same as on Linux. Fixes wchar_t to be "int", not "unsigned int" (which I think is correct on everything but Windows). Fixes ptrdiff_t to be "int" rather than "short" on PIC16; "short" is an somewhat strange choice because it normally gets promoted, and it's not consistent with the choice for size_t. llvm-svn: 58556
* Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wcharSanjiv Gupta2008-10-311-4/+10
| | | | | | | | | | etc more generic. For some targets, long may not be equal to pointer size. For example: PIC16 has int as i16, ptr as i16 but long as i32. Also fixed a few build warnings in assert() functions in CFRefCount.cpp, CGDecl.cpp, SemaDeclCXX.cpp and ParseDeclCXX.cpp. llvm-svn: 58501
* Fix the definition of __builtin_va_list on PPC, which was set to the V4 ABI, ↵Chris Lattner2008-10-271-2/+4
| | | | | | | | not the darwin or AIX abis. This fixes PR2904. llvm-svn: 58222
* Add basic FreeBSD target support, patch by Roman Divacky!Chris Lattner2008-10-161-0/+51
| | | | llvm-svn: 57645
* Add 'x' constraint character.Anders Carlsson2008-10-061-0/+1
| | | | llvm-svn: 57198
* Add the 'y' assembler constraint.Anders Carlsson2008-10-061-0/+1
| | | | llvm-svn: 57144
* miscellaneous cleanupsChris Lattner2008-10-051-22/+30
| | | | llvm-svn: 57140
* move __FLT_EVAL_METHOD__, __FLT_RADIX__, and __DECIMAL_DIG__ intoChris Lattner2008-10-051-14/+1
| | | | | | target indep code. llvm-svn: 57139
* it helps when I save the file before testing and committing.Chris Lattner2008-10-051-27/+1
| | | | llvm-svn: 57138
* suck the rest of the FP macros out of the targets into the PPChris Lattner2008-10-051-99/+9
| | | | llvm-svn: 57137
* start moving fp macros overChris Lattner2008-10-051-20/+0
| | | | llvm-svn: 57134
* move a bunch more integer sizing out of target-specific code intoChris Lattner2008-10-051-41/+1
| | | | | | | | | | target indep code. Note that this changes functionality on PIC16: it defines __INT_MAX__ correctly for it, and it changes sizeof(long) to 16-bits (to match the size of pointer). llvm-svn: 57132
* eliminate __USER_LABEL_PREFIX__ from the Targets.cpp file, start movingChris Lattner2008-10-051-16/+2
| | | | | | integer size #defines over to the Preprocessor. llvm-svn: 57130
* Handle minor version numbers in __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__Chris Lattner2008-09-301-7/+19
| | | | | | like "10.3.9" llvm-svn: 56873
* Add missing include for use of atoi.Nick Lewycky2008-09-301-0/+1
| | | | llvm-svn: 56836
* The definition of __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ followsChris Lattner2008-09-301-7/+21
| | | | | | | the target triple on darwin. For example i386-apple-darwin9 -> 1050 because darwin9 is "10.5". llvm-svn: 56826
* define __PASCAL_STRINGS__ whenever -fpascal-strings is enabled.Chris Lattner2008-09-301-4/+1
| | | | llvm-svn: 56824
* __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ is a darwin-specific #defineChris Lattner2008-09-301-1/+2
| | | | llvm-svn: 56822
* Add x86_64 Linux target.Daniel Dunbar2008-09-231-0/+16
| | | | | | - PR2824 llvm-svn: 56491
* Per PR2773, define __USER_LABEL_PREFIX__ for x86-32 Linux and Windows.Eli Friedman2008-09-061-0/+2
| | | | | | | | | | If you're on some other platform, the correct definition for this macro would be appreciated; to find the correct definition, just run the following command: echo | gcc -dM -E - | grep USER_LABEL_PREFIX llvm-svn: 55869
* Add dragonfly target support, patch by Sascha WildnerChris Lattner2008-08-231-0/+28
| | | | llvm-svn: 55241
* Add TargetInfo::useNeXTRuntimeAsDefaultDaniel Dunbar2008-08-231-0/+7
| | | | | | | | - Used to autoselect runtime when neither -fnext-runtime nor -fgnu-runtime is specified. - Default impl is false, all darwin targets set it to true. llvm-svn: 55231
* Remove duplicate define from Windows-x86 target.Eli Friedman2008-08-211-1/+0
| | | | llvm-svn: 55101
* Initial implementation of Windows x86 target; at the moment, the only Eli Friedman2008-08-211-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | difference from generic x86 is the defines. The rest is non-trivial to implement. I'm not planning on adding any more targets myself; if there are any targets anyone is currently using that are missing, feel free to add them, or ask me to add them. This concludes the work I'm planning for the TargetInfo implementations at the moment; all the other issues with TargetInfo require some API changes, and I haven't really thought it through. Some of the remaining issues: allowing targets to define size_t and wchar_t properly, adding some sort of __builtin_type_info intrinsic so we can finish clang's limits.h and float.h and get rid of a massive number of macro definitions, allowing target-specific command-line options, allowing target-specific defaults for certain command-line options like -fms-extensions, exposing vector alignment outside of the description string, exposing endianness outside of the description string, allowing targets to expose special bit-field layout requirements, exposing some sort of custom hook for call generation in CodeGen, and adding CPU selection to control defines like __SSE__. llvm-svn: 55098
* Add Linux x86-32 target.Eli Friedman2008-08-211-0/+26
| | | | llvm-svn: 55095
* First cut at OS detection, taking advantage of the new generic targets. Eli Friedman2008-08-211-13/+58
| | | | | | | | | | | | | This approach allows adding OS-specific targets/defines/etc. without completely breaking unknown subtargets. No new subtargets yet, although I plan to add x86-Linux soon. Others can add targets that they use as needed; adding a new subtarget takes very little code. Also does some fixups for description strings; a lot of them were unspecified. I think all the ones I added are correct, but they're unverified; corrections are welcome. llvm-svn: 55091
* Class reorg for PPC; shouldn't be any visible changes unless I messed Eli Friedman2008-08-201-190/+133
| | | | | | | | | up somehow. This concludes the series of reorg patches for the target implementations. llvm-svn: 55086
* Class reorg for ARM. Shouldn't be any visible changes.Eli Friedman2008-08-201-22/+27
| | | | llvm-svn: 55042
* Class hierarchy reorg for Sparc architecture. While I was there, I Eli Friedman2008-08-201-45/+43
| | | | | | | | cleaned it up a bit, including fixing the definition of va_list; this shouldn't break anything, but anyone using Sparc should watch for regressions. llvm-svn: 55041
* Reorganize the class hierarchy for x86 targets; shouldn't have any Eli Friedman2008-08-201-150/+140
| | | | | | | | | | visible effects, but this will significantly reduce the amount of boilerplate code necessary to add subtargets. If this looks okay, I'll do the rest of the processors (PPC, Sparc, ARM) soon. llvm-svn: 55036
* Fix PR2627, support for Q constraint.Chris Lattner2008-08-181-1/+2
| | | | llvm-svn: 54943
* Allow targets to override description string.Sanjiv Gupta2008-08-181-0/+1
| | | | llvm-svn: 54914
* Move some ObjC preprocessor definitions intoDaniel Dunbar2008-08-121-24/+0
| | | | | | | InitializePredefinedMacros(). - Also now properly wired to -fobjc-gc, -fnext-runtime. llvm-svn: 54661
* Add LangOptions::NeXTRuntime.Daniel Dunbar2008-08-111-1/+4
| | | | | | | | | - Wired to -fnext-runtime and -fgnu-runtime options. - Defaults to GNU, no autoselection for NeXT. Emit NeXT OBJC_IMAGE_INFO marker. llvm-svn: 54651
* More #include cleaningDaniel Dunbar2008-08-111-1/+0
| | | | | | | | | | | - Kill unnecessary #includes in .cpp files. This is an automatic sweep so some things removed are actually used, but happen to be included by a previous header. I tried to get rid of the obvious examples and this was the easiest way to trim the #includes in one fell swoop. - We now return to regularly scheduled development. llvm-svn: 54632
* Always define __SIZE_TYPE__ as long unsigned int.Anders Carlsson2008-07-221-2/+1
| | | | llvm-svn: 53922
* add x86 EDI register aliasNuno Lopes2008-07-071-0/+1
| | | | llvm-svn: 53170
* move the linux predefined macro definition to the TargetInfo, where it ↵Nuno Lopes2008-07-051-0/+5
| | | | | | really belongs llvm-svn: 53149
* Make the width and alignment for long double consistent with the Eli Friedman2008-06-041-2/+2
| | | | | | | | | hardcoded data layout in getTargetDescription. Hopefully fixes a test failure. Of course, this should be fixed properly, but that's a bigger fix. llvm-svn: 51948
* Make sure to define __sparc__ on Solaris; this should "fix" Eli Friedman2008-05-251-0/+1
| | | | | | test/Codegen/mandel.c on Solaris. :-) llvm-svn: 51554
* Missed an include.Eli Friedman2008-05-201-0/+1
| | | | llvm-svn: 51321
* Minor correction for PPC targets.Eli Friedman2008-05-201-1/+4
| | | | llvm-svn: 51320
* Some small changes to make the target info a bit more accurate.Eli Friedman2008-05-201-9/+22
| | | | llvm-svn: 51319
* set long/pointers to 64-bits on ppc64/x86-64Chris Lattner2008-05-091-2/+6
| | | | llvm-svn: 50891
* parameterize pointer size/align better without doing virtual method calls in ↵Chris Lattner2008-05-091-4/+2
| | | | | | normal case. llvm-svn: 50890
* Add basic support for the pic-* target triples and add support forChris Lattner2008-05-081-0/+33
| | | | | | | | | targets that do not support recursion (and thus codegen stack variables as globals). Patch contributed by Alireza Moshtaghi! llvm-svn: 50844
* Add some basic ARM asm constraintsNate Begeman2008-04-221-1/+10
| | | | llvm-svn: 50085
* Fix pasto, thanks to Anders for pointing this out.Chris Lattner2008-04-211-1/+1
| | | | llvm-svn: 50055
* add arm supportChris Lattner2008-04-211-0/+132
| | | | llvm-svn: 50049
* Make a major restructuring of the clang tree: introduce a top-levelChris Lattner2008-03-151-0/+757
lib dir and move all the libraries into it. This follows the main llvm tree, and allows the libraries to be built in parallel. The top level now enforces that all the libs are built before Driver, but we don't care what order the libs are built in. This speeds up parallel builds, particularly incremental ones. llvm-svn: 48402
OpenPOWER on IntegriCloud