Chris Lattner
47785d8fc3
Add initial conditional branch support. This doesn't actually work yet due
...
to a bug in the scheduler.
llvm-svn: 24807
2005-12-18 01:20:35 +00:00
Chris Lattner
bb6af65f76
Simplify code
...
llvm-svn: 24806
2005-12-18 01:03:46 +00:00
Chris Lattner
9f0ac41d5c
Eliminate CMPri, which is a synonym for SUBCCri
...
llvm-svn: 24805
2005-12-17 23:52:08 +00:00
Chris Lattner
bdb696294e
allow custom expansion of BR_CC
...
llvm-svn: 24804
2005-12-17 23:46:46 +00:00
Chris Lattner
95e9327303
add fneg,fabs,fsqrt instructions
...
llvm-svn: 24803
2005-12-17 23:20:27 +00:00
Chris Lattner
a9adf79113
Add patterns for fround/fextend and the funny fsmuld instruction
...
llvm-svn: 24802
2005-12-17 23:14:30 +00:00
Chris Lattner
ac03e1e55e
Add FP +,-,*,/
...
llvm-svn: 24801
2005-12-17 23:10:46 +00:00
Chris Lattner
13253a829a
Give patterns to F3_3 instructions
...
llvm-svn: 24800
2005-12-17 23:05:35 +00:00
Chris Lattner
057fbaea0d
Implement 64-bit add/sub, make sure to receive and return 64-bit args with
...
the right halves in the right regs
llvm-svn: 24799
2005-12-17 22:55:57 +00:00
Chris Lattner
a4865938dc
implement div and rem
...
llvm-svn: 24798
2005-12-17 22:39:19 +00:00
Chris Lattner
88a3754b46
implement MULHU/MULHS for 64-bit multiplies
...
llvm-svn: 24797
2005-12-17 22:30:00 +00:00
Chris Lattner
7f9e66063d
Add patterns for multiply, simplify Y register handling stuff, add RDY instruction
...
llvm-svn: 24796
2005-12-17 22:22:53 +00:00
Chris Lattner
a4dbacd0d6
Make the addressing modes smarter
...
llvm-svn: 24795
2005-12-17 21:25:27 +00:00
Chris Lattner
9bd197adae
remove some unused instructions
...
llvm-svn: 24794
2005-12-17 21:13:50 +00:00
Chris Lattner
a17cbf352e
add andn/orn/xorn patterns. This allows us to compile this:
...
long %test(ubyte, short, long %X, long %Y) {
%A = xor long %X, -1
%B = and long %Y, %A
ret long %B
}
to this:
test:
save -96, %sp, %sp
andn %i4, %i2, %i0
andn %i5, %i3, %i1
restore %g0, %g0, %g0
retl
nop
instead of this:
test:
save -96, %sp, %sp
xor %i2, -1, %l0
xor %i3, -1, %l1
and %i4, %l0, %i0
and %i5, %l1, %i1
restore %g0, %g0, %g0
retl
nop
The simpleisel emits: :(
test:
save -96, %sp, %sp
or %g0, -1, %l0
or %g0, -1, %l0
or %g0, -1, %l0
or %g0, -1, %l1
xor %i2, %l0, %l0
xor %i3, %l1, %l1
and %i4, %l0, %i0
and %i5, %l1, %i1
restore %g0, %g0, %g0
retl
nop
llvm-svn: 24793
2005-12-17 21:05:49 +00:00
Chris Lattner
3afda7194f
Add support for 64-bit arguments
...
llvm-svn: 24792
2005-12-17 20:59:06 +00:00
Chris Lattner
c1ab8a5e42
Sparc doesn't have sext_inreg
...
llvm-svn: 24791
2005-12-17 20:50:42 +00:00
Chris Lattner
a57b8986ea
add patterns for FP stores
...
llvm-svn: 24790
2005-12-17 20:47:16 +00:00
Chris Lattner
abb86e4e22
Add [reg+reg] integer stores
...
llvm-svn: 24789
2005-12-17 20:44:36 +00:00
Chris Lattner
f9bc70e0ef
Add store patterns
...
llvm-svn: 24788
2005-12-17 20:42:55 +00:00
Chris Lattner
171e828d2d
add truncstore
...
llvm-svn: 24787
2005-12-17 20:42:29 +00:00
Chris Lattner
bdfee98ec0
add fp load patterns, switch rest of loads and stores to use addrmodes
...
llvm-svn: 24786
2005-12-17 20:32:47 +00:00
Chris Lattner
d775f1de68
Add integer load[r+r] forms.
...
llvm-svn: 24785
2005-12-17 20:26:45 +00:00
Chris Lattner
d09afb735d
Rename load/store instructions to include an RI suffix
...
llvm-svn: 24784
2005-12-17 20:18:49 +00:00
Chris Lattner
9133c2c38b
Add patterns for the rest of the loads. Add 'ri' suffixes to the load and store insts
...
llvm-svn: 24783
2005-12-17 20:18:24 +00:00
Chris Lattner
3e51b620ec
Add basic addressing mode support and one load.
...
llvm-svn: 24782
2005-12-17 20:04:49 +00:00
Chris Lattner
399dfec939
eliminate some redundancy
...
llvm-svn: 24781
2005-12-17 19:47:05 +00:00
Chris Lattner
e441738cef
Use a combination of sethi and or to build arbitrary immediates.
...
llvm-svn: 24780
2005-12-17 19:41:43 +00:00
Chris Lattner
39740d3207
Use sethi to build large immediates with zeros at the bottom
...
llvm-svn: 24779
2005-12-17 19:37:00 +00:00
Chris Lattner
5893b95caa
Add shift and small immediate support
...
llvm-svn: 24778
2005-12-17 19:07:57 +00:00
Chris Lattner
81b13ccb01
Add some basic reg-reg instructions
...
llvm-svn: 24777
2005-12-17 18:53:33 +00:00
Chris Lattner
058fe7d1ed
Add empty patterns to all F3_1 instructions
...
llvm-svn: 24776
2005-12-17 18:49:14 +00:00
Evan Cheng
56649f9616
Darwin API issue: indirect load of external and weak symbols.
...
llvm-svn: 24775
2005-12-17 09:13:43 +00:00
Chris Lattner
2ba4a8584c
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
4de7491c52
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
b877ae7929
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
e7408707fd
Add empty patterns for F3_2 instructions
...
llvm-svn: 24771
2005-12-17 08:06:43 +00:00
Chris Lattner
3fca9488d2
Implement LowerArguments, at least for the first 6 integer args
...
llvm-svn: 24770
2005-12-17 08:03:24 +00:00
Chris Lattner
62aadddb9d
Add the framework for a dag-dag isel
...
llvm-svn: 24769
2005-12-17 07:47:01 +00:00
Evan Cheng
a3ff796fda
Remove a few lines of dead code.
...
llvm-svn: 24768
2005-12-17 07:18:44 +00:00
Chris Lattner
adf84860db
asmprinter done, added crucial missing step
...
llvm-svn: 24767
2005-12-17 07:17:59 +00:00
Chris Lattner
91e36127ed
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
2b66656dd9
Switch constant pool printing over to use the Shared AsmPrinter version
...
llvm-svn: 24765
2005-12-17 07:11:43 +00:00
Chris Lattner
9fcfd38a6d
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
de142995a1
Added an idea about any_extend for performance tuning.
...
llvm-svn: 24763
2005-12-17 06:54:43 +00:00
Chris Lattner
cf47f48fe0
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
b3456f1885
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
c308dfb801
Added truncate.
...
llvm-svn: 24760
2005-12-17 02:02:50 +00:00
Evan Cheng
6a94c77c55
Added anyext, modelled as zext on X86.
...
llvm-svn: 24759
2005-12-17 01:47:57 +00:00
Evan Cheng
be5a63c601
Yet another variant of getTargetNode().
...
llvm-svn: 24758
2005-12-17 01:44:51 +00:00