Commit Graph

21467 Commits

Author SHA1 Message Date
Chris Lattner db8e888fb5 eliminate some redundancy
llvm-svn: 24781
2005-12-17 19:47:05 +00:00
Chris Lattner 5e68639009 Use a combination of sethi and or to build arbitrary immediates.
llvm-svn: 24780
2005-12-17 19:41:43 +00:00
Chris Lattner 8546257435 Use sethi to build large immediates with zeros at the bottom
llvm-svn: 24779
2005-12-17 19:37:00 +00:00
Chris Lattner 7b6f2e879d Add shift and small immediate support
llvm-svn: 24778
2005-12-17 19:07:57 +00:00
Chris Lattner 30f924e3ca Add some basic reg-reg instructions
llvm-svn: 24777
2005-12-17 18:53:33 +00:00
Chris Lattner 2edb4b7f99 Add empty patterns to all F3_1 instructions
llvm-svn: 24776
2005-12-17 18:49:14 +00:00
Evan Cheng 1d71248392 Darwin API issue: indirect load of external and weak symbols.
llvm-svn: 24775
2005-12-17 09:13:43 +00:00
Chris Lattner 866cef563b Add some simple integer patterns. This allows us to compile this:
int %test(int %A) {
  %B = add int %A, 1
  %C = xor int %B, 123
  ret int %C
}

into this:

test:
        save -96, %sp, %sp
        add %i0, 1, %l0
        xor %l0, 123, %i0
        restore %g0, %g0, %g0
        retl
        nop

for example.  I guess it would make sense to add reg/reg versions too.

llvm-svn: 24774
2005-12-17 08:26:38 +00:00
Chris Lattner 80a3875bc1 Implement ret with operand, giving us this:
int %test(int %A) {
  ret int %A
}

llvm-svn: 24773
2005-12-17 08:15:09 +00:00
Chris Lattner 1136b7a2e0 Add a pattern for 'ret'. This now compiles:
void %test() { ret void }

:)

llvm-svn: 24772
2005-12-17 08:08:42 +00:00
Chris Lattner 1549e4d590 Add empty patterns for F3_2 instructions
llvm-svn: 24771
2005-12-17 08:06:43 +00:00
Chris Lattner 9f1c860e1e Implement LowerArguments, at least for the first 6 integer args
llvm-svn: 24770
2005-12-17 08:03:24 +00:00
Chris Lattner 4f34e9f7ff Add the framework for a dag-dag isel
llvm-svn: 24769
2005-12-17 07:47:01 +00:00
Evan Cheng f3b16bc5a0 Remove a few lines of dead code.
llvm-svn: 24768
2005-12-17 07:18:44 +00:00
Chris Lattner 69b5d17f92 asmprinter done, added crucial missing step
llvm-svn: 24767
2005-12-17 07:17:59 +00:00
Chris Lattner 55f9dbe1ea Use the AsmPrinter for global variable init printing. This eliminates a
bunch of code and causes V8 to start using the fancy .asciz directive that
the sun assembler supports.

llvm-svn: 24766
2005-12-17 07:17:08 +00:00
Chris Lattner fb7fd98cd4 Switch constant pool printing over to use the Shared AsmPrinter version
llvm-svn: 24765
2005-12-17 07:11:43 +00:00
Chris Lattner b808c8e2e4 Use the shared AsmPrinter code for some basic stuff. No functionality
change except for fewer .section directives emitted

llvm-svn: 24764
2005-12-17 07:04:29 +00:00
Evan Cheng 7087cd275b Added an idea about any_extend for performance tuning.
llvm-svn: 24763
2005-12-17 06:54:43 +00:00
Chris Lattner 9e2af046e4 Convert the remaining instructions over, branches and calls. Fix a couple
minor bugs

llvm-svn: 24762
2005-12-17 06:54:41 +00:00
Chris Lattner 6b669e2680 convert FP instructions to use an asmstring and operand list, allowing FP
programs to work on V8 again

llvm-svn: 24761
2005-12-17 06:32:52 +00:00
Evan Cheng bc7708c0e8 Added truncate.
llvm-svn: 24760
2005-12-17 02:02:50 +00:00
Evan Cheng b06925d1dd Added anyext, modelled as zext on X86.
llvm-svn: 24759
2005-12-17 01:47:57 +00:00
Evan Cheng e58ab48ccb Yet another variant of getTargetNode().
llvm-svn: 24758
2005-12-17 01:44:51 +00:00
Evan Cheng 6b76009393 Added some isel ideas.
llvm-svn: 24757
2005-12-17 01:25:19 +00:00
Evan Cheng cb19390ead Added support for cmp, test, and conditional move instructions.
llvm-svn: 24756
2005-12-17 01:24:02 +00:00
Evan Cheng 0f68322992 Only lower SELECT when using DAG based isel.
llvm-svn: 24755
2005-12-17 01:22:13 +00:00
Evan Cheng 225a4d0d6d X86 lowers SELECT to a cmp / test followed by a conditional move.
llvm-svn: 24754
2005-12-17 01:21:05 +00:00
Evan Cheng e22f9181f7 Support for read / write from explicit registers with FlagVT type.
llvm-svn: 24753
2005-12-17 01:19:28 +00:00
Evan Cheng a93464d8ac Remove hidden DOS characters.
llvm-svn: 24752
2005-12-17 01:03:57 +00:00
Jeff Cohen 59dc6c553d Fix VC++ level 4 warnings. Because a base class has declared these private, VC++ complains it cannot automatically generate this methods.
llvm-svn: 24751
2005-12-17 00:19:22 +00:00
Jeff Cohen ea36abe567 Fix VC++ level 4 warnings.
llvm-svn: 24750
2005-12-17 00:18:06 +00:00
Jeff Cohen 9504149c1b Turn on string pooling for smaller binaries.
llvm-svn: 24749
2005-12-17 00:14:47 +00:00
Jim Laskey 7c462768ed Added source file/line correspondence for dwarf (PowerPC only at this point.)
llvm-svn: 24748
2005-12-16 22:45:29 +00:00
Chris Lattner 887af88ce3 Weak and linkonce global vars should still have a .globl emitted for them
llvm-svn: 24747
2005-12-16 21:46:14 +00:00
Nate Begeman 672578bd94 Add a second vector type to the VRRC register class, and fix some patterns
so that tablegen can infer all types.

llvm-svn: 24746
2005-12-16 09:19:13 +00:00
Chris Lattner 9f2c3a7c4e add some notes
llvm-svn: 24745
2005-12-16 07:20:53 +00:00
Chris Lattner fa55745cbc Add a couple more instrs
llvm-svn: 24744
2005-12-16 07:18:48 +00:00
Chris Lattner e082426ae7 remove some dead code
llvm-svn: 24743
2005-12-16 07:16:02 +00:00
Chris Lattner 70310906e7 asmprint pseudo instrs
llvm-svn: 24742
2005-12-16 07:13:26 +00:00
Chris Lattner 68d064a3a6 Autogenerate asmprinter for F3_2 instructions
llvm-svn: 24741
2005-12-16 07:10:02 +00:00
Chris Lattner 1e777082a0 Switch F3_1 instructions over to use AsmStrings
llvm-svn: 24740
2005-12-16 06:52:00 +00:00
Chris Lattner 4870224a56 Plug in basic hooks for an autogenerated asm printer to fill in.
llvm-svn: 24739
2005-12-16 06:34:17 +00:00
Chris Lattner 34e80f0114 Add operand info for F3_[12] instructions, getting V8 back to basic functionality.
With this, Regression/CodeGen/SparcV8/basictest.ll now passes.  Lets hear it
for regression tests :)

llvm-svn: 24738
2005-12-16 06:25:42 +00:00
Chris Lattner 0d129ae8b1 A truly trivial testcase to ensure sparcv8 doesn't get completely broken
again.

llvm-svn: 24737
2005-12-16 06:24:55 +00:00
Chris Lattner b527f48acd Remove JIT support, which doesn't work.
llvm-svn: 24736
2005-12-16 06:06:07 +00:00
Chris Lattner 1e1ca1e9a5 add some simple operand info
llvm-svn: 24735
2005-12-16 06:02:58 +00:00
Chris Lattner 08a04cb3f2 rename option for consistency with -mcpu -mattr etc
llvm-svn: 24734
2005-12-16 05:19:55 +00:00
Chris Lattner 77e28af47d rename options
llvm-svn: 24733
2005-12-16 05:19:35 +00:00
Chris Lattner 78e9e10b53 rename option
llvm-svn: 24732
2005-12-16 05:19:18 +00:00