Chris Lattner
6b0869be4b
Allow registers to specify a custom name
...
llvm-svn: 7548
2003-08-03 22:14:50 +00:00
Chris Lattner
329fc9c693
add new --gen-instr-desc option
...
llvm-svn: 7545
2003-08-03 21:58:28 +00:00
Chris Lattner
928ab27a55
Add new Record::getValueAsBit method
...
llvm-svn: 7544
2003-08-03 21:58:13 +00:00
Chris Lattner
fed9de5358
Finish the instruction info emitter
...
llvm-svn: 7543
2003-08-03 21:57:51 +00:00
Chris Lattner
c851ff7ab6
Fix bug: TableGen/IntBitInit.td
...
llvm-svn: 7526
2003-08-03 18:29:51 +00:00
Chris Lattner
cabf643bf6
Fix bug: TableGen/BitsInitOverflow.td
...
llvm-svn: 7524
2003-08-03 18:24:34 +00:00
Chris Lattner
7ec26cfa3b
* Changes to allow lists of any type
...
* Reorganize Target class a bit
* Fix string out of range access bug
llvm-svn: 7520
2003-08-03 18:17:54 +00:00
Chris Lattner
a9b58a76b5
Changes to allow lists of any type
...
llvm-svn: 7519
2003-08-03 18:17:22 +00:00
Chris Lattner
acf426fb7d
expand contraction
...
llvm-svn: 7518
2003-08-03 18:12:59 +00:00
Chris Lattner
e12fa2d7d9
Add support for instruction enum emission
...
llvm-svn: 7516
2003-08-03 17:24:20 +00:00
Chris Lattner
ff4f98af45
Initial checkin of Instruction emitter, which just produces enum values so far
...
llvm-svn: 7515
2003-08-03 17:24:10 +00:00
Chris Lattner
2d2b350aff
Remove dead private:
...
llvm-svn: 7514
2003-08-03 16:30:24 +00:00
Chris Lattner
f0b32aa948
Make the register numbers line up more frequently
...
llvm-svn: 7508
2003-08-03 15:40:38 +00:00
Chris Lattner
dace98d117
Allow an external 'set' command to set multiple values in the same command.
...
Allow redefinitions of variables as long as they are of the same type.
llvm-svn: 7507
2003-08-03 13:58:01 +00:00
Chris Lattner
14d79d2e57
Finish the register info emitter
...
llvm-svn: 7506
2003-08-03 13:52:02 +00:00
Chris Lattner
aeeca2189c
Add new method
...
llvm-svn: 7502
2003-08-02 01:27:37 +00:00
Chris Lattner
f0c6964470
DEBUG got moved to Debug.h
...
llvm-svn: 7491
2003-08-01 22:13:59 +00:00
Chris Lattner
7700cb6cd2
Tablegen should only replace the output if it changes
...
llvm-svn: 7486
2003-08-01 20:35:01 +00:00
Chris Lattner
74fa70bc51
Make sure to delete the output file if there is an error
...
llvm-svn: 7481
2003-08-01 19:21:43 +00:00
Chris Lattner
463b279aad
add support for emitting register classes
...
llvm-svn: 7473
2003-08-01 06:27:59 +00:00
Chris Lattner
a295902d00
Add new getValueAsListInit and getValueAsInt methods
...
llvm-svn: 7472
2003-08-01 06:15:10 +00:00
Chris Lattner
a22b48d2a3
Add the ability to emit register file enums
...
llvm-svn: 7471
2003-08-01 05:59:20 +00:00
Chris Lattner
cf268a5060
Fix the way field bit references are resolved, also allow resolution of field references overall!
...
llvm-svn: 7470
2003-08-01 05:58:58 +00:00
Chris Lattner
0ef2353b01
Dead code elimination
...
llvm-svn: 7468
2003-08-01 04:47:20 +00:00
Chris Lattner
2e69d4a1e8
Add new getValueAsBitsInit 'high-level' method
...
llvm-svn: 7467
2003-08-01 04:46:24 +00:00
Chris Lattner
1f2f5c8392
Add file comment
...
Add register info emitter
Simplify code by using "high-level" methods.
llvm-svn: 7466
2003-08-01 04:39:05 +00:00
Chris Lattner
8d99a76d55
Initial checkin of register info emitter
...
llvm-svn: 7465
2003-08-01 04:38:38 +00:00
Chris Lattner
ecca290a2a
Simplify code to match new interfaces
...
llvm-svn: 7464
2003-08-01 04:38:18 +00:00
Chris Lattner
330808bd91
Switch over to an exception handling model for "high-level" requests.
...
Add new getValueAsString method.
llvm-svn: 7463
2003-08-01 04:37:57 +00:00
Chris Lattner
fc6e266410
Minor cleanups
...
llvm-svn: 7462
2003-08-01 04:15:25 +00:00
Chris Lattner
f62c489e35
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
c69df616b8
More minor cleanups of the interface
...
llvm-svn: 7446
2003-07-31 04:43:49 +00:00
Chris Lattner
c5b306b4b9
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
4ee57983bd
Add file comment
...
llvm-svn: 7444
2003-07-31 04:37:57 +00:00
Chris Lattner
c33ca30544
Tighten up interface
...
llvm-svn: 7443
2003-07-31 04:32:37 +00:00
Chris Lattner
34d10a1aab
Add support for code fragments
...
llvm-svn: 7440
2003-07-30 22:15:58 +00:00
Chris Lattner
284136170e
Initial support for the 'code' type.
...
llvm-svn: 7439
2003-07-30 21:47:42 +00:00
Chris Lattner
06fd68f31d
Move err() to the lexer, implement file inclusion capabilities directly in tblgen
...
llvm-svn: 7436
2003-07-30 20:56:47 +00:00
Chris Lattner
b2b694bbef
Minor reorganization, move ParseFile to the lexer
...
llvm-svn: 7432
2003-07-30 19:55:10 +00:00
Chris Lattner
1bf13179c2
Make tablegen take an input filename to parse if one is specified, otherwise
...
use stdin.
llvm-svn: 7431
2003-07-30 19:48:02 +00:00
Chris Lattner
af282ae26e
Directly support C style comments in tblgen, but allow them to actually nest
...
llvm-svn: 7429
2003-07-30 19:39:36 +00:00
Chris Lattner
1de61e04fb
Fix coredump for when an ID is used illegally outside a record
...
llvm-svn: 7411
2003-07-30 05:17:35 +00:00
Chris Lattner
03eeeb7e02
Don't pollute the namespace with template arguments after they have been resolved
...
llvm-svn: 7410
2003-07-30 04:56:05 +00:00
Chris Lattner
c9dee67ab6
Implement TODO: disallow 'def's with template arguments.
...
llvm-svn: 7409
2003-07-30 04:31:17 +00:00
Chris Lattner
1b145a54cb
Allow specification of anonymous definitions
...
llvm-svn: 7408
2003-07-30 04:26:44 +00:00
Chris Lattner
40004be9db
Allow passing lists through variables
...
llvm-svn: 7407
2003-07-30 04:16:52 +00:00
Chris Lattner
db68105987
Implement resolution of variables to the value of the variable once it gets a value
...
llvm-svn: 7406
2003-07-30 04:05:07 +00:00
Chris Lattner
590fd82e42
Don't crash if there is no Inst class in the tablegen file!
...
llvm-svn: 7402
2003-07-29 23:00:08 +00:00
Chris Lattner
8cdf385f8d
Add support for Set statements without {}'s. Now we can just say
...
set Foo = bar in
def blah: blahclass {}
llvm-svn: 7355
2003-07-28 03:49:40 +00:00
Chris Lattner
2c76692496
Allow initializing variable initializers with variables
...
llvm-svn: 7354
2003-07-28 03:39:57 +00:00
Chris Lattner
5526a4468a
Use C++ headers, not C headers
...
llvm-svn: 7308
2003-07-25 17:32:51 +00:00
Misha Brukman
ba943afa97
Added a DEBUG() guard to a debug information printout.
...
llvm-svn: 7203
2003-07-18 18:03:45 +00:00
Misha Brukman
c7efa119ac
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
1912eaf0a0
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
222639708e
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
John Criswell
3ef61afb76
Merged in autoconf branch. This provides configuration via the autoconf
...
system.
llvm-svn: 7014
2003-06-30 21:59:07 +00:00
John Criswell
abebb9af11
Added code to the clean rule that deletes files placed in the source directory.
...
These files interfer with a second build attempt.
llvm-svn: 6927
2003-06-27 17:03:20 +00:00
Chris Lattner
0f55690855
Fix misspelling of ExtraSources, hopefully to unbreak the nightly tester
...
Remove evil rcs tag :)
llvm-svn: 6737
2003-06-17 14:30:21 +00:00
John Criswell
f3e7fedff3
Added assert.h so that it compiles under newer versions of GCC.
...
llvm-svn: 6683
2003-06-11 14:17:21 +00:00
John Criswell
be087cf11d
Updated to the new Makefile.common.
...
Modified the test rule so that it can be added to the regular test rule
(I believe the term is double dependency?).
llvm-svn: 6681
2003-06-11 13:57:48 +00:00
Chris Lattner
91ca134e26
Old versions of GCC doesn't have <ostream> :(
...
llvm-svn: 6661
2003-06-06 23:06:20 +00:00
Misha Brukman
72d7da0397
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
1cca1c68e1
* 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
Chris Lattner
1580a96e2a
Spiff up options a bit
...
llvm-svn: 6573
2003-06-03 05:07:28 +00:00
Chris Lattner
5ef4cf863b
Add -o support for TableGen
...
I figure that misha has done a lot of things on my todo list, the least I
can do is reciprocate a bit. :)
llvm-svn: 6571
2003-06-03 05:04:42 +00:00
Chris Lattner
6dc6f066bc
Make tablegen use more structured command line options
...
llvm-svn: 6570
2003-06-03 04:56:29 +00:00
Misha Brukman
7e66953f17
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
027b3d899f
getValueOp() now takes a MachineInstr as well as a MachineOperand.
...
llvm-svn: 6450
2003-05-30 20:32:01 +00:00
Misha Brukman
71b9de7789
Output the opcode name of the instruction being emitted to cerr.
...
llvm-svn: 6386
2003-05-28 18:29:10 +00:00
Misha Brukman
bf453de096
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
9deee31239
* 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
0d817c4b2e
Add ability to utilize the code emitter generator (CodeEmitterGen).
...
llvm-svn: 6322
2003-05-24 00:17:12 +00:00
Misha Brukman
a7ec8e1a3e
First cut at the Code Generator using the TableGen methodology.
...
llvm-svn: 6321
2003-05-24 00:15:53 +00:00
Misha Brukman
25afb65692
I fixed that ``thang'', yo.
...
llvm-svn: 6252
2003-05-20 23:45:36 +00:00
Chris Lattner
72b19ce654
Update to work with newer versions of bison
...
llvm-svn: 5762
2003-03-31 21:26:06 +00:00
Chris Lattner
51978fe692
Fix warning on sparc
...
llvm-svn: 5426
2003-01-29 16:26:46 +00:00
Chris Lattner
b257b421f9
Fix warnings
...
llvm-svn: 5377
2003-01-20 06:19:18 +00:00
Chris Lattner
3ef3fdf837
Fix bug
...
llvm-svn: 4942
2002-12-06 04:42:16 +00:00
Chris Lattner
3e6e191e39
Allow printing partially constructed bitsets
...
llvm-svn: 4941
2002-12-06 04:42:10 +00:00
Chris Lattner
7e73168939
Don't delete values that may still be referenced!
...
llvm-svn: 4940
2002-12-06 04:02:48 +00:00
Chris Lattner
07f1535894
Tighten up assertion checking
...
llvm-svn: 4939
2002-12-06 03:55:39 +00:00
Chris Lattner
1d7d4f64c4
Add code that can be used for debugging
...
llvm-svn: 4888
2002-12-03 20:01:04 +00:00
Chris Lattner
9aa0b12f0a
Continue implementing field initializers
...
llvm-svn: 4879
2002-12-03 06:00:33 +00:00
Chris Lattner
ab50fb4b2e
Don't delete temporary files
...
llvm-svn: 4878
2002-12-03 06:00:11 +00:00
Misha Brukman
d88181ead1
Ignore generated files gram.tab.c and gram.tab.h
...
llvm-svn: 4862
2002-12-02 21:15:37 +00:00
Misha Brukman
03628c6e16
Ignore generated files FileLexer.* and FileParser.*
...
llvm-svn: 4860
2002-12-02 21:13:59 +00:00
Chris Lattner
1a025e25ef
Continued support for field intitializers
...
llvm-svn: 4855
2002-12-02 17:53:54 +00:00
Chris Lattner
92f18611f6
Continued support for field initializer
...
llvm-svn: 4854
2002-12-02 17:44:35 +00:00
Chris Lattner
522ba615f6
Continued support for Field Initializer
...
llvm-svn: 4853
2002-12-02 17:43:58 +00:00
Chris Lattner
72969922ea
Adjustments due to new FieldInit stuff
...
llvm-svn: 4852
2002-12-02 17:43:43 +00:00
Chris Lattner
b8ecdceb87
Add comments, factor out common code
...
llvm-svn: 4851
2002-12-02 16:57:01 +00:00
Chris Lattner
97984b1d5d
Add support for field exprs
...
llvm-svn: 4850
2002-12-02 16:43:43 +00:00
Chris Lattner
3567880e6e
* Move BitsInit::resolveReferences up with the rest of BitsInit code
...
* Initial support for field expressions
llvm-svn: 4849
2002-12-02 16:43:30 +00:00
Chris Lattner
ae2bed976c
Initial support for Field Expressions
...
llvm-svn: 4848
2002-12-02 16:42:52 +00:00
Chris Lattner
8eb531cd55
Add correct dependency
...
llvm-svn: 4847
2002-12-02 16:31:46 +00:00
Chris Lattner
6f19b1b6c4
Split up targets
...
llvm-svn: 4846
2002-12-02 16:13:42 +00:00
Chris Lattner
5d850ddb5c
Add comments
...
llvm-svn: 4845
2002-12-02 16:13:23 +00:00
Chris Lattner
a6240f6b1a
Initial checkin of TableGen utility
...
llvm-svn: 4843
2002-12-02 01:23:04 +00:00
Chris Lattner
3832014b29
Fix burg build problem.
...
llvm-svn: 4480
2002-11-01 03:16:45 +00:00
Chris Lattner
371ce74737
Work better with other versions of bison
...
llvm-svn: 4290
2002-10-27 19:06:56 +00:00