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
Joel Dice
4c938d496e
fix 64-bit bitshifts on 32-bit systems
2008-01-10 13:47:55 -07:00
Joel Dice
15f627701b
fix thinko in 8-byte shift operation implementations
2008-01-10 11:38:25 -07:00
Joel Dice
8e5ce11047
refactor memory management code
...
We now support immortal objects, which the GC will scan for references
but not consider for collection. On x86_64, we allocate JIT code memory
via mmap, which lets us map memory into the bottom 2GB of the address
space, ensuring that 32-bit relative jumps and calls work.
2008-01-09 18:20:36 -07:00
Joel Dice
1a79fc45df
change jump offset asserts to expects
2008-01-08 17:30:55 -07:00
Joel Dice
96ddae1742
assert that jump offsets fit into 32-bit words
2008-01-08 17:23:10 -07:00
Joel Dice
ef06be3904
fix bad machine code generated for mov2
2008-01-07 18:33:49 -07:00
Joel Dice
74a7da3010
implement and8, or8, and xor8 for 32-bit systems
2008-01-07 16:30:45 -07:00
Joel Dice
89b60bfba0
fix incorrect encoding of neg instruction
2008-01-03 19:16:29 -07:00
Joel Dice
c119d4362e
fix swapped machine codes for sar/shr instructions
2008-01-03 17:29:33 -07:00
Joel Dice
651a27f73e
sign-extend array indexes from 32 to 64 bits on amd64; provide useful messages for certain runtime exceptions
2008-01-03 11:37:00 -07:00
Joel Dice
f151d85f4e
intercept SIGSEGV and throw NullPointerExceptions
2007-12-31 15:40:56 -07:00
Joel Dice
069a760918
snapshot
2007-12-30 15:24:48 -07:00
Joel Dice
8d140c162d
eliminate unecessary register and memory operand construction
2007-12-28 08:42:30 -07:00
Joel Dice
96f3749c01
implement 64-bit shift instructions for 32-bit arch; code cleanups
2007-12-27 15:55:59 -07:00
Joel Dice
8e7f3b6821
add force_align_arg_pointer attribute to divideLong and moduloLong functions for OSX
2007-12-27 08:28:25 -07:00
Joel Dice
848a67b397
implement jsr, jsr_w, and ret; various bugfixes to get SWT example working in JIT mode
2007-12-26 16:59:55 -07:00
Joel Dice
fdd57ad326
do a 32-bit comparison for cmp4 instruction on amd64
2007-12-26 12:18:51 -07:00
Joel Dice
6ed28a13c3
fix x86-32 regressions due to JIT refactoring
2007-12-26 10:16:21 -07:00
Joel Dice
b361e1b637
refactor JIT code to make operand size an explicit part of each applicable instruction
2007-12-26 09:56:14 -07:00
Joel Dice
8cd18d6193
more JIT bugfixes
2007-12-23 13:06:24 -07:00
Joel Dice
f87a78833b
fix JIT regressions on amd64
2007-12-23 12:18:34 -07:00
Joel Dice
15857135c0
more JIT fixes; all tests now pass on x86-32
2007-12-23 11:48:22 -07:00
Joel Dice
31cf1754ce
fix frame trace bug leading to incomplete stack coverage during GC; fix thinko pushing arguments in vmInvoke
2007-12-23 11:01:41 -07:00
Joel Dice
6c532e2ba4
fix register allocation bugs in floating point instructions
2007-12-22 17:15:46 -07:00
Joel Dice
f116225933
fix 64-bit arithmetic support on x86-32
2007-12-22 17:00:35 -07:00
Joel Dice
0dfdcd87d9
Merge jdpc:p/vm/
2007-12-21 17:32:21 -07:00
Joel Dice
a867e4d587
snapshot
2007-12-21 17:26:55 -07:00
Joel Dice
e58972a968
fix regression in push instruction on amd64
2007-12-20 16:47:01 -07:00
Joel Dice
06109792e5
JIT build fixes
2007-12-20 16:19:48 -07:00
Joel Dice
640d1d0654
sketch some 64-bit-arithmetic-on-32-bit-system instructions
2007-12-20 09:02:00 -07:00
Joel Dice
be42c325d8
32-bit JIT bugfixes; still broken
2007-12-19 18:42:12 -07:00
Joel Dice
7dd81c803a
fix native call argument marshalling regression
2007-12-19 17:02:32 -07:00
Joel Dice
9b08fe083c
snapshot
2007-12-18 18:28:55 -07:00
Joel Dice
3bafbf08bb
implement shr and ushr; teach add and sub about 32 bit immediate operands
2007-12-17 19:10:12 -07:00
Joel Dice
b2cb8e0a69
JIT bugfixes; implement or and xor
2007-12-17 17:22:37 -07:00
Joel Dice
5c807a4ddc
implement shl; fix thinko in Frame::Protector; fix uninitialized value warnings
2007-12-17 15:38:59 -07:00
Joel Dice
4c3a2575ba
lots of JIT bugfixes; all top-level tests now pass
2007-12-17 13:55:31 -07:00
Joel Dice
25ea07aed5
snapshot - JIT broken
2007-12-16 18:46:46 -07:00
Joel Dice
56a8ce8fb1
more JIT bugfixes; implement mul instruction
2007-12-16 16:52:38 -07:00
Joel Dice
fb29fd11d8
more JIT bugfixes
2007-12-16 14:30:19 -07:00
Joel Dice
796a64a426
lots of JIT bugfixes and cleanups
2007-12-15 17:24:15 -07:00
Joel Dice
403a6b0200
lots of JIT bugfixes
2007-12-14 18:11:01 -07:00
Joel Dice
12e10b57f5
JIT bugfixes and new instructions; exception propagation and stack traces are functional but not yet entirely correct
2007-12-14 11:27:56 -07:00
Joel Dice
b3918a0d7d
support encoding instructions with indexed and scaled memory offsets
2007-12-13 18:59:56 -07:00
Joel Dice
ec8fc80ebe
refactor compile.cpp to delay code generation until after all byte code has been visited; bugfixes
2007-12-13 17:27:09 -07:00
Joel Dice
c4347bd7d3
more JIT bugfixes and new instructions
2007-12-12 17:18:31 -07:00
Joel Dice
b2147c2c99
lots of JIT bugfixes and a few new instructions
2007-12-12 15:19:13 -07:00
Joel Dice
fe24005ff0
remove virtual stack code due to problems with jumps, to be revisited along with other optimizations when everything is working; various bugfixes
2007-12-12 11:59:45 -07:00
Joel Dice
fab77e4d96
don't call prologue and epilogue from compileDefault, since we want the original rbp and rsp values
2007-12-11 18:19:03 -07:00
Joel Dice
33b2a4a1e8
support absolute operands on virtual stack and absolute to memory movs
2007-12-11 17:27:04 -07:00
Joel Dice
740e86a084
remove unused function; call logicalFlush in pop functions
2007-12-11 17:08:55 -07:00
Joel Dice
d70e3aaefb
JIT progress: new, invokespecial, etc.
2007-12-11 16:52:28 -07:00
Joel Dice
fdeafe46fd
2+2 test now works with new JIT code
2007-12-11 14:26:59 -07:00
Joel Dice
286f290665
more JIT progress
2007-12-10 17:48:09 -07:00
Joel Dice
6b1f01511b
refactor logical stack mechanism in JIT code
2007-12-09 16:06:47 -07:00
Joel Dice
f8cda0cd85
more JIT compiler progress
2007-12-09 15:45:43 -07:00
Joel Dice
5b5a4fe8d7
progress on JIT compiler sketch
2007-12-09 13:03:21 -07:00
Joel Dice
55b956916f
initial sketch of JIT compiler
2007-12-08 16:22:13 -07:00