Commit Graph

3431 Commits

Author SHA1 Message Date
Misha Brukman
9dc3ede509 Added instruction format class 3.15 and floating-point compare instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6594 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 02:26:14 +00:00
Vikram S. Adve
55a85a47d4 Undo one of those last fixes -- it was incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6593 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 02:10:37 +00:00
Misha Brukman
88fe358f8a Sparc's dlsym() requires the special operand RTLD_SELF to find a symbol in the
currently-running process.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6592 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 01:57:22 +00:00
Chris Lattner
2ab5e120d4 Avoid generating a getelementptr instruction of a function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6591 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-04 01:24:40 +00:00
Misha Brukman
d720da23db Pass through the emitConstantPool() call to the real emitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6590 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 20:00:49 +00:00
Brian Gaeke
fc97c8b225 Make the write*map methods more self-contained. Document some more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6589 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 19:30:15 +00:00
Chris Lattner
8cc72d2968 Remove usage of typedef
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6583 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:41:58 +00:00
Chris Lattner
ff3261ae86 Add namespace comments for doxygen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6581 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 15:31:23 +00:00
Brian Gaeke
e14ccafe25 I documented this file, in an attempt to understand it, with a view toward
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.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6574 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 07:56:05 +00:00
Chris Lattner
946ef12273 Use the new -o tablegen option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6572 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 05:06:33 +00:00
Misha Brukman
e8e28dd7af Constants are laid out in memory in PC-relative form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6568 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:24:12 +00:00
Misha Brukman
e630b7f3e9 Added opcode conversion for conditional move of integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6567 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:23:35 +00:00
Misha Brukman
ea481ccc8f * Convert load/store opcodes from register to immediate forms.
* Stop code from wrapping to the next line.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6566 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:21:58 +00:00
Misha Brukman
c559e0590b Convert load/store opcodes from register to immediate forms, if necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6565 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:20:57 +00:00
Misha Brukman
2ee9fa11a2 Store instructions are different from other Format 3.1/3.2 instructions in that
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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6564 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:20:14 +00:00
Misha Brukman
c740aae220 Moved code to modify the opcode from 'reg' to 'imm' form to a more logical place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6563 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 03:18:20 +00:00
Misha Brukman
534538921d * Added section A.34: Move FP register on int reg condition (FMOVr)
* Labeled sections that are not currently used in the Sparc backend as not
  requiring completion at this time.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6562 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 01:16:27 +00:00
Misha Brukman
a76528ca6e * Removed unused classes (rd field is always mentioned last); fixed comments.
* 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 .


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6561 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 01:13:53 +00:00
Misha Brukman
13292a3347 * Removed unused classes: the rd field is always mentioned as the last reg.
* 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).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6560 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 01:11:58 +00:00
Misha Brukman
3da0923868 The rd field goes after the immediate field in format 2.1 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6559 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 01:04:04 +00:00
Misha Brukman
0ee48d24fe Moved FInfo.cpp to lib/Target/Sparc as it is Sparc-specific.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6554 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 23:27:09 +00:00
Chris Lattner
78ddcd7b03 Minor cleanups.
This pass should be moved to lib/Target/Sparc since it's sparc specific
It also needs a file comment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6553 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:57:41 +00:00
Chris Lattner
9efc4d6aaa Remove usage of noncopyable classes to clean up doxygen output.
In particular these classes are the last that link the noncopyable classes
with the hash_map, vector, and list classes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6552 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:45:07 +00:00
Chris Lattner
747a044550 Add #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6550 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 22:05:13 +00:00
Misha Brukman
e085a9d279 Added MOVR (move int reg on register condition), aka comparison with zero.
None of these instructions are actually used in the Sparc backend, so no changes
were required in the instruction selector.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6549 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 21:16:54 +00:00
Misha Brukman
eecdb661ec SparcInstr.def: added 'r' and 'i' versions of MOV(F)cc instructions
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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6548 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 20:55:14 +00:00
Misha Brukman
e6aa9e30b1 Removed a useless ofstream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6547 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 20:49:09 +00:00
Misha Brukman
26343a5642 * Added casts to/from floating-point to integers.
* Changed // comments to #ifdef 0 to maintain syntax highlighting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6546 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 19:08:37 +00:00
Guochun Shi
099b064a46 compiled with the new SchedGraphCommon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6545 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 17:48:56 +00:00
Chris Lattner
b84388937c * Make assertion message useful
* Kill dead conditional


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6544 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 17:42:47 +00:00
Chris Lattner
bf44ecccdb Fix bug: Linker/2003-06-02-TypeResolveProblem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6542 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 17:25:46 +00:00
Chris Lattner
920bd79f34 Be more robust in the face of undefined behavior.
Fixes bug: BasicAA/2003-06-01-AliasCrash.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6538 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 05:42:39 +00:00
Misha Brukman
eaaf8ad3cc Clean up after merging in SparcEmitter.cpp; branches and return work again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6536 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 05:24:46 +00:00
Chris Lattner
4954f04914 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6535 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 05:21:06 +00:00
Misha Brukman
bc80b2249a Eliminated a compiler warning due to casting to a different-sized datatype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6531 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:13:58 +00:00
Misha Brukman
f86aaa8eb7 Merged in tools/lli/JIT/SparcEmitter.cpp, coupled with the JITResolver taken
from lib/Target/X86/X86CodeEmitter.cpp .


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6530 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:12:39 +00:00
Misha Brukman
53a7ba851d Remove spurious assert()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6529 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 04:10:41 +00:00
Misha Brukman
cd60313915 Renamed MachineCodeEmitter.cpp -> X86CodeEmitter.cpp as it conflicts with the
target-independent lib/CodeGen/MachineCodeEmitter.cpp; preserved CVS history.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6528 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 03:28:00 +00:00
Misha Brukman
906f5fa5c8 * Removed SparcEmitter.cpp; rolled into lib/Target/Sparc/SparcV9CodeEmitter.cpp
* No more createX86Emitter() vs. createSparcEmitter() -- there can be only one
* As a result, the memory management semantics must be handled according to
  platform -- the parameters to mmap() are particularly sensitive to the host
  architecture.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6527 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 03:23:16 +00:00
Chris Lattner
cf135cbc77 Fix bug: CBackend/2003-06-01-NullPointerType.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6526 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 03:10:53 +00:00
Brian Gaeke
c3eaa89933 Deal with %lo/%lm/%hm/%hh flags in getMachineOpValue().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6522 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 02:13:26 +00:00
Brian Gaeke
24a26e58ef The flag modifications weren't picking up the old values of the
flags before. Save them in a temporary variable, then restore them from the
temporary after creating the new constant.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6520 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 02:10:31 +00:00
Chris Lattner
d5af63f325 Remove obsolete code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6518 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-02 00:09:00 +00:00
Chris Lattner
bba1b6df9a Move target specific code to target files. The new MachineCodeEmitter
class is actually target independent!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6517 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:24:36 +00:00
Chris Lattner
04b0b309c4 Move X86 specific code out of the JIT into the X86 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6516 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:23:50 +00:00
Chris Lattner
efc84a4082 Changes to be compatible with MachineCodeEmitter.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6515 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 23:22:11 +00:00
Brian Gaeke
63b99f91c9 Fix induction variable name clash in for loops, in finishFunction().
Modify new MachineOperand so that its flags match the old MachineOperand's
 flags, for the flags that matter.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6513 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 22:08:29 +00:00
Brian Gaeke
76e3dc798b Make the .inc file depend on $(TBLGEN), so that changes to TableGen followed
by a re-link of TableGen will notify Make to rebuild the .inc file.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6512 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 04:52:51 +00:00
Chris Lattner
26c6915539 Don't print out unique identifier for opaque types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6511 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 03:45:51 +00:00
Chris Lattner
20772547c5 * Implement cast (long|ulong) to bool
* Fix cast of (short|ushort|int|uint) to bool to work right


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6510 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-01 03:38:24 +00:00