Misha Brukman
ad7dda52c9
Added asserts to prevent negative shift amounts from being generated.
...
llvm-svn: 7640
2003-08-06 16:28:49 +00:00
Chris Lattner
0e4fda4b71
convert over to using TableGen backends
...
llvm-svn: 7628
2003-08-06 04:36:35 +00:00
Misha Brukman
7452a521b3
Stop special-casing annul and predict bits (which are Sparc-specific anyway)
...
since those bits are now hard-coded in Sparc*.td files.
llvm-svn: 7593
2003-08-05 14:35:35 +00:00
Chris Lattner
8f8fbd7106
No functional changes, comment the fix I just put in
...
llvm-svn: 7590
2003-08-05 03:59:01 +00:00
Chris Lattner
d8cbdc4c67
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.
llvm-svn: 7589
2003-08-05 03:53:04 +00:00
Chris Lattner
64fade1536
DEBUG got moved to Debug.h
...
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
0177241fa7
Add new getValueAsBitsInit 'high-level' method
...
llvm-svn: 7467
2003-08-01 04:46:24 +00:00
Chris Lattner
0fe4e3f82a
Simplify code to match new interfaces
...
llvm-svn: 7464
2003-08-01 04:38:18 +00:00
Chris Lattner
e83294921c
Minor cleanups
...
llvm-svn: 7462
2003-08-01 04:15:25 +00:00
Chris Lattner
440f33e964
Factor code out into a new getAllDerivedDefinitions method, which is generally useful
...
llvm-svn: 7461
2003-08-01 04:09:58 +00:00
Chris Lattner
227005d189
More minor cleanups of the interface
...
llvm-svn: 7446
2003-07-31 04:43:49 +00:00
Chris Lattner
1283b2a07c
Rename createEmitter to run because eventually all tablegen backends will
...
be subclasses of a common interface.
llvm-svn: 7445
2003-07-31 04:38:26 +00:00
Chris Lattner
b964a87dfe
Don't crash if there is no Inst class in the tablegen file!
...
llvm-svn: 7402
2003-07-29 23:00:08 +00:00
Misha Brukman
8a57ef8390
Added a DEBUG() guard to a debug information printout.
...
llvm-svn: 7203
2003-07-18 18:03:45 +00:00
Misha Brukman
d0f2196d2e
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.
llvm-svn: 7180
2003-07-15 21:26:09 +00:00
Misha Brukman
414c95141f
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.
llvm-svn: 7179
2003-07-15 21:00:32 +00:00
Misha Brukman
73f1bbeecd
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.
llvm-svn: 7123
2003-07-07 22:30:44 +00:00
Chris Lattner
51bbe7b282
Old versions of GCC doesn't have <ostream> :(
...
llvm-svn: 6661
2003-06-06 23:06:20 +00:00
Misha Brukman
545d95e475
All debug print statements are now output with the DEBUG() guard to make
...
output clean so that tests can automatically diff the output.
llvm-svn: 6643
2003-06-06 00:27:02 +00:00
Misha Brukman
de307f15d4
* Stop ignoring cc registers, since we actually use them in branches.
...
* Added comment as to why we are still ignoring predict and annul bits.
llvm-svn: 6636
2003-06-05 23:15:25 +00:00
Misha Brukman
58aeba1c5f
Stop ignoring the `cc' field, we actually use it now (e.g. conditional move)
...
llvm-svn: 6555
2003-06-03 00:07:17 +00:00
Misha Brukman
62904a1538
getValueOp() now takes a MachineInstr as well as a MachineOperand.
...
llvm-svn: 6450
2003-05-30 20:32:01 +00:00
Misha Brukman
59ea121b52
Output the opcode name of the instruction being emitted to cerr.
...
llvm-svn: 6386
2003-05-28 18:29:10 +00:00
Misha Brukman
6c51fb5dd1
Cannot output `static' in generated cpp code: results in error. It's already
...
specified as a static member in class definition.
llvm-svn: 6370
2003-05-27 22:29:02 +00:00
Misha Brukman
170b9ffe76
* 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.
llvm-svn: 6368
2003-05-27 22:19:58 +00:00
Misha Brukman
be1457481b
First cut at the Code Generator using the TableGen methodology.
...
llvm-svn: 6321
2003-05-24 00:15:53 +00:00