aboutsummaryrefslogtreecommitdiff
path: root/lib/Basic/TargetInfo.cpp
AgeCommit message (Collapse)Author
2009-07-01Fix for PR4192: fix the definition of int64_t on x86_64 Linux.Eli Friedman
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; git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@74583 91177308-0d34-0410-b5e6-96231b3b80d8
2009-06-05Move CharIsSigned from TargetInfo to LangOptions.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72928 91177308-0d34-0410-b5e6-96231b3b80d8
2009-05-06Fix rdar://6860124 - invalid input constraint 'J' in asmChris Lattner
This recognizes all the target-independent constant constraints that have target-specific meanings. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@71064 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26in a tied operand, don't copy over the name or constraint string, just the ↵Chris Lattner
flags. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70137 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26pull operands names "[foo]" into ConstraintInfo.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70136 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26pull the constraint string into the ConstraintInfo structChris Lattner
instead of passing it around in addition to it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70135 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-26change TargetInfo::ConstraintInfo to be a struct that containsChris Lattner
the enum along with some other data. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70114 91177308-0d34-0410-b5e6-96231b3b80d8
2009-04-19Add target property for whether thread-local storage is supported. Eli Friedman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69552 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-28TargetInfo::validateAsmConstraint now takes a reference to the full ↵Anders Carlsson
constraints string. This will make it possible to support multi-character constraints. No functionality change (for now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65696 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-13Give TargetInfo a new IntPtrType to hold the intptr_t type forChris Lattner
a target. Make Preprocessor.cpp define a new __INTPTR_TYPE__ macro based on this. On linux/32, set intptr_t to int, instead of long. This fixes PR3563. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-02-06simplify and refactor a bunch of type definition code in PreprocessorChris Lattner
predefines buffer initialization. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63919 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-27If an input constraint refers to an output constraint, it should have the ↵Anders Carlsson
same constraint info as the output constraint. Fixes PR3417 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@63127 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18Handle the 'X' constraint. Fixes <rdar://problem/6504897>.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62446 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-18Add sema support for symbolic names in inline asm statements.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62441 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17Allow targets to override IntMaxTWidthNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62434 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-17Change TargetInfo::validateInputConstraint to take begin/end name iterators ↵Anders Carlsson
instead of the number of outputs. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62433 91177308-0d34-0410-b5e6-96231b3b80d8
2009-01-12Make sure to initialize the ConstraintInfo to 0Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62068 91177308-0d34-0410-b5e6-96231b3b80d8
2008-11-02More fallout from r58501: primary fix is some more corrections to make Eli Friedman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58556 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31Fix a bug that was introduced in 58501. Ideally I think we should force all ↵Anders Carlsson
targets to set these values and not have defaults. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58511 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-31Made the mechanism of defining preprocessor defs for maxint, ptrdiff_t, wcharSanjiv Gupta
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@58501 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-05Implement PR2773, support for __USER_LABEL_PREFIX__Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57127 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-25Stop asserting in TargetInfo::validateInputConstraintDaniel Dunbar
- Sema gives a perfectively nice error message on invalid constraints. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55310 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-21First cut at OS detection, taking advantage of the new generic targets. Eli Friedman
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55091 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-18Allow targets to override description string.Sanjiv Gupta
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54914 91177308-0d34-0410-b5e6-96231b3b80d8
2008-08-11More #include cleaningDaniel Dunbar
- 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54632 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-20Some small changes to make the target info a bit more accurate.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51319 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09parameterize pointer size/align better without doing virtual method calls in ↵Chris Lattner
normal case. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50890 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09parameterize long long.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50887 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-09correctly parameterize long, patch by Nate.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50886 91177308-0d34-0410-b5e6-96231b3b80d8
2008-05-08Add basic support for the pic-* target triples and add support forChris Lattner
targets that do not support recursion (and thus codegen stack variables as globals). Patch contributed by Alireza Moshtaghi! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50844 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-24Have ValidateOutputConstraint return false instead of firing an assertionTed Kremenek
when processing a constraint we don't understand. This allows the frontend to gracefully fail. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@50213 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18Tabs -> spacesNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49909 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-18Initialize default double width and alignmentNate Begeman
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49899 91177308-0d34-0410-b5e6-96231b3b80d8
2008-04-06add a missing #includeChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49256 91177308-0d34-0410-b5e6-96231b3b80d8
2008-03-15Make a major restructuring of the clang tree: introduce a top-levelChris Lattner
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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@48402 91177308-0d34-0410-b5e6-96231b3b80d8