summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Revert brians patch to get mapping info working againChris Lattner2003-06-041-9/+4
| | | | | | sorry dude llvm-svn: 6615
* Had to comment out a line in outByte() to get it to compile because Out and ↵Tanya Lattner2003-06-041-1/+1
| | | | | | | | tmp were undeclared. I was not sure what Brian wanted, so I will let him fix this. But now it compiles. llvm-svn: 6614
* Make this work with counter > 127Chris Lattner2003-06-041-1/+1
| | | | llvm-svn: 6613
* * Instead of re-inventing the MachineConstantPool emitter that's already givenMisha Brukman2003-06-042-111/+146
| | | | | | | | | | | | | | | | | | | | in Emitter.cpp, just convert the Sparc version of the constant pool into what's already supported and inter-operate. * Implemented a first pass at lazy function resolution in the JITResolver. That required adding a SparcV9CodeEmitter pointer to simplify generating bit-patterns of the instructions. * SparcV9CodeEmitter now creates and destroys static TheJITResolver, which makes sense because the SparcV9CodeEmitter is the only user of TheJITResolver, and lives for the entire duration of the JIT (via PassManager which lives in VM). * Changed all return values in the JITResolver to uint64_t because of the 64-bit Sparc architecture. * Added a new version of getting the value of a GlobalValue in the SparcV9CodeEmitter, which now works for already-generated functions (JITted or library functions). * Removed little-used and unused functions, cleaning up the internal view of the SparcV9CodeEmitter. llvm-svn: 6612
* * Institute a hack for the Sparc call to mmap() to get our generated code to beMisha Brukman2003-06-041-10/+16
| | | | | | | | | | | laid out closer to the VM so that calls to library functions (e.g. puts()) and callback (e.g. JITResolver::CompilationCallback) fit into 30 bits of the call instruction. * Abort if architecture is not yet supported (not X86 or Sparc) because it likely requires a different set of parameters to mmap() . * Stop using hard-coded values for page size; use sysconf(_SC_PAGESIZE) instead. llvm-svn: 6610
* Make writeNumber() void. Get ready to decouple it from .byte directive output.Brian Gaeke2003-06-041-4/+9
| | | | llvm-svn: 6609
* Made changes suggested by ChrisSumant Kowshik2003-06-041-51/+55
| | | | llvm-svn: 6606
* Clean up previous code.Chris Lattner2003-06-041-11/+20
| | | | | | Add new combination to turn seteq X, 0 -> not(cast X to bool) llvm-svn: 6604
* I have finally seen the light. The code to change the opcode must live higher inMisha Brukman2003-06-041-4/+13
| | | | | | | | | | | the loop, and in both cases. In the first case, it is a VReg that is a constant so it may be actually converted to a constant. In the second case, it is already a constant, but then if it doesn't change its type (e.g. to become a register and have the value loaded from memory if it is too large to live in its instruction field), we must change the opcode BEFORE the 'continue', otherwise we miss the opportunity. llvm-svn: 6602
* Added the 4.7 instruction class and all the FMOVcc instructions in them.Misha Brukman2003-06-042-37/+130
| | | | llvm-svn: 6601
* Implement combination of boolean not with branchChris Lattner2003-06-041-0/+14
| | | | llvm-svn: 6599
* Comment out opcodes currently unused in the Sparc backend.Misha Brukman2003-06-041-0/+3
| | | | llvm-svn: 6597
* No really, you _cannot use_ getelementptr on an unsized type: that makesChris Lattner2003-06-041-5/+1
| | | | | | no sense. llvm-svn: 6595
* Added instruction format class 3.15 and floating-point compare instructions.Misha Brukman2003-06-042-11/+22
| | | | llvm-svn: 6594
* Undo one of those last fixes -- it was incorrect.Vikram S. Adve2003-06-041-3/+5
| | | | llvm-svn: 6593
* Sparc's dlsym() requires the special operand RTLD_SELF to find a symbol in theMisha Brukman2003-06-041-0/+4
| | | | | | currently-running process. llvm-svn: 6592
* Avoid generating a getelementptr instruction of a functionChris Lattner2003-06-041-1/+1
| | | | llvm-svn: 6591
* Pass through the emitConstantPool() call to the real emitter.Misha Brukman2003-06-031-0/+4
| | | | llvm-svn: 6590
* Make the write*map methods more self-contained. Document some more.Brian Gaeke2003-06-031-42/+57
| | | | llvm-svn: 6589
* Remove usage of typedefChris Lattner2003-06-031-4/+2
| | | | llvm-svn: 6583
* Add namespace comments for doxygenChris Lattner2003-06-032-5/+6
| | | | llvm-svn: 6581
* I documented this file, in an attempt to understand it, with a view towardBrian Gaeke2003-06-031-56/+73
| | | | | | | | | | | rewriting it. I also vacuumed out all the commented-out code and inaccurate comments, etc. (We need to put the mapping information in a data structure so that we can pass it out to the JIT, instead of automagically converting it to .byte directives.) llvm-svn: 6574
* Use the new -o tablegen optionChris Lattner2003-06-031-4/+1
| | | | llvm-svn: 6572
* Constants are laid out in memory in PC-relative form.Misha Brukman2003-06-031-1/+1
| | | | llvm-svn: 6568
* Added opcode conversion for conditional move of integers.Misha Brukman2003-06-031-0/+50
| | | | llvm-svn: 6567
* * Convert load/store opcodes from register to immediate forms.Misha Brukman2003-06-031-9/+11
| | | | | | * Stop code from wrapping to the next line. llvm-svn: 6566
* Convert load/store opcodes from register to immediate forms, if necessary.Misha Brukman2003-06-031-4/+13
| | | | llvm-svn: 6565
* Store instructions are different from other Format 3.1/3.2 instructions in thatMisha Brukman2003-06-032-7/+43
| | | | | | | they prefer the destination register to be last. Thus, two new classes were made for them that accomodate for having this layout of operands (F3_1rd, F3_2rd). llvm-svn: 6564
* Moved code to modify the opcode from 'reg' to 'imm' form to a more logical ↵Misha Brukman2003-06-031-15/+6
| | | | | | place. llvm-svn: 6563
* * Added section A.34: Move FP register on int reg condition (FMOVr)Misha Brukman2003-06-031-13/+42
| | | | | | | * Labeled sections that are not currently used in the Sparc backend as not requiring completion at this time. llvm-svn: 6562
* * Removed unused classes (rd field is always mentioned last); fixed comments.Misha Brukman2003-06-031-38/+34
| | | | | | | * Added instruction classes which start building from rs1, then rs2, and rd. * Fixed order of operands in classes 4.1 and 4.2; added 4.6 . llvm-svn: 6561
* * Removed unused classes: the rd field is always mentioned as the last reg.Misha Brukman2003-06-031-57/+19
| | | | | | | | | * Added new classes which start building from rs1, adding rs2, and then rd. * Fixed order of operands in classes 3.11, 3.12, 3.16, and 3.17 . * Fixed comments to reflect Real Life (tm). * Removed "don't care" commented out assignments and dead classes (#if 0). llvm-svn: 6560
* The rd field goes after the immediate field in format 2.1 instructions.Misha Brukman2003-06-031-2/+1
| | | | llvm-svn: 6559
* Moved FInfo.cpp to lib/Target/Sparc as it is Sparc-specific.Misha Brukman2003-06-021-73/+0
| | | | llvm-svn: 6554
* Minor cleanups.Chris Lattner2003-06-021-6/+4
| | | | | | | This pass should be moved to lib/Target/Sparc since it's sparc specific It also needs a file comment. llvm-svn: 6553
* Remove usage of noncopyable classes to clean up doxygen output.Chris Lattner2003-06-022-22/+25
| | | | | | | In particular these classes are the last that link the noncopyable classes with the hash_map, vector, and list classes. llvm-svn: 6552
* Add #includeChris Lattner2003-06-021-0/+1
| | | | llvm-svn: 6550
* Added MOVR (move int reg on register condition), aka comparison with zero.Misha Brukman2003-06-023-8/+48
| | | | | | | None of these instructions are actually used in the Sparc backend, so no changes were required in the instruction selector. llvm-svn: 6549
* SparcInstr.def: added 'r' and 'i' versions of MOV(F)cc instructionsMisha Brukman2003-06-024-85/+193
| | | | | | | | | | | | | | | SparcInstrSelection.cpp: * Fixed opcodes to return correct 'i' version since the two functions are each only used in one place. * Changed name of function to have an 'i' in the name to signify that they each return an immediate form of the opcode. * Added a warning if either of the functions is ever used in a context which requires a register-version opcode. SparcV9_F4.td: fixed class F4_3, added F4_4 and notes that F4_{1,2} need fixing SparcV9.td: added the MOV(F)cc instructions llvm-svn: 6548
* Removed a useless ofstream.Misha Brukman2003-06-021-8/+2
| | | | llvm-svn: 6547
* * Added casts to/from floating-point to integers.Misha Brukman2003-06-021-90/+187
| | | | | | * Changed // comments to #ifdef 0 to maintain syntax highlighting. llvm-svn: 6546
* compiled with the new SchedGraphCommonGuochun Shi2003-06-023-27/+38
| | | | llvm-svn: 6545
* * Make assertion message usefulChris Lattner2003-06-021-6/+5
| | | | | | * Kill dead conditional llvm-svn: 6544
* Fix bug: Linker/2003-06-02-TypeResolveProblem.llChris Lattner2003-06-021-0/+4
| | | | llvm-svn: 6542
* Be more robust in the face of undefined behavior.Chris Lattner2003-06-021-5/+30
| | | | | | Fixes bug: BasicAA/2003-06-01-AliasCrash.ll llvm-svn: 6538
* Clean up after merging in SparcEmitter.cpp; branches and return work again.Misha Brukman2003-06-021-11/+40
| | | | llvm-svn: 6536
* Minor cleanupsChris Lattner2003-06-021-6/+3
| | | | llvm-svn: 6535
* Eliminated a compiler warning due to casting to a different-sized datatype.Misha Brukman2003-06-021-1/+1
| | | | llvm-svn: 6531
* Merged in tools/lli/JIT/SparcEmitter.cpp, coupled with the JITResolver takenMisha Brukman2003-06-022-19/+275
| | | | | | from lib/Target/X86/X86CodeEmitter.cpp . llvm-svn: 6530
* Remove spurious assert()Misha Brukman2003-06-021-1/+0
| | | | llvm-svn: 6529
OpenPOWER on IntegriCloud