summaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
Commit message (Collapse)AuthorAge
* Fix casting so there's no warning on Alpha.Reid Spencer2006-05-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28605 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR786:Reid Spencer2006-05-24
| | | | | | | | | Minor tweaks in public headers and a few .cpp files so that LLVM can build successfully with -pedantic and projects using LLVM with -pedantic don't get warnings from LLVM. There's still more -pedantic warnings to fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28453 91177308-0d34-0410-b5e6-96231b3b80d8
* Print struct return functions and calls as actually returning the hiddenChris Lattner2006-05-23
| | | | | | | | | argument struct pointer, enabling ABI compatibility for the CBE with platforms with strange struct-return ABIs. This fixes 252.eon and CoyoteBench/fftbench on Darwin/X86 among other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28442 91177308-0d34-0410-b5e6-96231b3b80d8
* Add checks for __OpenBSD__.Jeff Cohen2006-04-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27761 91177308-0d34-0410-b5e6-96231b3b80d8
* Modify how CBE handles #lines.Jim Laskey2006-03-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26990 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate IntrinsicLowering from TargetMachine.Chris Lattner2006-03-23
| | | | | | | Make the CBE and V9 backends create their own, since they're the only ones that use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26974 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle builtins that directly correspond to GCC builtins.Chris Lattner2006-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26737 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle the removal of the debug chain.Jim Laskey2006-03-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26729 91177308-0d34-0410-b5e6-96231b3b80d8
* Add #line support for CBE.Jim Laskey2006-03-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26621 91177308-0d34-0410-b5e6-96231b3b80d8
* Two things:Chris Lattner2006-03-07
| | | | | | | | | 1. Don't emit debug info, or other llvm.metadata to the .cbe.c file. 2. Mark static ctors/dtors as such, so that bugpoint works on C++ code compiled with the new CFE. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26602 91177308-0d34-0410-b5e6-96231b3b80d8
* Another hack due to allowing multiple symbols with the same name.Chris Lattner2006-02-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26150 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the C writer work with packed types. printContainedStructs isRobert Bocchino2006-01-20
| | | | | | | still not quite right and will be fixed later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25488 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify CWriter::printContainedStructs, also allowing it to work withChris Lattner2006-01-20
| | | | | | | PackedTypes as a side-effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25485 91177308-0d34-0410-b5e6-96231b3b80d8
* yet more C++ standards-compliance stuff.Duraid Madina2005-12-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25028 91177308-0d34-0410-b5e6-96231b3b80d8
* do not allow '.' in symbol namesChris Lattner2005-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24292 91177308-0d34-0410-b5e6-96231b3b80d8
* Call this method with the object we haveChris Lattner2005-11-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24279 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new option to indicate we want the code generator to emit code ↵Chris Lattner2005-11-08
| | | | | | quickly,not spending tons of time microoptimizing it. This is useful for an -O0style of build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24233 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a QOI issue noticed by Markus F.X.J. Oberhumer.Chris Lattner2005-11-02
| | | | | | | This fixes PR641 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24154 91177308-0d34-0410-b5e6-96231b3b80d8
* fix CBackend/2005-09-27-VolatileFuncPtr.llChris Lattner2005-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23475 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR618 and Regression/CodeGen/CBackend/2005-08-23-Fmod.ll by not emittingChris Lattner2005-08-23
| | | | | | | x%y for 'rem' on fp values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22984 91177308-0d34-0410-b5e6-96231b3b80d8
* Culling out use of unions for converting FP to bits and vice versa.Jim Laskey2005-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22838 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed PR#596:John Criswell2005-07-14
| | | | | | | | | Add parenthesis around the value being negated; that way, if the value begins with a minus sign (e.g. negative integer), we won't generate a C predecrement operator by mistake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22437 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the addPassesToEmitAssembly interface into a addPassesToEmitFileChris Lattner2005-06-25
| | | | | | | interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22282 91177308-0d34-0410-b5e6-96231b3b80d8
* If we support structs as va_list, we must pass pointers to them to va_copyAndrew Lenharth2005-06-22
| | | | | | | See last commit for LangRef, this implements it on all targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22273 91177308-0d34-0410-b5e6-96231b3b80d8
* core changes for varargsAndrew Lenharth2005-06-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22254 91177308-0d34-0410-b5e6-96231b3b80d8
* clean up the CBE output a bitChris Lattner2005-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21740 91177308-0d34-0410-b5e6-96231b3b80d8
* add tail marker as a commentChris Lattner2005-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21739 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespace, patch by Markus Oberhumer.Misha Brukman2005-04-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21379 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the 3 regressions last night, due to my buggy patch from yesterday.Chris Lattner2005-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20689 91177308-0d34-0410-b5e6-96231b3b80d8
* remove use of getPrev() and getNext() on ilist nodes.Chris Lattner2005-03-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20673 91177308-0d34-0410-b5e6-96231b3b80d8
* stop using arg_frontChris Lattner2005-03-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20599 91177308-0d34-0410-b5e6-96231b3b80d8
* stop using arg_backChris Lattner2005-03-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20598 91177308-0d34-0410-b5e6-96231b3b80d8
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-15
| | | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to remove all dead type names from the symbol table, not justChris Lattner2005-03-08
| | | | | | | | struct types. This fixes Regression/CodeGen/CBackend/2005-03-08-RecursiveTypeCrash.ll, a crash on Java output that Alkis reported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20519 91177308-0d34-0410-b5e6-96231b3b80d8
* Single characters should be printed out as chars, not strings.Misha Brukman2005-03-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20515 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify some code.Chris Lattner2005-03-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20471 91177308-0d34-0410-b5e6-96231b3b80d8
* Print -X like this:Chris Lattner2005-03-03
| | | | | | | | | | | | | | | double test(double l1_X) { return (-l1_X); } instead of like this: double test(double l1_X) { return (-0x0p+0 - l1_X); } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20423 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not lower malloc's to pass "sizeof" expressions like this:Chris Lattner2005-03-03
| | | | | | | | | | | | | ltmp_0_7 = malloc(((unsigned )(&(((signed char (*)[784])/*NULL*/0)[1u])))); Instead, just emit the literal constant, like this: ltmp_0_7 = malloc(784u); This works around a bug in ICC 8.1 compiling the CBE generated code. :-( git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20415 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove tabs from file.Chris Lattner2005-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20380 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support to the C backend for llvm.prefetch. Patch contributed byChris Lattner2005-02-28
| | | | | | | Justin Wick! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix volatile load/store of pointers. Consider this testcase:Chris Lattner2005-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | void %test(int** %P) { %A = volatile load int** %P ret void } void %test2(int*** %Q) { %P = load int*** %Q volatile store int** %P, int*** %Q ret void } instead of emitting: void test(int **l1_P) { int *l2_A; l2_A = (int **((volatile int **)l1_P)); return; } void test2(int ***l2_Q) { int **l1_P; l1_P = *l2_Q; *((volatile int ***)l2_Q) = l1_P; return; } ... which is loading/storing volatile pointers, not through volatile pointers, emit this (which is right): void test(int **l1_P) { int *l3_A; l3_A = *((int * volatile*)l1_P); return; } void test2(int ***l2_Q) { int **l1_P; l1_P = *l2_Q; *((int ** volatile*)l2_Q) = l1_P; return; } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20191 91177308-0d34-0410-b5e6-96231b3b80d8
* Write out single characters as chars, not strings.Misha Brukman2005-02-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20179 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement CodeGen/CBackend/2005-02-14-VolatileOperations.llChris Lattner2005-02-14
| | | | | | | Volatile loads and stores need to emit volatile pointer operations in C. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20177 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix hyphenation in output commentMisha Brukman2005-01-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19954 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix alloca support for Cygwin. On cygwin its __alloca not __builtin_allocaReid Spencer2005-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19776 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix CBE code so that it compiles with VC++.Jeff Cohen2005-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19303 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR490Chris Lattner2004-12-29
| | | | | | | Fix testcase CodeGen/CBackend/2004-12-28-LogicalConstantExprs.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19176 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR485, instead of emitting zero sized arrays, emit arrays of size 1.Chris Lattner2004-12-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18974 91177308-0d34-0410-b5e6-96231b3b80d8
* When generating code for X86 targets, make sure the fp control word is setChris Lattner2004-12-13
| | | | | | | to 64-bit precision, not 80 bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18915 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit correct prototype for __builtin_alloca on V8.Brian Gaeke2004-12-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18745 91177308-0d34-0410-b5e6-96231b3b80d8