aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add a missing dependencyChris Lattner2004-10-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17031 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix file headerChris Lattner2004-10-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17030 91177308-0d34-0410-b5e6-96231b3b80d8
* Be more careful about looking for constants when we really want constantint's.Chris Lattner2004-10-161-10/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17029 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the implementation of the instructions clone methods to this file soChris Lattner2004-10-151-0/+30
| | | | | | | | that the vtables for these classes are only instantiated in this translation unit, not in every xlation unit they are used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17026 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no reason not to build these in parallelChris Lattner2004-10-151-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17023 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a space between the type and name of value when printing error messageMisha Brukman2004-10-151-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17022 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print a bunch of metrics that are meaningless for external functionsChris Lattner2004-10-151-17/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17017 91177308-0d34-0410-b5e6-96231b3b80d8
* Instruction select globals with offsets better. For example, on this testChris Lattner2004-10-151-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | case: int C[100]; int foo() { return C[4]; } We now codegen: foo: mov %EAX, DWORD PTR [C + 16] ret instead of: foo: mov %EAX, OFFSET C mov %EAX, DWORD PTR [%EAX + 16] ret Other impressive features may be coming later. This patch is contributed by Jeff Cohen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17011 91177308-0d34-0410-b5e6-96231b3b80d8
* Give the X86 JIT the ability to encode global+disp constants. PatchChris Lattner2004-10-151-27/+54
| | | | | | | contributed by Jeff Cohen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17010 91177308-0d34-0410-b5e6-96231b3b80d8
* Give the X86 asm printer the ability to print out addressing modes that haveChris Lattner2004-10-151-25/+53
| | | | | | | constant displacements from global variables. Patch by Jeff Cohen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17009 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow X86 addressing modes to represent globals with offsets. Patch contributedChris Lattner2004-10-151-5/+10
| | | | | | | by Jeff Cohen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17008 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow machine operands to represent global variables with offsets. This isChris Lattner2004-10-151-5/+9
| | | | | | | | | | | | | | | | | | useful when you have a reference like: int A[100]; void foo() { A[10] = 1; } In this case, &A[10] is a single constant and should be treated as such. Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no other operand type is. This is another fine patch contributed by Jeff Cohen!! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17007 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch fixes the nasty bug that caused 175.vpr to fail for X86 last night.Chris Lattner2004-10-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The problem occurred when trying to reload this instruction: MOV32mr %reg2326, 8, %reg2297, 4, %reg2295 The value of reg2326 was available in EBX, so it was reused from there, instead of reloading it into EDX. The value of reg2297 was available in EDX, so it was reused from there, instead of reloading it into EDI. The value of reg2295 was not available, so we tried reloading it into EBX, its assigned register. However, we checked and saw that we already reloaded something into EBX, so we chose what reg2326 was assigned to (EDX) and reloaded into that register instead. Unfortunately EDX had already been used by reg2297, so reloading into EDX clobbered the value used by the reg2326 operand, breaking the program. The fix for this is to check that the newly picked register is ok. In this case we now find that EDX is already used and try using EDI, which succeeds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17006 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch adds and improves debugging output. No functionality changes.Chris Lattner2004-10-151-3/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17005 91177308-0d34-0410-b5e6-96231b3b80d8
* Better codegen of binary integer ops with 32 bit immediate operands.Nate Begeman2004-10-151-2/+22
| | | | | | | | | | | | | | | | | | | | | This transformation fires a few dozen times across the testsuite. For example, int test2(int X) { return X ^ 0x0FF00FF0; } Old: _test2: lis r2, 4080 ori r2, r2, 4080 xor r3, r3, r2 blr New: _test2: xoris r3, r3, 4080 xori r3, r3, 4080 blr git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17004 91177308-0d34-0410-b5e6-96231b3b80d8
* The field is called `imm22', not simply `imm'Misha Brukman2004-10-142-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17003 91177308-0d34-0410-b5e6-96231b3b80d8
* Synthetic instructions RET and RETL need to have all 3 parameters specifiedMisha Brukman2004-10-142-8/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17002 91177308-0d34-0410-b5e6-96231b3b80d8
* Class F2_1 already inherits the imm22 field from class F2Misha Brukman2004-10-142-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17001 91177308-0d34-0410-b5e6-96231b3b80d8
* Generate the SparcV8 code emitter from .td filesMisha Brukman2004-10-142-2/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17000 91177308-0d34-0410-b5e6-96231b3b80d8
* * In the F3_1 class, default asi to 0 because it's not currently usedMisha Brukman2004-10-142-4/+2
| | | | | | | * In the F3_3 class, remove mention of asi because it's not part of the format git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16999 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bug John tracked down in libstdc++ where we were incorrectly deletingChris Lattner2004-10-141-1/+2
| | | | | | | weak functions. Thanks for finding this John! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16997 91177308-0d34-0410-b5e6-96231b3b80d8
* Add FSTOI, FDTOI (fp to integer cast) instructions.Brian Gaeke2004-10-142-0/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16996 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite emitCastOperation, refactoring parts of it into emitIntegerCast, andBrian Gaeke2004-10-142-108/+184
| | | | | | | adding emitFPToIntegerCast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16995 91177308-0d34-0410-b5e6-96231b3b80d8
* Add list of libc procedures we'll use, at some point.Brian Gaeke2004-10-142-12/+28
| | | | | | | | Update list of currently failing tests. ADJCALLSTACK* support is done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16994 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure any client of Dominators.h links in Dominators.cppChris Lattner2004-10-141-0/+2
| | | | | | | Patch by Morten Ofstad git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16987 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use the same variable name for two different variables in theChris Lattner2004-10-141-3/+2
| | | | | | | | same scope. This confused VC++ (and probably people too!). Patch by Morten Ofstad! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16985 91177308-0d34-0410-b5e6-96231b3b80d8
* * Claim to support machine code emission - return false fromMisha Brukman2004-10-141-4/+26
| | | | | | | | | | addPassesToEmitMachineCode() * Add support for registers and constants in getMachineOpValue() This enables running "int main() { ret 0 }" via the PowerPC JIT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16983 91177308-0d34-0410-b5e6-96231b3b80d8
* * Include the real (generated) version of getBinaryCodeForInstr()Misha Brukman2004-10-141-10/+20
| | | | | | | | | | * Add implementation of getMachineOpValue() for generated code emitter * Convert assert()s in unimplemented functions to abort()s so that non-debug builds fail predictably * Add file header comments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16981 91177308-0d34-0410-b5e6-96231b3b80d8
* * Make a PPC32-specific code emitter because we have separate classes for 32-Misha Brukman2004-10-141-6/+6
| | | | | | | | | | | and 64-bit code emitters that cannot share code unless we use virtual functions * Identify components being built by tablegen with more detail by assigning them to PowerPC, PPC32, or PPC64 more specifically; also avoids seeing 'building PowerPC XYZ' messages twice, where one is for PPC32 and one for PPC64 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16980 91177308-0d34-0410-b5e6-96231b3b80d8
* Checking in code that works on my simple test case. However, there is still ↵Tanya Lattner2004-10-141-104/+205
| | | | | | a bug with branches that I need to fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16979 91177308-0d34-0410-b5e6-96231b3b80d8
* There is only one field in an instruction, and that is `Inst', the final view ofMisha Brukman2004-10-141-51/+51
| | | | | | | | the instruction binary format, all others are simply operands and should not have the `field' label git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16978 91177308-0d34-0410-b5e6-96231b3b80d8
* PowerPC instruction definitions use LittleEndian-style encoding [0..31]Misha Brukman2004-10-143-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16977 91177308-0d34-0410-b5e6-96231b3b80d8
* Add isLittleEndianEncoding to InstrInfo class, defaults to `off'Misha Brukman2004-10-141-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16976 91177308-0d34-0410-b5e6-96231b3b80d8
* When converting phi nodes into select instructions, we shouldn't promote PHIChris Lattner2004-10-141-41/+93
| | | | | | | | | nodes unless we KNOW that we are able to promote all of them. This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16973 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow this file to compile on Darwin.Reid Spencer2004-10-141-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16971 91177308-0d34-0410-b5e6-96231b3b80d8
* Use __MINGW instead of __MING. Patch contributed by Henrik Bach.Reid Spencer2004-10-142-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16970 91177308-0d34-0410-b5e6-96231b3b80d8
* Get proper BSD #includes for MappedFile implementation.Reid Spencer2004-10-141-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16969 91177308-0d34-0410-b5e6-96231b3b80d8
* Implementation of MappedFile for Win32. Patch provided by Jeff Cohen.Reid Spencer2004-10-142-12/+202
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16968 91177308-0d34-0410-b5e6-96231b3b80d8
* Today is not my day. Fix broken #Chris Lattner2004-10-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16967 91177308-0d34-0410-b5e6-96231b3b80d8
* unbreak previous checkin :(Chris Lattner2004-10-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16966 91177308-0d34-0410-b5e6-96231b3b80d8
* Add back a missing parenChris Lattner2004-10-141-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16965 91177308-0d34-0410-b5e6-96231b3b80d8
* Fit to 80 colsChris Lattner2004-10-141-7/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16964 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap to 80 cols, delete some seriously old debugging printoutsChris Lattner2004-10-141-26/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16963 91177308-0d34-0410-b5e6-96231b3b80d8
* Fit in 80 columnsChris Lattner2004-10-141-13/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16962 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanupsChris Lattner2004-10-141-7/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16961 91177308-0d34-0410-b5e6-96231b3b80d8
* Update to reflect changes in Makefile rules.Reid Spencer2004-10-1333-120/+111
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16950 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups:Chris Lattner2004-10-121-23/+20
| | | | | | | | | * fit in 80 lines * Eliminate extra namespaces * Drop llvm:: git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16935 91177308-0d34-0410-b5e6-96231b3b80d8
* Transform memmove -> memcpy when the source is obviously constant memory.Chris Lattner2004-10-121-16/+33
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16932 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor tweaksChris Lattner2004-10-121-5/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16929 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement a new methodChris Lattner2004-10-121-3/+27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16927 91177308-0d34-0410-b5e6-96231b3b80d8