Chris Lattner
08b7d5b032
Document unreachable instruction
...
llvm-svn: 17033
2004-10-16 18:04:13 +00:00
Chris Lattner
cd196a9444
Add missing 'Instruction Opcodes' bullet to TOC
...
Update for changes in LLVM 1.4 bytecode format.
llvm-svn: 17032
2004-10-16 18:03:55 +00:00
Chris Lattner
1a709646e7
Add a missing dependency
...
llvm-svn: 17031
2004-10-16 17:12:55 +00:00
Chris Lattner
947ecace14
Fix file header
...
llvm-svn: 17030
2004-10-16 16:37:42 +00:00
Chris Lattner
3c3e058406
Be more careful about looking for constants when we really want constantint's.
...
llvm-svn: 17029
2004-10-16 16:07:10 +00:00
Chris Lattner
db6a9fdf38
None of these have actually been implemented yet.
...
llvm-svn: 17027
2004-10-16 00:29:30 +00:00
Chris Lattner
f22be93428
Move the implementation of the instructions clone methods to this file so
...
that the vtables for these classes are only instantiated in this translation
unit, not in every xlation unit they are used.
llvm-svn: 17026
2004-10-15 23:52:53 +00:00
Chris Lattner
a47839f165
Move the implementation of the clone method for these classes to
...
Instructions.cpp, so that a vtable is not emitted into every translation unit
that uses the classes.
llvm-svn: 17025
2004-10-15 23:52:05 +00:00
Misha Brukman
b889b2ad97
Fix hyphenation and quoting style for great justice
...
llvm-svn: 17024
2004-10-15 23:22:48 +00:00
Chris Lattner
c4f93ac159
There is no reason not to build these in parallel
...
llvm-svn: 17023
2004-10-15 23:22:15 +00:00
Misha Brukman
65c23ee5d3
Add a space between the type and name of value when printing error message
...
llvm-svn: 17022
2004-10-15 23:08:50 +00:00
Chris Lattner
0bc0f1d8de
Don't print a bunch of metrics that are meaningless for external functions
...
llvm-svn: 17017
2004-10-15 19:40:31 +00:00
Chris Lattner
cf809786dc
Fix broken links
...
llvm-svn: 17016
2004-10-15 17:04:28 +00:00
Chris Lattner
15914416ec
Instruction select globals with offsets better. For example, on this test
...
case:
int C[100];
int foo() {
return C[4];
}
We now codegen:
foo:
mov %EAX, DWORD PTR [C + 16]
ret
instead of:
foo:
mov %EAX, OFFSET C
mov %EAX, DWORD PTR [%EAX + 16]
ret
Other impressive features may be coming later.
This patch is contributed by Jeff Cohen!
llvm-svn: 17011
2004-10-15 05:05:29 +00:00
Chris Lattner
3b78938b9e
Give the X86 JIT the ability to encode global+disp constants. Patch
...
contributed by Jeff Cohen!
llvm-svn: 17010
2004-10-15 04:53:13 +00:00
Chris Lattner
19025d5ad0
Give the X86 asm printer the ability to print out addressing modes that have
...
constant displacements from global variables. Patch by Jeff Cohen!
llvm-svn: 17009
2004-10-15 04:44:53 +00:00
Chris Lattner
df7b984f5a
Allow X86 addressing modes to represent globals with offsets. Patch contributed
...
by Jeff Cohen!
llvm-svn: 17008
2004-10-15 04:43:20 +00:00
Chris Lattner
3065220deb
Allow machine operands to represent global variables with offsets. This is
...
useful when you have a reference like:
int A[100];
void foo() { A[10] = 1; }
In this case, &A[10] is a single constant and should be treated as such.
Only MO_GlobalAddress and MO_ExternalSymbol are allowed to use this field, no
other operand type is.
This is another fine patch contributed by Jeff Cohen!!
llvm-svn: 17007
2004-10-15 04:38:41 +00:00
Chris Lattner
2152236351
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
9af0572a37
This patch adds and improves debugging output. No functionality changes.
...
llvm-svn: 17005
2004-10-15 03:16:29 +00:00
Nate Begeman
a15c246af9
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
aa8f87c83c
The field is called `imm22', not simply `imm'
...
llvm-svn: 17003
2004-10-14 22:33:32 +00:00
Misha Brukman
b03f27c96c
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
b34fcdaa46
Class F2_1 already inherits the imm22 field from class F2
...
llvm-svn: 17001
2004-10-14 22:32:24 +00:00
Misha Brukman
7183fc3a84
Generate the SparcV8 code emitter from .td files
...
llvm-svn: 17000
2004-10-14 21:57:19 +00:00
Misha Brukman
98ebcd88f2
* 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
692979c1e2
* 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
5d33e8e73a
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
1f864b5583
Add FSTOI, FDTOI (fp to integer cast) instructions.
...
llvm-svn: 16996
2004-10-14 19:39:35 +00:00
Brian Gaeke
1519c24cff
Rewrite emitCastOperation, refactoring parts of it into emitIntegerCast, and
...
adding emitFPToIntegerCast.
llvm-svn: 16995
2004-10-14 19:39:34 +00:00
Brian Gaeke
38a4dd3d15
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
f9898d7189
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
7c169be339
Use the shared Makefile.JIT for JIT-enablement
...
llvm-svn: 16992
2004-10-14 19:01:25 +00:00
Misha Brukman
c04ade7c4f
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
e62f4dd7b9
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
68baa6a7a9
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
9372c95fde
Convert tabs to spaces
...
llvm-svn: 16988
2004-10-14 18:47:56 +00:00
Chris Lattner
eb6b8e5772
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
36e629a3ea
Make sure any client of Dominators.h links in Dominators.cpp
...
llvm-svn: 16986
2004-10-14 15:46:59 +00:00
Chris Lattner
52a126cb3e
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
645d8c2863
Remove unneeded typedef, patch by Morten Ofstad
...
llvm-svn: 16984
2004-10-14 14:51:09 +00:00
Misha Brukman
1f596c3358
* 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
789587f128
Enable the PowerPC JIT by compiling powerpc.o library into lli
...
llvm-svn: 16982
2004-10-14 06:35:11 +00:00
Misha Brukman
8b1bf4323f
* 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
c2d6aaeaa0
* 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
d38a7605d8
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
189f3dc8d2
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
d6ac8f5e5a
PowerPC instruction definitions use LittleEndian-style encoding [0..31]
...
llvm-svn: 16977
2004-10-14 05:54:38 +00:00
Misha Brukman
dba1f62eb8
Add isLittleEndianEncoding to InstrInfo class, defaults to `off'
...
llvm-svn: 16976
2004-10-14 05:53:40 +00:00
Misha Brukman
8393c15b28
* 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