Chris Lattner
34acee9dbd
This patch fixes the nasty bug that caused 175.vpr to fail for X86 last night.
...
The problem occurred when trying to reload this instruction:
MOV32mr %reg2326, 8, %reg2297, 4, %reg2295
The value of reg2326 was available in EBX, so it was reused from there, instead
of reloading it into EDX.
The value of reg2297 was available in EDX, so it was reused from there, instead
of reloading it into EDI.
The value of reg2295 was not available, so we tried reloading it into EBX, its
assigned register. However, we checked and saw that we already reloaded
something into EBX, so we chose what reg2326 was assigned to (EDX) and reloaded
into that register instead.
Unfortunately EDX had already been used by reg2297, so reloading into EDX
clobbered the value used by the reg2326 operand, breaking the program.
The fix for this is to check that the newly picked register is ok. In this
case we now find that EDX is already used and try using EDI, which succeeds.
llvm-svn: 17006
2004-10-15 03:19:31 +00:00
Chris Lattner
2c87b68231
This patch adds and improves debugging output. No functionality changes.
...
llvm-svn: 17005
2004-10-15 03:16:29 +00:00
Nate Begeman
d8183bd297
Better codegen of binary integer ops with 32 bit immediate operands.
...
This transformation fires a few dozen times across the testsuite.
For example, int test2(int X) { return X ^ 0x0FF00FF0; }
Old:
_test2:
lis r2, 4080
ori r2, r2, 4080
xor r3, r3, r2
blr
New:
_test2:
xoris r3, r3, 4080
xori r3, r3, 4080
blr
llvm-svn: 17004
2004-10-15 00:50:19 +00:00
Misha Brukman
e05e5f0655
The field is called imm22', not simply
imm'
...
llvm-svn: 17003
2004-10-14 22:33:32 +00:00
Misha Brukman
4932cb0e94
Synthetic instructions RET and RETL need to have all 3 parameters specified
...
llvm-svn: 17002
2004-10-14 22:32:49 +00:00
Misha Brukman
7b29a7bc80
Class F2_1 already inherits the imm22 field from class F2
...
llvm-svn: 17001
2004-10-14 22:32:24 +00:00
Misha Brukman
4e691d2adb
Generate the SparcV8 code emitter from .td files
...
llvm-svn: 17000
2004-10-14 21:57:19 +00:00
Misha Brukman
5bc4009783
* In the F3_1 class, default asi to 0 because it's not currently used
...
* In the F3_3 class, remove mention of asi because it's not part of the format
llvm-svn: 16999
2004-10-14 21:53:39 +00:00
Misha Brukman
612011d3d5
* We don't use the ENABLE_*_JIT flags in the source base anymore
...
* Convert references to Sparc to SparcV9 to clearly identify CPU type
llvm-svn: 16998
2004-10-14 20:06:36 +00:00
Chris Lattner
7319d9289f
Fix a bug John tracked down in libstdc++ where we were incorrectly deleting
...
weak functions. Thanks for finding this John!
llvm-svn: 16997
2004-10-14 19:53:50 +00:00
Brian Gaeke
ce6dcb0713
Add FSTOI, FDTOI (fp to integer cast) instructions.
...
llvm-svn: 16996
2004-10-14 19:39:35 +00:00
Brian Gaeke
ba65401a4d
Rewrite emitCastOperation, refactoring parts of it into emitIntegerCast, and
...
adding emitFPToIntegerCast.
llvm-svn: 16995
2004-10-14 19:39:34 +00:00
Brian Gaeke
31fa12ece7
Add list of libc procedures we'll use, at some point.
...
Update list of currently failing tests.
ADJCALLSTACK* support is done.
llvm-svn: 16994
2004-10-14 19:39:33 +00:00
Misha Brukman
2f43704b2e
Use the shared Makefile.JIT for JIT-enablement, which also enables the examples
...
to have the JIT functioning on more platforms than just x86
llvm-svn: 16993
2004-10-14 19:02:13 +00:00
Misha Brukman
4043f35251
Use the shared Makefile.JIT for JIT-enablement
...
llvm-svn: 16992
2004-10-14 19:01:25 +00:00
Misha Brukman
6dcdc0f8a3
Add Makefile.JIT to the list of Makefiles transferred to the build dir to give
...
tools and examples a simple way to JIT-enable themselves
llvm-svn: 16991
2004-10-14 18:59:42 +00:00
Misha Brukman
cc9c5e67e3
Transfer Makefile.JIT into the build tree for JIT-enabling tools and examples
...
llvm-svn: 16990
2004-10-14 18:59:09 +00:00
Misha Brukman
86c8f92142
Since several tools and examples want JIT support, factor out the process of
...
adding the right libs for any given architecture's JIT into a single place
llvm-svn: 16989
2004-10-14 18:58:19 +00:00
Misha Brukman
e20eb48c53
Convert tabs to spaces
...
llvm-svn: 16988
2004-10-14 18:47:56 +00:00
Chris Lattner
44e34a155c
Make sure any client of Dominators.h links in Dominators.cpp
...
Patch by Morten Ofstad
llvm-svn: 16987
2004-10-14 15:47:16 +00:00
Chris Lattner
df0849be71
Make sure any client of Dominators.h links in Dominators.cpp
...
llvm-svn: 16986
2004-10-14 15:46:59 +00:00
Chris Lattner
3fc5e3778f
Do not use the same variable name for two different variables in the
...
same scope. This confused VC++ (and probably people too!). Patch by
Morten Ofstad!
llvm-svn: 16985
2004-10-14 14:59:16 +00:00
Chris Lattner
1bd3fdd438
Remove unneeded typedef, patch by Morten Ofstad
...
llvm-svn: 16984
2004-10-14 14:51:09 +00:00
Misha Brukman
66261f021d
* Claim to support machine code emission - return false from
...
addPassesToEmitMachineCode()
* Add support for registers and constants in getMachineOpValue()
This enables running "int main() { ret 0 }" via the PowerPC JIT.
llvm-svn: 16983
2004-10-14 06:39:56 +00:00
Misha Brukman
628db67ac2
Enable the PowerPC JIT by compiling powerpc.o library into lli
...
llvm-svn: 16982
2004-10-14 06:35:11 +00:00
Misha Brukman
cb4130c28c
* Include the real (generated) version of getBinaryCodeForInstr()
...
* Add implementation of getMachineOpValue() for generated code emitter
* Convert assert()s in unimplemented functions to abort()s so that non-debug
builds fail predictably
* Add file header comments
llvm-svn: 16981
2004-10-14 06:07:25 +00:00
Misha Brukman
11d1764f74
* Make a PPC32-specific code emitter because we have separate classes for 32-
...
and 64-bit code emitters that cannot share code unless we use virtual
functions
* Identify components being built by tablegen with more detail by assigning them
to PowerPC, PPC32, or PPC64 more specifically; also avoids seeing 'building
PowerPC XYZ' messages twice, where one is for PPC32 and one for PPC64
llvm-svn: 16980
2004-10-14 06:04:56 +00:00
Tanya Lattner
8a4773acb3
Checking in code that works on my simple test case. However, there is still a bug with branches that I need to fix.
...
llvm-svn: 16979
2004-10-14 06:04:28 +00:00
Misha Brukman
5e8bfd0675
There is only one field in an instruction, and that is `Inst', the final view of
...
the instruction binary format, all others are simply operands and should not
have the `field' label
llvm-svn: 16978
2004-10-14 05:55:37 +00:00
Misha Brukman
47c2236ae9
PowerPC instruction definitions use LittleEndian-style encoding [0..31]
...
llvm-svn: 16977
2004-10-14 05:54:38 +00:00
Misha Brukman
628b2ba095
Add isLittleEndianEncoding to InstrInfo class, defaults to `off'
...
llvm-svn: 16976
2004-10-14 05:53:40 +00:00
Misha Brukman
4e252ebfa0
* 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
llvm-svn: 16975
2004-10-14 05:53:01 +00:00
Misha Brukman
a87a2029e4
* Add option to read isLittleEndianEncoding for InstrInfo classes
...
* Doxygen-ify some function comments
llvm-svn: 16974
2004-10-14 05:50:43 +00:00
Chris Lattner
88ad718c75
When converting phi nodes into select instructions, we shouldn't promote PHI
...
nodes unless we KNOW that we are able to promote all of them.
This fixes: test/Regression/Transforms/SimplifyCFG/PhiNoEliminate.ll
llvm-svn: 16973
2004-10-14 05:13:36 +00:00
Chris Lattner
b1f34a989b
When converting phi nodes into select instructions, we shouldn't promote PHI
...
nodes unless we KNOW that we are able to promote all of them. In this case
promoting the phi to a select is silly because we will always have to do the
call conditionally. As such, select promotion is actually a pessimization.
llvm-svn: 16972
2004-10-14 05:12:50 +00:00
Reid Spencer
7689de0e49
Allow this file to compile on Darwin.
...
llvm-svn: 16971
2004-10-14 03:33:25 +00:00
Reid Spencer
d3c912a7b0
Use __MINGW instead of __MING. Patch contributed by Henrik Bach.
...
llvm-svn: 16970
2004-10-14 03:09:02 +00:00
Reid Spencer
86b05297be
Get proper BSD #includes for MappedFile implementation.
...
llvm-svn: 16969
2004-10-14 03:06:59 +00:00
Reid Spencer
27ae06c1db
Implementation of MappedFile for Win32. Patch provided by Jeff Cohen.
...
llvm-svn: 16968
2004-10-14 03:05:59 +00:00
Chris Lattner
ad57c9f54c
Today is not my day. Fix broken #
...
llvm-svn: 16967
2004-10-14 02:31:35 +00:00
Chris Lattner
d2a5066c6a
unbreak previous checkin :(
...
llvm-svn: 16966
2004-10-14 02:06:48 +00:00
Chris Lattner
93bfff6da2
Add back a missing paren
...
llvm-svn: 16965
2004-10-14 01:57:28 +00:00
Chris Lattner
aef5a2d78d
Fit to 80 cols
...
llvm-svn: 16964
2004-10-14 01:49:34 +00:00
Chris Lattner
2ed4986e00
Wrap to 80 cols, delete some seriously old debugging printouts
...
llvm-svn: 16963
2004-10-14 01:46:07 +00:00
Chris Lattner
3f3d5aad47
Fit in 80 columns
...
llvm-svn: 16962
2004-10-14 01:39:18 +00:00
Chris Lattner
bdb8db1a40
Minor cleanups
...
llvm-svn: 16961
2004-10-14 01:35:17 +00:00
Chris Lattner
8dd656b17b
Patch to make VS happier, thanks to Morten Ofstad for pointing this out.
...
llvm-svn: 16956
2004-10-13 15:25:46 +00:00
Chris Lattner
ae45589b0f
Use explicit std:: qualification to avoid relying on Koenig lookup, which
...
VC++ does not do properly. Thanks to Morten Ofstad for the patch!
llvm-svn: 16955
2004-10-13 15:11:23 +00:00
Chris Lattner
a4756fd6be
Get rid of template templates that were preventing VC from compiling the
...
set_intersect template. Thanks to Morten Ofstad and Jeff Cohen for the
patch!
llvm-svn: 16954
2004-10-13 15:09:21 +00:00
Reid Spencer
79843fb7d9
Changes for automake.
...
llvm-svn: 16953
2004-10-13 11:56:07 +00:00