Joel Dice
c80eb51c17
Merge branch 'master' into powerpc
...
Conflicts:
makefile
src/assembler.h
src/compile.cpp
src/compiler.cpp
src/compiler.h
src/finder.cpp
2008-11-11 08:21:48 -07:00
Joel Dice
2304a656cf
in releaseRegister, if the register is not the exclusive site of a value, steal it
2008-11-10 21:25:36 -07:00
Joel Dice
96a7c71c30
fix loading 8-byte values on 32-bit systems
2008-11-10 19:12:36 -07:00
Joel Dice
5fc9ad058b
more bugfixes; all tests pass on amd64
2008-11-10 17:07:44 -07:00
Joel Dice
00d8142de9
various bugfixes; all but one test are passing on amd64
2008-11-09 16:56:37 -07:00
Joel Dice
000aeb25c1
handle case where first instruction is the target of a branch properly
2008-11-08 16:21:30 -07:00
Joel Dice
decd24965a
implement multiplyCR and divideCR
2008-11-08 15:42:26 -07:00
Joel Dice
61539bae31
fix stack mapping bugs which broke GC
2008-11-08 15:36:38 -07:00
Joel Dice
312539af64
fix moves involving sign or zero extension
2008-11-08 13:47:26 -07:00
Joel Dice
f01f4441d9
various bugfixes and instructions implemented to get more tests passing
2008-11-06 17:39:38 -07:00
Joel Dice
1ba497d90a
fix Exceptions test for amd64
2008-11-02 15:25:51 -07:00
Joel Dice
04da77e95b
snapshot
2008-11-02 13:35:35 -07:00
Joel Dice
3e81405a33
snapshot
2008-11-01 16:16:18 -06:00
Joel Dice
dd4dc18916
snapshot
2008-11-01 13:14:13 -06:00
Joel Dice
6f1d02dae7
remove the libstdc++ dependency once and for all
...
The trick is to make all destructors non-virtual. This is safe because
we never use the delete operator, which is the only case where virtual
destructors are relevant. This is a better solution than implementing
our own delete operator, because we want libraries loaded at runtime to
use the libstdc++ version, not ours.
2008-10-28 15:40:50 -06:00
Joel Dice
d20ee74d79
fix stack frame offset calculations for 64-bit values; insert dummy events for instructions which start with stack activity
2008-10-24 20:12:02 -06:00
Joel Dice
7d6ca28b2f
snapshot
2008-10-18 18:15:57 -06:00
Joel Dice
26614e2182
use same code to spill registers and stack frame slots
2008-10-16 18:10:35 -06:00
Joel Dice
5391c68efd
bugfixes
2008-10-14 18:45:31 -06:00
Joel Dice
aaaf388652
fix handling of instructions which are targets of more than one conditional branch
2008-10-13 18:18:18 -06:00
Joel Dice
3c798f5bd7
various bugfixes concerning control flow boundaries
2008-10-11 18:23:08 -06:00
Joel Dice
81cb951b08
fix stack corruption due to spurious pop events generated for jsr bytecodes
2008-10-09 17:14:52 -06:00
Joel Dice
83d5d6fde4
avoid unnecessary moves in resolveJunctionSite; distinguish between branches and other events when deciding when to marshal values at junctions
2008-10-07 18:08:13 -06:00
Joel Dice
f6c4496166
various bugfixes
2008-10-05 18:50:59 -06:00
Joel Dice
adb63778f0
fix stack and local snapshots for DummyEvents
2008-10-04 18:14:43 -06:00
Joel Dice
83aa342bc8
hello, world on amd64
2008-10-04 11:26:35 -06:00
Joel Dice
df75153a85
handle case of null Stack::pushEvent in CallEvent ctor
2008-09-30 11:22:46 -06:00
Joel Dice
d409f89d5d
ensure that only one value holds a given frame site at at time
2008-09-28 15:56:12 -06:00
Joel Dice
61c708d7b2
reserve stack space for arguments to native calls
2008-09-28 13:00:52 -06:00
Joel Dice
c699725cf8
avoid running out of registers when picking junction sites
2008-09-27 16:01:39 -06:00
Joel Dice
11c2afbf91
bugfixes
2008-09-24 18:48:32 -06:00
Joel Dice
f2bf152eba
more bugfixes
2008-09-23 18:01:42 -06:00
Joel Dice
d4938115ef
various bugfixes
2008-09-23 15:18:41 -06:00
Joel Dice
b8dd495ada
fix build
2008-09-22 08:28:18 -06:00
Joel Dice
86bec5e3b7
sketch out handling of reads at control flow blocks with multiple predecessors
2008-09-21 18:58:54 -06:00
Joel Dice
1b4ad1db42
snapshot
2008-09-20 17:42:46 -06:00
Joel Dice
606e5cb238
lots of bugfixes - finally got Simple.pow() working
2008-09-14 20:28:42 -06:00
Joel Dice
bd9e8a77e2
improved tracking of data flow across control flow boundaries
2008-09-13 15:09:26 -06:00
Joel Dice
392a1417e5
lots of bugfixes and a few instructions added
2008-09-08 18:31:19 -06:00
Joel Dice
dcdf78dc44
fix localOffset calculation
2008-09-07 20:21:11 -06:00
Joel Dice
af9758a6d3
got a simple arithmetic test working
2008-09-07 14:12:11 -06:00
Joel Dice
9971eaa92a
support out-of-order compilation in x86 assembler
2008-09-06 19:37:12 -06:00
Joel Dice
ed806ca740
working towards compiling simple methods
2008-09-06 15:25:41 -06:00
Joel Dice
e13b755048
more progress towards new JIT code - this compiles but won't run properly
2008-09-05 09:00:38 -06:00
Joel Dice
5f7d68b404
snapshot
2008-08-30 14:12:27 -06:00
Joel Dice
767c3ce2e4
snapshot
2008-08-28 16:43:35 -06:00
Joel Dice
a062d8c975
progress towards refactored JIT compiler to support PowerPC and data flow analysis across control flow boundaries
2008-08-23 12:04:36 -06:00
Joel Dice
9efe6f1f05
snapshot
2008-08-16 11:45:36 -06:00
Joel Dice
29df431df5
snapshot
2008-07-23 17:58:29 -06:00
Joel Dice
f0c9deaa06
snapshot
2008-07-17 17:34:38 -06:00
Joel Dice
23043d140f
snapshot
2008-07-05 14:21:13 -06:00
Joel Dice
eabb37e6eb
add lcmp instruction to Compiler and corresponding LongCompare instruction to Assembler, since that's the only efficient way to implement the lcmp bytecode on x86
2008-06-12 10:56:48 -06:00
Joel Dice
94f7efc160
ignore contents of stack location in popNow if the value already resides elsewhere besides the stack
2008-06-11 08:47:06 -06:00
Joel Dice
633ef83fa1
fix handling of values which appear more than once on the stack in trySteal
2008-06-10 18:48:46 -06:00
Joel Dice
b80a3cea85
handle constant comparisons (sometimes generated by ProGuard) in compiler
2008-06-10 18:17:44 -06:00
Joel Dice
fc8c5a2ea9
fix a few bugs revealed by ProGuard optimizations, including too-early constant propagation during array loads and stores
2008-06-10 08:49:13 -06:00
Eric Scharff
33306aa2f5
Fix warning on confused Mac OS X gcc 4.0
2008-06-02 10:12:09 -06:00
Joel Dice
2f3e1ea393
fix incorrect debug logging message
2008-05-31 19:40:18 -06:00
Joel Dice
7cdff9f1ee
disable debug logging and fix build warnings
2008-05-31 17:06:45 -06:00
Joel Dice
eacca98c3f
fix regressions affecting 32-bit systems
2008-05-31 16:53:37 -06:00
Joel Dice
e68a18248c
use codePromise helper function in CallEvent ctor
2008-05-31 16:24:04 -06:00
Joel Dice
65830a76c5
improve efficiency of array bounds checks and generate a thunk table for native functions called indirectly
2008-05-31 16:14:27 -06:00
Joel Dice
3326aafdac
various 32-bit fixes
2008-05-22 11:15:18 -06:00
Joel Dice
21cb1c3c8f
remove Event::validate, since it is no longer needed and actually causes trouble
2008-05-20 16:47:53 -06:00
Joel Dice
36dbf1ad14
fix another local variable caching bug
2008-05-20 15:24:10 -06:00
Joel Dice
d604efd8f5
fix local variable caching bug
2008-05-20 13:11:42 -06:00
Joel Dice
983e64c86a
preserve old value of local variable *before* it is overwritten
2008-05-19 10:14:54 -06:00
Joel Dice
83da1ec205
preserve old value of local variable across store if it will be used later; tweak site ownership transfer in MoveEvent.compile
2008-05-19 08:53:40 -06:00
Joel Dice
08a1921eb7
only set target equal to src->source in MoveEvent.compile if it is a simple load or store
2008-05-19 07:44:39 -06:00
Joel Dice
b52cefa86e
disallow memory operands in 32-bit comparisons on amd64
2008-05-19 07:27:05 -06:00
Joel Dice
3c30e815ec
optimize multiple loads from the same local variable
2008-05-18 22:31:52 -06:00
Joel Dice
b6b84af123
various bugfixes
2008-05-17 21:32:14 -06:00
Joel Dice
2bb310981d
clean up MoveEvent.compile
2008-05-17 19:26:36 -06:00
Joel Dice
85a772b0a7
add read of size 4 in CombineEvent for first operand of shift operation
2008-05-16 10:18:36 -06:00
Joel Dice
790e2fee42
respect constraints specified by Assembler::plan in MoveEvent::compile
2008-05-16 10:01:24 -06:00
Joel Dice
21c5eb2d9e
fix thinko in appendCombine
2008-05-15 18:35:17 -06:00
Joel Dice
7f72a6469d
more register marshalling bugfixes; simple swt apps now run on amd64
2008-05-15 17:19:23 -06:00
Joel Dice
bbd1ee5540
various register marshalling bugfixes
2008-05-15 14:00:57 -06:00
Joel Dice
2ed6247cec
fix freezing and thawing of read sites where the same value is read multiple times in compile()
2008-05-15 08:29:19 -06:00
Joel Dice
505d6df7ae
reorder code in CallEvent ctor to ensure we don't clobber argument registers when it comes time to marshal values for reading
2008-05-14 18:04:25 -06:00
Joel Dice
73b8cc5595
fix unused variable warnings
2008-05-14 17:19:41 -06:00
Joel Dice
482065f91a
fix code ordering bug in popNow()
2008-05-14 16:36:22 -06:00
Joel Dice
08beaad1b6
various bugfixes related to new register allocation code
2008-05-13 11:27:57 -06:00
Joel Dice
a40635fdba
rework register allocation to be more flexible
2008-05-12 07:54:47 -06:00
Joel Dice
f1809897bd
fix build
2008-05-06 15:13:02 -06:00
Joel Dice
efb30b2256
progress towards more flexible register allocation in compiler
2008-05-04 14:55:34 -06:00
Joel Dice
e2b24263a2
various bugfixes
2008-04-30 09:44:17 -06:00
Joel Dice
3909e3f032
fix thinko concerning stack resets in compile()
2008-04-29 17:18:28 -06:00
Joel Dice
3fa3fd0796
fix stack index calculation when pushing operands
2008-04-29 14:24:08 -06:00
Joel Dice
9dafe37ff3
fix code ordering bug in MyCompiler::peek
2008-04-29 10:55:56 -06:00
Joel Dice
377e2864d9
fix argument marshalling for floating point helper functions on 32-bit systems
2008-04-29 10:40:44 -06:00
Joel Dice
d50e3aaee0
preserve operands to CombineEvent and TranslateEvent when necessary
2008-04-29 10:25:20 -06:00
Joel Dice
22382a5c8b
fix amd64 regression in PushEvent::skipMove
2008-04-29 09:30:41 -06:00
Joel Dice
c96f44d77d
don't skip move when MoveEvent is followed by a PushEvent which is not active; use existing register site in ValueSite when possible
2008-04-29 08:59:12 -06:00
Joel Dice
8738bddcb9
bugfixes, mainly concerning 32-bit machines
2008-04-28 16:08:31 -06:00
Joel Dice
1b5f14d847
re-enable tests in Misc and get them working
2008-04-28 09:53:48 -06:00
Joel Dice
8be4cf8fa6
fix pushState and popState to work as intended
2008-04-27 15:58:29 -06:00
Joel Dice
5b7372a3bb
various bugfixes; majority of tests now pass
2008-04-27 14:15:18 -06:00
Joel Dice
d5137a7cdf
use stack instead of registers to save data across jumps and branches; bugfixes
2008-04-26 14:56:03 -06:00
Joel Dice
571bffde09
fix some issues with 64-bit moves on 32-bit machines
2008-04-20 20:50:46 -06:00
Joel Dice
6b4cafd962
fix argument marshalling on amd64
2008-04-20 18:21:48 -06:00
Joel Dice
d6c3b2327f
bugfixes; enums test now succeeds
2008-04-20 13:35:36 -06:00
Joel Dice
8ebff705d6
various fixes
2008-04-19 23:23:08 -06:00
Joel Dice
281bdb1fab
avoid inserting redundant stack sync events
2008-04-19 20:05:17 -06:00
Joel Dice
fb06f7634c
fix thinko in MyCompiler::pushed
2008-04-19 19:08:26 -06:00
Joel Dice
8baa2bbd87
insert stack sync events before each instruction with more than one predecessor
2008-04-19 18:43:12 -06:00
Joel Dice
eb77687a57
hello, world
2008-04-19 15:52:45 -06:00
Joel Dice
7b8b7a7b11
snapshot
2008-04-19 14:41:31 -06:00
Joel Dice
b19c52b501
control flow bugfixes
2008-04-19 01:03:59 -06:00
Joel Dice
ab7314e526
more bugfixes
2008-04-18 18:19:45 -06:00
Joel Dice
8fd1290d02
various data flow bugfixes
2008-04-18 12:36:57 -06:00
Joel Dice
a053a228f0
optimize move,op sequences where op doesn't care where its source operand comes from
2008-04-18 11:30:54 -06:00
Joel Dice
c1ba7a7d58
optimize op,move sequences where op can place its result directly into the move's destination
2008-04-18 11:00:55 -06:00
Joel Dice
44b3a7c36d
various bugfixes
2008-04-17 22:16:20 -06:00
Joel Dice
329009ae97
bugfixes involving stack operations
2008-04-17 21:47:42 -06:00
Joel Dice
af2c2e019c
various bugfixes
2008-04-17 18:39:41 -06:00
Joel Dice
a7134a2cd7
fix build
2008-04-17 16:07:32 -06:00
Joel Dice
f8a5d02f67
more compiler work
2008-04-17 14:48:26 -06:00
Joel Dice
3f45d39582
more compiler work
2008-04-16 20:55:38 -06:00
Joel Dice
f85510c4c4
more work on design sketch of new compiler
2008-04-16 14:58:21 -06:00
Joel Dice
525f733171
Merge branch 'master' into compiler
...
Conflicts:
src/compile.cpp
src/compiler.cpp
src/compiler.h
2008-04-13 13:48:20 -06:00
Joel Dice
b7ea937708
rough sketch of refined compiler design
2008-04-13 12:54:50 -06:00
Joel Dice
d77ffa8e21
convert relative calls to absolute indirect calls on x86_64, in case we need to jump further than a 32-bit displacement will allow
2008-04-13 11:16:27 -06:00
Joel Dice
2d6eebf4d1
more progress on general stack tracing
2008-04-09 13:08:13 -06:00
Joel Dice
a51c4cef39
bugfixes
2008-03-16 13:38:43 -06:00
Joel Dice
684b402e82
bugfixes and new instructions
2008-03-15 17:54:20 -06:00
Joel Dice
420a054fd8
support 1- and 2-byte moves to memory
2008-03-15 15:02:19 -06:00
Joel Dice
8141fc21b4
release base and index values of AbstractMemoryValue if necessary; bugfixes
2008-03-15 14:44:14 -06:00
Joel Dice
6bf0ca5bd9
various bugfixes and new instructions
2008-03-15 14:24:04 -06:00
Joel Dice
6a9fbc0c17
allow assembler to acquire and release temporary registers; new machine instruction implementations; bugfixes
2008-03-13 17:43:11 -06:00
Joel Dice
406f173982
handle constant array lengths and indexes properly; various bugfixes
2008-03-13 14:50:56 -06:00
Joel Dice
c5b8b83cc7
clean up code for optimizing stack operations
2008-03-11 10:40:28 -06:00
Joel Dice
9e2e614a15
various fixes to get invokevirtual working
2008-03-10 16:37:21 -06:00
Joel Dice
0fe748c3a1
avoid unecessary mov instructions
2008-03-10 07:29:42 -06:00
Joel Dice
888836f8cd
use push and pop for stack operations instead of mov
2008-03-09 15:27:51 -06:00
Joel Dice
3317149cd2
Merge branch 'master' into compiler
...
Conflicts:
src/x86.cpp
2008-02-26 17:56:35 -07:00
Joel Dice
2edaa82801
prepend copyright notice and license to all source files; add license.txt and readme.txt
2008-02-19 11:06:52 -07:00
Joel Dice
e8ed2a4749
various bugfixes in new compiler
2008-02-17 15:29:04 -07:00
Joel Dice
d654c943f3
various bugfixes and tweaks in new compiler, primarily related to duplicating stack operands
2008-02-17 13:57:40 -07:00
Joel Dice
6271f878e8
include function prologue and epilogue when compiling
2008-02-12 08:21:51 -07:00
Joel Dice
fa513beb2f
rework compiler interface to explicitly accept a size parameter for each operation where relevant
2008-02-11 19:06:12 -07:00
Joel Dice
b9fa7179d9
more work on new compiler; addition now works
2008-02-11 17:20:32 -07:00
Joel Dice
5b2f351f01
adapt compile.cpp to new compiler
2008-02-11 10:21:41 -07:00
Joel Dice
88a8e74a53
fix register to memory mov1 implementation
2008-01-18 15:01:50 -07:00
Joel Dice
2f83468b80
remove context argument from Allocator::tryAllocate and Allocator::allocate, since we aren't using it after all
2008-01-14 16:37:24 -07:00
Joel Dice
0298865efa
refactor memory allocation to allow better detection and handling of low-memory conditions
2008-01-13 15:05:08 -07:00
Joel Dice
a56c0ad2ef
fix predicate used to determine whether to resolve address operands
2008-01-11 11:11:31 -07:00
Joel Dice
13fae991fd
resolve address operands only when writing the final output
2008-01-11 09:44:16 -07:00
Joel Dice
09a83e63b8
change mov to mov8 in return8
2008-01-10 15:41:57 -07:00
Joel Dice
a17cbf2880
fix reversed operand encoding for shift instructions
2008-01-10 14:56:08 -07:00