summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
Commit message (Collapse)AuthorAgeFilesLines
...
* For PR645:Reid Spencer2007-01-261-3/+0
| | | | | | | Remove the Function::renameLocalSymbols function as it is no longer needed. llvm-svn: 33522
* Fix SMG2000 with the CBE: opaque types need names too.Chris Lattner2007-01-161-10/+8
| | | | llvm-svn: 33258
* Fix PR918 by only using typedefs to name struct types. This makes the laterChris Lattner2007-01-161-8/+15
| | | | | | | | | type ordering stuff work better. This fixes PR918 and CodeGen/CBackend/2007-01-15-NamedArrayType.ll Patch by Gordon Henriksen. llvm-svn: 33254
* rename Type::isIntegral to Type::isInteger, eliminating the old Type::isInteger.Chris Lattner2007-01-151-7/+7
| | | | | | | | | rename Type::getIntegralTypeMask to Type::getIntegerTypeMask. This makes naming much more consistent. For example, there are now no longer any instances of IntegerType that are not considered isInteger! :) llvm-svn: 33225
* Make use of isInteger vs isIntegral more explicitChris Lattner2007-01-151-4/+4
| | | | llvm-svn: 33216
* remove obsolete fixmeChris Lattner2007-01-121-3/+0
| | | | llvm-svn: 33151
* * PIC codegen for X86/Linux has been implementedAnton Korobeynikov2007-01-121-0/+12
| | | | | | | | * PIC-aware internal structures in X86 Codegen have been refactored * Visibility (default/weak) has been added * Docs fixes (external weak linkage, visibility, formatting) llvm-svn: 33136
* For PR1064:Reid Spencer2007-01-121-31/+43
| | | | | | | | | | | | | | | | | | | | | | | Implement the arbitrary bit-width integer feature. The feature allows integers of any bitwidth (up to 64) to be defined instead of just 1, 8, 16, 32, and 64 bit integers. This change does several things: 1. Introduces a new Derived Type, IntegerType, to represent the number of bits in an integer. The Type classes SubclassData field is used to store the number of bits. This allows 2^23 bits in an integer type. 2. Removes the five integer Type::TypeID values for the 1, 8, 16, 32 and 64-bit integers. These are replaced with just IntegerType which is not a primitive any more. 3. Adjust the rest of LLVM to account for this change. Note that while this incremental change lays the foundation for arbitrary bit-width integers, LLVM has not yet been converted to actually deal with them in any significant way. Most optimization passes, for example, will still only deal with the byte-width integer types. Future increments will rectify this situation. llvm-svn: 33113
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-1/+1
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-6/+6
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-14/+13
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* Change the file header name as this file was renamed.Reid Spencer2007-01-101-1/+1
| | | | llvm-svn: 33051
* Rename Writer.cpp as CBackend.cpp so it doesn't conflict with Writer.cppReid Spencer2007-01-101-0/+0
| | | | | | in the bytecode writer library. This helps with debugging. llvm-svn: 33050
* For PR1099:Reid Spencer2007-01-091-33/+33
| | | | | | | | | | | Invert the "isSigned" logic in calls to printType and printPrimitiveType. We want variables to be declared unsigned by default so that signless operators like + and - perform the unsigned operation that LLVM expects by default. Parameters with the sext attribute will be declared signed and signed instructions will case operand values to signed regardless of the type of the variable. This passes all tests and fixes PR1099. llvm-svn: 33039
* For PR1099:Reid Spencer2007-01-091-8/+9
| | | | | | | | | | | | | | | Partial fix for this PR. Default function parameters to signed integer, just like everything else in CBE. The bug was caused by incorrectly introducing parameter attributes feature by choosing "signed" parameter if the SExtAttribute was specified. Howeer, if no attribute is specified, this causes it to become unsigned which is incorrect. Reversing the logic so that signedness is detected by "not ZExtAttribute" set fixes the issue. This fixes 197.parser but there is more to do. Any comparison and possibly other operators involving arguments may need to correctly cast the parameter before its use, depending on the sign of the operator. llvm-svn: 33034
* For PR1090:Reid Spencer2007-01-081-28/+31
| | | | | | | | | | | Clean up the definitions of the helper functions per Chris' review suggestions so they are easier to read. For PR1091: Print minimum signed integer values as unsigned so that we get no warnings from the C compiler about constant ranges and value comparisons. llvm-svn: 33010
* Fix PR1090:Reid Spencer2007-01-081-42/+98
| | | | | | | | | Implemented some llvm_fcmp_{pred} functions at the start of the function bodies and use them for fcmp instructions and constant expressions. These help implement the ordered and unordered comparisons necessary for correct exectuion of these comparisons. llvm-svn: 33007
* For PR1086:Reid Spencer2007-01-071-30/+54
| | | | | | | Parameter attributes do have to be specially handled in the CBE. Implement their handling. llvm-svn: 32976
* For PR411:Reid Spencer2007-01-061-11/+12
| | | | | | | | | Take an incremental step towards type plane elimination. This change separates types from values in the symbol tables by finally making use of the TypeSymbolTable class. This yields more natural interfaces for dealing with types and unclutters the SymbolTable class. llvm-svn: 32956
* For PR950:Reid Spencer2006-12-311-56/+16
| | | | | | | | | | | | | | | | | | Three changes: 1. Convert signed integer types to signless versions. 2. Implement the @sext and @zext parameter attributes. Previously the type of an function parameter was used to determine whether it should be sign extended or zero extended before the call. This information is now communicated via the function type's parameter attributes. 3. The interface to LowerCallTo had to be changed in order to accommodate the parameter attribute information. Although it would have been convenient to pass in the FunctionType itself, there isn't always one present in the caller. Consequently, a signedness indication for the result type and for each parameter was provided for in the interface to this method. All implementations were changed to make the adjustment necessary. llvm-svn: 32788
* For PR950:Reid Spencer2006-12-232-114/+289
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Use a predicate function to identify bitcast of fp and integer instead ofReid Spencer2006-12-171-11/+11
| | | | | | repeating the logic in two different parts of the code. llvm-svn: 32643
* Fix PR1058:Reid Spencer2006-12-171-8/+13
| | | | | | | | Generate the BITCAST_TEMPORARY regardless of the uses or inlinability of the instruction. This temporary is needed to perform the instruction, not provide storage for its results. llvm-svn: 32642
* Change inferred getCast into specific getCast. Passes all tests.Reid Spencer2006-12-121-2/+2
| | | | llvm-svn: 32469
* Fix the BitCastUnion type for 32-bit targets.Reid Spencer2006-12-121-6/+6
| | | | llvm-svn: 32453
* Implement correct bitcast of int<->float and long<->double by using aReid Spencer2006-12-111-14/+58
| | | | | | union to perform the bitcast. llvm-svn: 32444
* Cleaned setjmp/longjmp lowering interfaces. Now we're producing rightAnton Korobeynikov2006-12-101-6/+2
| | | | | | | code (both asm & cbe) for Mingw32 target. Removed autoconf checks for underscored versions of setjmp/longjmp. llvm-svn: 32415
* Don't use <sstream> in Streams.h but <iosfwd> instead.Bill Wendling2006-12-071-1/+1
| | | | llvm-svn: 32340
* What should be the last unnecessary <iostream>s in the library.Bill Wendling2006-12-071-11/+9
| | | | llvm-svn: 32333
* Always pass "true" to isMaxValue(bool) because we know the type is LongTy.Reid Spencer2006-12-061-1/+1
| | | | llvm-svn: 32290
* Adjust to new ConstantIntegral interface for Max/Min tests.Reid Spencer2006-12-061-1/+1
| | | | llvm-svn: 32289
* Introducing external weak linkage. Darwin codegen should be added later.Anton Korobeynikov2006-12-011-4/+11
| | | | llvm-svn: 32052
* gcc doesn't like an empty colbber listAndrew Lenharth2006-11-281-1/+3
| | | | llvm-svn: 31987
* Make identity default, and fix PR1020Andrew Lenharth2006-11-281-7/+3
| | | | llvm-svn: 31979
* update commentsAndrew Lenharth2006-11-281-2/+4
| | | | llvm-svn: 31975
* Get the asminfo for the target most closely matching the module and use that ↵Andrew Lenharth2006-11-281-28/+26
| | | | | | for inline asm llvm-svn: 31974
* Preliminary support for inline asm in the cbe. The target specific uglinessAndrew Lenharth2006-11-271-2/+164
| | | | | | | | | | is still in Writer, but issolated to a single function. This might be split into something in each target directory. This is sufficient to get through archie and an strcpy impl on linux-x86. Module level asm is not handled. llvm-svn: 31948
* When truncating to bool, it is necessary to & with 1 for all casts thatReid Spencer2006-11-271-3/+10
| | | | | | | can result in a bool. Previously PtrToInt, FPToUI and FPToSI were missing this operation. llvm-svn: 31938
* For PR950:Reid Spencer2006-11-271-28/+123
| | | | | | | | | | The long awaited CAST patch. This introduces 12 new instructions into LLVM to replace the cast instruction. Corresponding changes throughout LLVM are provided. This passes llvm-test, llvm/test, and SPEC CPUINT2000 with the exception of 175.vpr which fails only on a slight floating point output difference. llvm-svn: 31931
* Simplify IntrinsicLowering and clarify that it is only for use by theChris Lattner2006-11-151-1/+1
| | | | | | CBE and interpreter. llvm-svn: 31755
* For PR950:Reid Spencer2006-11-081-17/+24
| | | | | | | | This patch converts the old SHR instruction into two instructions, AShr (Arithmetic) and LShr (Logical). The Shr instructions now are not dependent on the sign of their operands. llvm-svn: 31542
* Fix a bug in the last patch and convert to && instead of & for logical expr.Reid Spencer2006-11-051-2/+2
| | | | llvm-svn: 31463
* Implement the -enabled-cbe-printf-a feature.Reid Spencer2006-11-051-2/+2
| | | | llvm-svn: 31462
* Make CBackend -pedantic clean.Reid Spencer2006-11-031-2/+1
| | | | llvm-svn: 31388
* For PR786:Reid Spencer2006-11-021-2/+2
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* For PR950:Reid Spencer2006-11-021-10/+28
| | | | | | Replace the REM instruction with UREM, SREM and FREM. llvm-svn: 31369
* Enclose a case in { and } so that the pickier compilers don't complain.Reid Spencer2006-10-261-0/+2
| | | | llvm-svn: 31196
* For PR950:Reid Spencer2006-10-261-7/+161
| | | | | | | | Make necessary changes to support DIV -> [SUF]Div. This changes llvm to have three division instructions: signed, unsigned, floating point. The bytecode and assembler are bacwards compatible, however. llvm-svn: 31195
* Don't generate a prototype for _setjmp. At least on Linux, this functionReid Spencer2006-10-221-2/+2
| | | | | | | | has a different prototype than the one #included from <setjmp.h>. This patch fixes siod and a number of other test cases on Linux that were failing the CBE because of this _setjmp issue. llvm-svn: 31112
* For PR950:Reid Spencer2006-10-201-11/+11
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
OpenPOWER on IntegriCloud