Commit Graph

50 Commits

Author SHA1 Message Date
Reid Spencer
fa3e3b9427 Remove an unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31403 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-03 01:48:30 +00:00
Chris Lattner
8aa01f4b43 Fix JIT encoding of two-addr instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30111 91177308-0d34-0410-b5e6-96231b3b80d8
2006-09-05 03:01:52 +00:00
Jim Laskey
cb12903147 Clean up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29137 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 22:17:08 +00:00
Jim Laskey
f1b05bf755 1. Simplfy bit operations.
2. Coalesce instruction cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29135 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-13 21:02:53 +00:00
Jim Laskey
ed393433d2 Move base value of instruction to lookup table to prepare for case reduction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29122 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-12 19:15:43 +00:00
Jim Laskey
1406bdab85 Reduce bloat in target libraries by removing per machine instruction assertion
from code emitter generation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29097 91177308-0d34-0410-b5e6-96231b3b80d8
2006-07-11 01:25:59 +00:00
Chris Lattner
485c00f7e8 Fix miscodegen of V_SET0 in PPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26836 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-18 00:40:36 +00:00
Chris Lattner
188454ae2b Don't emit JIT code for these instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25669 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 01:39:38 +00:00
Chris Lattner
dc93efe30e Fix an incompatibility with GCC 4.1, thanks to Vladimir Merzliakov
for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23963 91177308-0d34-0410-b5e6-96231b3b80d8
2005-10-24 15:04:15 +00:00
Chris Lattner
fcd60a010b The code emitter generator only supports targets with 32-bit instruction
words.  There is no way for one of these targets to have a > 32-bit immediate!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22897 91177308-0d34-0410-b5e6-96231b3b80d8
2005-08-19 01:04:33 +00:00
Misha Brukman
3da94aec4d Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21428 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 00:00:37 +00:00
Misha Brukman
28eefa5464 * Factor out (into new fn) a loop emitting operand shifts into the instruction
* Reverse instruction bit components for a LittleEndian-style encoding
* Fix some comments and spacing


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16975 91177308-0d34-0410-b5e6-96231b3b80d8
2004-10-14 05:53:01 +00:00
Reid Spencer
551ccae044 Changes For Bug 352
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-01 22:55:40 +00:00
Chris Lattner
2c38413b3f Do not #include files into the llvm namespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15849 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-17 03:08:28 +00:00
Misha Brukman
ad346ad170 Deleted commented-out code as we now get namespace directly, add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15627 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 20:54:58 +00:00
Misha Brukman
e2ba7787ba Use the target name instead of hard-coding SparcV9.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15616 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 18:31:01 +00:00
Chris Lattner
2b27b88716 This was a good idea, but until this does not break the build of
lib/Target/Sparc, we should not use it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15603 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-10 15:05:18 +00:00
Misha Brukman
d7a5b2826c Use the current target name instead of a ClassPrefix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15585 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-09 19:10:43 +00:00
Misha Brukman
eb178c146a * Use Classname and ClassPrefix instead of hard-coded V9 values
* Simplify code and shorten lines by not recomputing values


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15582 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-09 17:47:45 +00:00
Misha Brukman
4e4f8631f6 * Added documentation in the file header
* Shorten assert() text to make it fit within 80 cols


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15508 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-04 22:07:54 +00:00
Chris Lattner
2082ebe8b3 Finegrainify namespacification
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15381 91177308-0d34-0410-b5e6-96231b3b80d8
2004-08-01 03:55:39 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
John Criswell
01d45827a1 Added LLVM copyright header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9305 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:20:30 +00:00
Misha Brukman
0bb806bd9a Do not put DEBUG() guard around error condition; this must *always* be printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8583 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-17 18:21:48 +00:00
Misha Brukman
dfd414ab77 Added asserts to prevent negative shift amounts from being generated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7640 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 16:28:49 +00:00
Chris Lattner
0e5e49e688 convert over to using TableGen backends
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7628 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-06 04:36:35 +00:00
Misha Brukman
d88ba5a861 Stop special-casing annul and predict bits (which are Sparc-specific anyway)
since those bits are now hard-coded in Sparc*.td files.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7593 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 14:35:35 +00:00
Chris Lattner
ffaee37556 No functional changes, comment the fix I just put in
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7590 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 03:59:01 +00:00
Chris Lattner
d7efef9d14 The CodeEmitterGenerator used to consider ANY uninitialized field as being an
operand (unless it's annul or predict).  Now we only consider fields to be
operands if they are uninitialized AND used in the "Inst" field.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7589 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-05 03:53:04 +00:00
Chris Lattner
c648dabf65 DEBUG got moved to Debug.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7491 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 22:13:59 +00:00
Chris Lattner
6f334ad8f5 Add new getValueAsBitsInit 'high-level' method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7467 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 04:46:24 +00:00
Chris Lattner
048c00db1c Simplify code to match new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7464 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 04:38:18 +00:00
Chris Lattner
cf1b585312 Minor cleanups
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7462 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 04:15:25 +00:00
Chris Lattner
ab47ae3381 Factor code out into a new getAllDerivedDefinitions method, which is generally useful
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7461 91177308-0d34-0410-b5e6-96231b3b80d8
2003-08-01 04:09:58 +00:00
Chris Lattner
c9670ef17d More minor cleanups of the interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7446 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 04:43:49 +00:00
Chris Lattner
f745a20deb Rename createEmitter to run because eventually all tablegen backends will
be subclasses of a common interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7445 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-31 04:38:26 +00:00
Chris Lattner
30709543d2 Don't crash if there is no Inst class in the tablegen file!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7402 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-29 23:00:08 +00:00
Misha Brukman
c86516f35c Added a DEBUG() guard to a debug information printout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7203 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-18 18:03:45 +00:00
Misha Brukman
f6e5217b54 Fixed a bug: outputting name of variable instead of its value.
Also, placed DEBUG() guards around debug information so that the generated file
is much smaller and hence should be faster to preprocess/compile.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7180 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-15 21:26:09 +00:00
Misha Brukman
7eac4766b1 This optimization greatly enhances efficiency of creating new instructions by
masking and shifting operands directly into their place in the instruction,
instead of the old-fashioned way of ORing in each bit separately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7179 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-15 21:00:32 +00:00
Misha Brukman
48aa824279 Stop using the `Offset' variable, as we are cycling through the bits of a field
initializer and the loop index variable already carries the offset information
that we need.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7123 91177308-0d34-0410-b5e6-96231b3b80d8
2003-07-07 22:30:44 +00:00
Chris Lattner
1cb65f2d62 Old versions of GCC doesn't have <ostream> :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6661 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 23:06:20 +00:00
Misha Brukman
f4ef4c881f All debug print statements are now output with the DEBUG() guard to make
output clean so that tests can automatically diff the output.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6643 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-06 00:27:02 +00:00
Misha Brukman
3d194ac26b * Stop ignoring cc registers, since we actually use them in branches.
* Added comment as to why we are still ignoring predict and annul bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6636 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-05 23:15:25 +00:00
Misha Brukman
9ced1671a6 Stop ignoring the `cc' field, we actually use it now (e.g. conditional move)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6555 91177308-0d34-0410-b5e6-96231b3b80d8
2003-06-03 00:07:17 +00:00
Misha Brukman
e7800b5458 getValueOp() now takes a MachineInstr as well as a MachineOperand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6450 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-30 20:32:01 +00:00
Misha Brukman
ecc7fd3c56 Output the opcode name of the instruction being emitted to cerr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6386 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-28 18:29:10 +00:00
Misha Brukman
b9dd8154b6 Cannot output `static' in generated cpp code: results in error. It's already
specified as a static member in class definition.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6370 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 22:29:02 +00:00
Misha Brukman
cbfde0a612 * Now outputting a static function getBinaryCodeForInstr() (JIT-accessible)
* For debugging purposes:
  + output the predefined bit pattern of the instruction
* Fixed inefficiency: only load an operand from MachineInstr once
* Bug fix: did not advance bit index when seeing named bit-fields "annul", "cc"
  and "predict"
* Added a catch-all for non-supported instructions at the end of switch stmt.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6368 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-27 22:19:58 +00:00
Misha Brukman
9fff7e194a First cut at the Code Generator using the TableGen methodology.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6321 91177308-0d34-0410-b5e6-96231b3b80d8
2003-05-24 00:15:53 +00:00