Commit Graph

698 Commits

Author SHA1 Message Date
Joel Dice
3febd7cea7 load libfontmanager.so before trying to resolve FontManager.initIDs
sun.font.FontManager.initIDs is a native method defined in
libfontmanager.so, yet there seems to be no mechanism in OpenJDK's
class library to actually load that library, so we lazily load it
before trying to resolve the method.
2011-04-10 11:26:44 -06:00
Joel Dice
239fd98781 fix compilation of unusual exception handlers
As described in commit 36aa0d6, apps such as jython which generate
bytecode dynamically can produce patterns of bytecode for which the
VM's compiler could not handle properly.  However, that commit
introduced a regression and had to be partially reverted.

It turns out the real problem was the call to Compiler::restoreState
which we made before checking whether we were actually ready to
compile the exception handler (we delay compiling an exception handler
until and unless the try/catch block it serves has been compiled so we
can calculate the stack maps properly).  That confused the compiler in
rare cases, so we now only call restoreState once we're actually ready
to compile the handler.
2011-04-09 12:44:28 -06:00
Joel Dice
97aec1691e fix jsr/ret stack mapping regression
My last commit introduced a regression in JIT compilation of
subroutines.  This reverts the specific change which caused the
regression.  Further work will be needed to address the case which
that change was intended to fix (namely, exception handlers which
apply to multiple try/catch blocks).
2011-04-08 20:15:36 -06:00
Joel Dice
36aa0d6792 improve handling of unusual bytecode in JIT compiler
Bytecode generated by compilers other than javac or ecj (such as
jython's dynamically generated classes) can contain unreachable code
and exception handlers which apply to more than one try/catch scope.
Previously, the VM's JIT compiler did not handle either of these cases
well, hence this commit.
2011-04-08 18:50:22 -06:00
Joel Dice
ef86530080 call static initializer of superclass before that of class itself
Also, assume any class which has an ancestor class which has a static
initializer needs initialization even if it doesn't have one itself,
per the Java Language Spec.
2011-03-31 19:43:49 -06:00
Joel Dice
1c7abe782d specify valid code source for system classes
This enables use of a class's protection domain to determine what JAR
or directory it came from.
2011-03-31 19:38:44 -06:00
Joel Dice
d5ae053f11 handle invokevirtual calls to non-virtual methods
OpenJDK's sun.reflect.MethodAccessorGenerator can generate
invokevirtual calls to private methods (which we normally consider
non-virtual); we must compile them as non-virtual calls since they
aren't in the vtable.
2011-03-26 23:13:05 -06:00
Joel Dice
0f38673baa fix line number and exception handler scope regression
It turns out commit 31eb047 was too aggressive and led to incorrect
calculation of line numbers for machine addresses, as well as
potentially incorrect exception handler scope calculation.  This fixes
the regression.
2011-03-26 19:55:23 -06:00
Joel Dice
01b3f1cb93 fix GCC 4.6 unused variable warnings 2011-03-26 14:43:03 -06:00
Joel Dice
31eb047391 handle redundant, unreachable gotos in JIT compiler
I recently encountered a Batik JAR with a method containing a
redundant goto which confused the JIT compiler because it was refered
to in the exception handler and line number tables despite being
unreachable.  I don't know how such code was generated, but this
commit ensures the compiler can handle it.
2011-03-25 19:13:10 -06:00
Joel Dice
b9f8188544 don't try to release monitor if we get OOME when trying to acquire it
We can't blindly try release the monitors for all synchronized methods
when unwinding the stack since we may not have finished acquiring the
most recent one when the exception was thrown.
2011-03-25 18:40:51 -06:00
Joel Dice
86733a25f4 increase executable area size to 30MB
Big applications can exceed the 16MB limit we previously used.
Increasing this above 30MB (if/when desired) will require changes to
the ARM and PowerPC JIT code to work around immediate branch encoding
limits on those platforms,
2011-03-17 21:24:35 -06:00
Joel Dice
110e2e1d52 fix putstatic code order regression in compile.cpp
Also, ensure that class is initialized before getting or setting
static fields in lazy loading code.
2011-03-17 08:46:46 -06:00
Joel Dice
453ceb42ab implement lazy class/field/method resolution in JIT compiler
Unlike the interpreter, the JIT compiler tries to resolve all the
symbols referenced by a method when compiling that method.  However,
this can backfire if a symbol cannot be resolved: we end up throwing
an e.g. NoClassDefFoundError for code which may never be executed.
This is particularly troublesome for code which supports multiple
APIs, choosing one at runtime.

The solution is to defer to stub code for symbols which can't be
resolved at JIT compile time.  Such a stub will try again at runtime
to resolve the needed symbol and throw an appropriate error if it
still can't be found.
2011-03-15 18:07:13 -06:00
Joel Dice
255fc9f9d3 handle long conditional immediate branches properly on PowerPC
Due to encoding limitations, the immediate operand of conditional
branches can be no more than 32KB forward or backward.  Since the
JIT-compiled form of some methods can be larger than 32KB, and we also
do conditional jumps to code outside the current method in some cases,
we must work around this limitation.

The strategy of this commit is to provide inline, intermediate jump
tables where necessary.  A given conditional branch whose target is
too far for a direct jump will instead point to an unconditional
branch in the nearest jump table which points to the actual target.

Unconditional immediate branches are also limited on PowerPC, but this
limit is 32MB, which is not an impediment in practice.  If it does
become a problem, we'll need to encode such branches using multiple
instructions.
2011-02-27 23:03:13 -07:00
Joel Dice
a4c4d54cdd restore MyThread::ip in MyThread::CallTrace destructor
This is necessary to ensure we can unwind the stack properly on ARM
after returning from a recursive invocation of vmInvoke.
2011-02-25 11:04:23 -07:00
Joel Dice
e20daca297 use link register to determine return address when appropriate in getStackTrace
On PowerPC and ARM, we can't rely on the return address having already
been saved on the stack on entry to a thunk, so we must look for it in
the link register instead.
2011-02-21 15:25:52 -07:00
Joel Dice
20f4510122 fix ARM stack unwinding (part 2)
My previous attempt at this was incomplete; it did not address
Java->native->Java->native call sequences, nor did it address
continuations.  This commit takes care of both.
2011-02-20 13:49:40 -07:00
Joel Dice
8a88c6ee3c fix ARM stack unwinding
We can't rely on the C++ compiler to save the return address in a
known location on entry to each function we might call from Java
(although GCC 4.5 seems to do so consistently, which is why I hadn't
realized the unwinding code was relying on that assumption), so we
must store it explicitly in MyThread::ip in each thunk.  For PowerPC
and x86, we continue saving it on the stack as always, since the
calling convention guarantees its location relative to the stack
pointer.
2011-02-19 20:52:14 -07:00
Joel Dice
59183c7821 fix subroutine stack mapping bug leading to crashes during GC
The stack mapping code was broken for cases of stack slots being
reused to hold primitives or addresses within subroutines after
previously being used to hold object references.  We now bitwise "and"
the stack map upon return from the subroutine with the map as it
existed prior to calling the subroutine, which has the effect of
clearing map locations previously marked as GC roots where
appropriate.
2011-02-16 14:29:57 -07:00
Joel Dice
4d5aeb5ab2 disable debug logging in compile.cpp 2011-02-02 08:32:40 -07:00
Joel Dice
635f5ba7e6 avoid garbage collection from e.g. divideLong thunk
It is dangerous to initiate a GC from a thunk like divideLong (which
was possible when allocating a new ArithmeticException to signal
divide-by-zero) since we don't currently generate a GC root frame map
for the return address of the thunk call.  Instead, we use the backup
heap area if there is room, or else throw a pre-allocated exception
instead.
2011-01-31 21:18:55 -07:00
Joel Dice
fff51bad06 more progress on PowerPC build
Also, hide frame mapping for stack unwinding (which is still
incomplete) in x86.cpp, since no other platform needs it.
2011-01-30 14:14:57 -07:00
Joel Dice
1186413be2 debug logging tweaks in compile.cpp 2011-01-29 11:11:27 -07:00
Joel Dice
f980ceb13e enable use-frame-pointer=true build
Also, include Continuations, Coroutines, and DynamicWind tests in test
suite for continuations=true build.
2011-01-27 21:06:01 -07:00
Joel Dice
b7157c802a fix continuations=true build 2011-01-27 11:54:41 -07:00
Joel Dice
c1a0d8b6fc more work on frame-pointer-less unwinding
This fixes the tails=true build (at least for x86_64) and eliminates
the need for a frame table in the tails=false build.  In the
tails=true build, we still need a frame table on x86(_64) to help
determine whether we've caught a thread executing code to do a tail
call or pop arguments off the stack.  However, I've not yet written
the code to actually use this table, and it is only needed to handle
asynchronous unwinds via Thread.getStackTrace.
2011-01-25 17:22:43 -07:00
Joel Dice
43cbfd3f3a support stack unwinding without using a frame pointer
Previously, we unwound the stack by following the chain of frame
pointers for normal returns, stack trace creation, and exception
unwinding.  On x86, this required reserving EBP/RBP for frame pointer
duties, making it unavailable for general computation and requiring
that it be explicitly saved and restored on entry and exit,
respectively.

On PowerPC, we use an ABI that makes the stack pointer double as a
frame pointer, so it doesn't cost us anything.  We've been using the
same convention on ARM, but it doesn't match the native calling
convention, which makes it unusable when we want to call native code
from Java and pass arguments on the stack.

So far, the ARM calling convention mismatch hasn't been an issue
because we've never passed more arguments from Java to native code
than would fit in registers.  However, we must now pass an extra
argument (the thread pointer) to e.g. divideLong so it can throw an
exception on divide by zero, which means the last argument must be
passed on the stack.  This will clobber the linkage area we've been
using to hold the frame pointer, so we need to stop using it.

One solution would be to use the same convention on ARM as we do on
x86, but this would introduce the same overhead of making a register
unavailable for general use and extra code at method entry and exit.

Instead, this commit removes the need for a frame pointer.  Unwinding
involves consulting a map of instruction offsets to frame sizes which
is generated at compile time.  This is necessary because stack trace
creation can happen at any time due to Thread.getStackTrace being
called by another thread, and the frame size varies during the
execution of a method.

So far, only x86(_64) is working, and continuations and tail call
optimization are probably broken.  More to come.
2011-01-16 19:05:05 -07:00
Joel Dice
afabe8e07e rework VM exception handling; throw OOMEs when appropriate
This rather large commit modifies the VM to use non-local returns to
throw exceptions instead of simply setting Thread::exception and
returning frame-by-frame as it used to.  This has several benefits:

 * Functions no longer need to check Thread::exception after each call
   which might throw an exception (which would be especially tedious
   and error-prone now that any function which allocates objects
   directly or indirectly might throw an OutOfMemoryError)

 * There's no need to audit the code for calls to functions which
   previously did not throw exceptions but later do

 * Performance should be improved slightly due to both the reduced
   need for conditionals and because undwinding now occurs in a single
   jump instead of a series of returns

The main disadvantages are:

 * Slightly higher overhead for entering and leaving the VM via the
   JNI and JDK methods

 * Non-local returns can make the code harder to read

 * We must be careful to register destructors for stack-allocated
   resources with the Thread so they can be called prior to a
   non-local return

The non-local return implementation is similar to setjmp/longjmp,
except it uses continuation-passing style to avoid the need for
cooperation from the C/C++ compiler.  Native C++ exceptions would have
also been an option, but that would introduce a dependence on
libstdc++, which we're trying to avoid for portability reasons.

Finally, this commit ensures that the VM throws an OutOfMemoryError
instead of aborting when it reaches its memory ceiling.  Currently, we
treat the ceiling as a soft limit and temporarily exceed it as
necessary to allow garbage collection and certain internal allocations
to succeed, but refuse to allocate any Java objects until the heap
size drops back below the ceiling.
2010-12-27 15:55:23 -07:00
Joel Dice
306f1282d0 throw ArithmeticException on divide-by-zero 2010-12-19 17:47:21 -07:00
Joel Dice
d18240cbd6 check for stack overflow on entry to all non-leaf methods
We now check for stack overflow in the JIT build as well as the
interpreted build, throwing a StackOverflowError if the limit
(currently hard-coded to 64KB, but should be easy to make
configurable) is exceeded.
2010-12-19 15:23:19 -07:00
Joel Dice
3d49173b0b avoid inifinite recursion if java.lang.Object is missing; refactoring
When trying to create an array class, we try to resolve
java.lang.Object so we can use its vtable in the array class.
However, if Object is missing, we'll try to create and throw a
ClassNotFoundException, which requires creating an array to store the
stack trace, which requires creating an array class, which requires
resolving Object, etc..  This commit short-circuits this process by
telling resolveClass not to create and throw an exception if it can't
find Object.

While doing the above work, I noticed that the implementations of
Classpath::makeThrowable in classpath-avian.cpp and
classpath-openjdk.cpp were identical, so I made makeThrowable a
top-level function.

Finally, I discovered that Thread.setDaemon can only be called before
the target thread has been started, which allowed me to simplify the
code to track daemon threads in the VM.
2010-12-09 19:38:12 -07:00
Joel Dice
a5742f5985 update copyright years 2010-12-05 20:21:09 -07:00
Joel Dice
0bd6822ed7 fix PowerPC build 2010-12-03 13:42:13 -07:00
Joel Dice
e68dfe1e89 various fixes to get Eclipse 3.6 working
* add libnet.so and libnio.so to built-in libraries for openjdk-src build

 * implement sun.misc.Unsafe.park/unpark

 * implement JVM_SetClassSigners/JVM_GetClassSigners

 * etc.
2010-11-27 11:25:02 -07:00
Joel Dice
459f4d5194 fix openjdk-src bootimage build
The main change here is to use a lazily-populated vector to associate
runtime data with classes instead of referencing them directly from
the class which requires updating immutable references in the heap
image.  The other changes employ other strategies to avoid trying to
update immutable references.
2010-11-26 12:41:31 -07:00
Joel Dice
a611ccda6f Merge remote branch 'origin/master' into openjdk
Conflicts:
	makefile
	src/compile.cpp
	src/compiler.cpp
	src/type-generator.cpp
2010-11-16 10:18:08 -07:00
Joel Dice
6bf74bf380 optimize loads of constant values by using PC-relative addressing on ARM
Previously, loading an arbitrary 32-bit constant required up to four
instructions (128 bytes), since we did so one byte at a time via
immediate-mode operations.

The preferred way to load constants on ARM is via PC-relative
addressing, but this is challenging because immediate memory offsets
are limited to 4096 bytes in either direction.  We frequently need to
compile methods which are larger than 4096, or even 8192, bytes, so we
must intersperse code and data if we want to use PC-relative loads
everywhere.

This commit enables pervasive PC-relative loads by handling the
following cases:

 1. Method is shorter than 4096 bytes: append data table to end

 2. Method is longer than 4096 bytes, but no basic block is longer
 than 4096 bytes: insert data tables as necessary after blocks, taking
 care to minimize the total number of tables

 3. Method is longer than 4096 bytes, and some blocks are longer than
 4096 bytes: split large basic blocks and insert data tables as above
2010-11-13 19:42:29 -07:00
Joel Dice
26a59612bb fix native Windows GCC 3.4 build 2010-11-12 16:53:16 -07:00
Joel Dice
6f555d4202 minor code cleanup in compile.cpp 2010-11-09 17:31:42 -07:00
Joel Dice
36a8ba28e5 disable debug logging in compile.cpp 2010-11-08 04:15:31 +00:00
Joel Dice
d0a6096eb0 add support for accessing embedded JARs as if they were directories
This allows OpenJDK to access time zone data which is normally found
under java.home, but which we must embed in the executable itself to
create a self-contained build.  The VM intercepts various file
operations, looking for paths which start with a prefix specified by
the avian.embed.prefix property and redirecting those operations to an
embedded JAR.

For example, if avian.embed.prefix is "/avian-embedded", and code
calls File.exists() with a path of
"/avian-embedded/javahomeJar/foo.txt", the VM looks for a function
named javahomeJar via dlsym, calls the function to find the memory
region containing the embeded JAR, and finally consults the JAR to see
if the file "foo.txt" exists.
2010-11-05 13:18:28 -06:00
Joel Dice
cabad6926f enable standalone OpenJDK builds
As described in readme.txt, a standalone OpenJDK build embeds all
libraries, classes, and other files needed at runtime in the resulting
binary, eliminating dependencies on external resources.
2010-11-04 11:02:09 -06:00
Joel Dice
1f67aea456 fix process=interpret build 2010-09-27 17:12:08 -06:00
Joel Dice
8c789fb92c return empty object array from MyProcessor::getStackTrace on failure 2010-09-27 09:39:44 -06:00
Joel Dice
a2cc95d196 remove trailing whitespace in compile.cpp 2010-09-25 15:52:43 -06:00
Joel Dice
ebc54c234f fix signedness error for wide iinc implementation 2010-09-23 08:50:09 -06:00
Joel Dice
89f6adc93c fix various classloading deadlocks and races 2010-09-22 13:58:46 -06:00
Joel Dice
93c9395f1d comment-out debug logging 2010-09-17 16:10:26 -06:00
Joel Dice
d0d53e2e10 fix custom-classloader-related concurrency problems and other bugs
The main changes in this commit ensure that we don't hold the global
class lock when doing class resolution using application-defined
classloaders.  Such classloaders may do their own locking (in fact,
it's almost certain), making deadlock likely when mixed with VM-level
locking in various orders.

Other changes include a fix to avoid overflow when waiting for
extremely long intervals and a GC root stack mapping bug.
2010-09-16 20:49:02 -06:00
Joel Dice
d819a75f36 more work towards OpenJDK classpath support
The biggest change in this commit is to split the system classloader
into two: one for boot classes (e.g. java.lang.*) and another for
application classes.  This is necessary to make OpenJDK's security
checks happy.

The rest of the changes include bugfixes and additional JVM method
implementations in classpath-openjdk.cpp.
2010-09-14 10:49:41 -06:00
Joel Dice
cddea7187d preliminary support for using OpenJDK's class library
Whereas the GNU Classpath port used the strategy of patching Classpath
with core classes from Avian so as to minimize changes to the VM, this
port uses the opposite strategy: abstract and isolate
classpath-specific features in the VM similar to how we abstract away
platform-specific features in system.h.  This allows us to use an
unmodified copy of OpenJDK's class library, including its core classes
and augmented by a few VM-specific classes in the "avian" package.
2010-09-10 15:05:29 -06:00
Joel Dice
d9e79db062 Merge branch 'master' into arm 2010-09-03 23:26:08 +01:00
Joel Dice
17c1a552d5 break each Class, Field, and Method into separate classes
In order to facilitate making the VM compatible with multiple class
libraries, it's useful to separate the VM-specific representation of
these classes from the library implementations.  This commit
introduces VMClass, VMField, and VMMethod for that purpose.
2010-09-01 10:13:52 -06:00
jet
5c00cfac6f Incomplete debugging of "Hello World!" on ARM. 2010-08-24 17:59:01 -06:00
Joel Dice
fca98df55b fix process=interpret class initialization regression
A long time ago, I refactored the class initialization code in the VM,
but did not notice until today that it had caused the
process=interpret build to break on certain recursive initializations.
In particular, we were not always detecting when a thread recursively
tried to initialize a class it was already in the process of
initializing, leading to the mistaken assumption that another thread
was initializing it and that we should wait until it was done, in
which case we would wait forever.

This commit ensures that we always detect recursive initialization and
short-circuit it.
2010-08-04 18:27:54 -06:00
Joel Dice
1f8130f566 handle virtual thunk case in MyProcessor::getStackTrace
If we catch the target thread in a virtual thunk when getting its
stack trace, we must assume its Thread::stack field is garbage and use
the register values instead.  Previously, we treated these thunks as
any other native code, leading to crashes when we tried to use the
garbage pointer.
2010-07-06 16:13:11 -06:00
Joel Dice
d308ba93c7 fix tails=true bootimage=true build
compileDirectInvoke does some magic to optimize tail calls to native
methods which involves storing the return address (which we'll never
actually return to, since it's a tail call) in a thread-local field so
the thunk function can figure out which native method to look up at
runtime.  Since this address will change when the boot image is
loaded, the boot image creation code needs to know about it.
2010-06-25 21:13:59 -06:00
Joel Dice
98b82a9bc1 fix callContinuation regression
callContinuation failed to call the correct continuation when feeding
it an exception due to a regression introduced with the
Thread.getStackTrace changes.
2010-06-25 09:51:35 -06:00
Joel Dice
3e304521d0 initialize MyProcessor::callTableSize in constructor
This field was being used uninitialized, which could lead to an out of
memory condition when we tried to grow the call table to a ridiculous
size.
2010-06-24 19:09:50 -06:00
Joel Dice
3018290238 pre-allocate Thread::backupHeap for signal safety
It's not safe to use malloc from a signal handler, so we can't
allocate new memory when handling segfaults or Thread.getStackTrace
signals.  Instead, we allocate a fixed-size backup heap for each
thread ahead of time and use it if there's no space left in the normal
heap pool.  In the rare case that the backup heap isn't large enough,
we fall back to using a preallocated exception without a stack trace
as a last resort.
2010-06-19 16:40:21 -06:00
Joel Dice
7ea6036842 fix isThunkUnsafeStack
This function was broken in two different ways:

 1. It only checked MyProcessor::thunks, not MyProcessor::bootThunks.
    It needs to check both.

 2. When checking MyProcessor::thunks, it used fields from
    MyProcessor::bootThunks instead of from the same thunk collection.

This fixes both problems.
2010-06-16 20:29:41 -06:00
Joel Dice
9559aca825 fix Thread.getStackTrace race conditions
Implementing Thread.getStackTrace is tricky.  A thread may interrupt
another thread at any time to grab a stack trace, including while the
latter is executing Java code, JNI code, helper thunks, VM code, or
while transitioning between any of these.

To create a stack trace we use several context fields associated with
the target thread, including snapshots of the instruction pointer,
stack pointer, and frame pointer.  These fields must be current,
accurate, and consistent with each other in order to get a reliable
trace.  Otherwise, we risk crashing the VM by trying to walk garbage
stack frames or by misinterpreting the size and/or content of
legitimate frames.

This commit addresses sensitive transition points such as entering the
helper thunks which bridge the transitions from Java to native code
(where we must save the stack and frame registers for use from native
code) and stack unwinding (where we must atomically update the thread
context fields to indicate which frame we are unwinding to).  When
grabbing a trace for another thread, we determine what kind of code we
caught the thread executing in and use that information to choose the
thread context values with which to begin the trace.  See
MyProcessor::getStackTrace::Visitor::visit for details.

In order to atomically update the thread context fields, we do the
following:

 1. Create a temporary "transition" object to serve as a staging area
    and populate it with the new field values.

 2. Update a transition pointer in the thread object to point to the
    object created above.  As long as this pointer is non-null,
    interrupting threads will use the context values in the staging
    object instead of those in the thread object.

 3. Update the fields in the thread object.

 4. Clear the transition pointer in the thread object.

We use a memory barrier between each of these steps to ensure they are
made visible to other threads in program order.  See
MyThread::doTransition for details.
2010-06-15 19:10:48 -06:00
Joel Dice
3e5b2cbc7b fix miscompilation of 64-bit volatile field reads and writes on x86_32
We were generating code which clobbered the data we were putting into
64-bit volatile fields (and potentially also clobbering the target or
source object in the case of non-static fields) due to misplaced
synchronization code.  Reordering this code ensures that both the data
and the target or source survive across calls to synchronization
helper functions.
2010-03-01 18:24:25 -07:00
Joel Dice
99bb7924b0 fix stack frame mapping code for exception handlers
Previously, the stack frame mapping code (responsible for statically
calculating the map of GC roots for a method's stack frame during JIT
compilation) would assume that the map of GC roots on entry to an
exception handler is the same as on entry to the "try" block which the
handler is attached to.  Technically, this is true, but the algorithm
we use does not consider whether a local variable is still "live"
(i.e. will be read later) when calculating the map - only whether we
can expect to find a reference there via normal (non-exceptional)
control flow.  This can backfire if, within a "try" block, the stack
location which held an object reference on entry to the block gets
overwritten with a non-reference (i.e. a primitive).  If an exception
is later thrown from such a block, we might end up trying to treat
that non-reference as a reference during GC, which will crash the VM.

The ideal way to fix this is to calculate the true interval for which
each value is live and use that to produce the stack frame maps.  This
would provide the added benefit of ensuring that the garbage collector
does not visit references which, although still present on the stack,
will not be used again.

However, this commit uses the less invasive strategy of ANDing
together the root maps at each GC point within a "try" block and using
the result as the map on entry to the corresponding exception
handler(s).  This should give us safe, if not optimal, results.  Later
on, we can refine it as described above.
2010-02-04 18:03:32 -07:00
Joel Dice
45476eb591 fix handling of volatile longs and doubles on PowerPC
We were miscompiling methods which contained getfield, getstatic,
putfield, or putstatic instructions for volatile 64-bit primitives on
32-bit PowerPC due to not noticing that values in registers are clobbered
across function calls.

The solution is to create a separate Compiler::Operand instance for each
object monitor reference before and after the function call to avoid
confusing the compiler.  To avoid duplicate entries in the constant pool,
we add code look for and, if found, reuse any existing entry for the same
constant.
2010-01-27 17:46:04 -07:00
Joel Dice
3686d2131d fix jsr/ret code generation bug
We were generating code to marshal values into place prior to a jump,
but placing it after the jump instruction, which made it useless.
2010-01-04 17:17:16 -07:00
Joel Dice
4c0ede8b9a reuse JNI references when possible
Before allocating a new reference in NewGlobalReference or when
creating a local reference, we look for a previously-allocated
reference pointing to the same object.  This is a linear search, but
usually the number of elements in the reference list is small, whereas
the memory, locking, and allocation overhead of creating duplicate
references can be large.
2009-12-16 19:16:51 -07:00
Joel Dice
f0e66eea37 remove extra semicolon 2009-12-02 23:09:05 -07:00
Joel Dice
3777c9b429 fix MSVC build 2009-12-02 08:49:10 -07:00
Joel Dice
80d3a286d1 check bootThunkTable as well as thunkTable in MyProcessor::getStackTrace
We need to check to see if we caught the thread somewhere in the thunk
code (i.e. about to call a helper function), in which case the stack
and base pointers are valid and may be used to create an accurate
trace.
2009-12-01 18:17:33 -07:00
Joel Dice
98275e175e powerpc bugfixes 2009-12-01 09:21:33 -07:00
Joel Dice
851187f0ce refine memory barrier implementation and usage 2009-11-30 15:38:16 +00:00
Joel Dice
ec701b9994 whitespace tweaks 2009-11-30 15:08:45 +00:00
Joel Dice
f5490b800a Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-11-28 11:18:13 -07:00
Joel Dice
bd72745ff9 fix off-by-one error in intrinsic() 2009-11-27 21:01:27 -07:00
Joel Dice
9f14d63592 initialize MyProcessor::getStackTrace::Visitor::trace in case visit is never called 2009-11-24 19:15:27 -07:00
jet
d901653979 Merge branch 'master' into wip
Conflicts:

	src/compile.cpp
2009-10-29 14:23:20 -06:00
jet
d3d228e69b moduloInt + arm work 2009-10-29 14:14:44 -06:00
jet
e00fc5d91a ARM port work 2009-10-29 10:12:30 -06:00
Joel Dice
c8d5c1faed visit all frame locations in resolveOriginalSites
Previously, we only visited frame locations containing values, but
this invited the possibility of reusing the same site for two
locations in some cases.
2009-10-26 17:59:20 -06:00
Joel Dice
3b4be3decd defer to helper thunk for frem and drem 2009-10-24 19:29:20 -06:00
Joel Dice
95c3f37bfb fix various bugs involving doubles on 32-bit systems 2009-10-24 17:18:56 -06:00
Joel Dice
c044781807 fix powerpc bootimage build 2009-10-20 08:20:49 -06:00
Joel Dice
1a63b72b41 clean up float-vs.-int tracking in constant pools 2009-10-17 20:11:03 -06:00
Joel Dice
15020d77a6 refactor intrinsic support
This ensures that the low-level, architecture specific code need not
be aware of the semantics and names of Java methods.
2009-10-17 19:26:14 -06:00
Joel Dice
f702795178 fix integer truncation bug 2009-10-17 18:35:19 -06:00
Joel Dice
cec6444911 fix bootimage build for case where the JIT code area is too far from the AOT code area to do immediate-offset jumps between them 2009-10-17 18:18:03 -06:00
Joel Dice
b878b84d32 set DebugCompile to false in compile.cpp 2009-10-11 16:05:37 -06:00
Joel Dice
44a6620aa1 disable use of SSE when compiling ahead-of-time 2009-10-10 17:46:43 -06:00
Joel Dice
622b3d1c4e replace compare and branch instructions with combined versions
This allows the assembler to see the operand types of the comparison
and the condition for jumping in the same operation, which is
essential for generating efficient code in cases such as
multiple-precision compare-and-branch.
2009-10-10 15:03:23 -06:00
Joel Dice
609a1a9633 snapshot 2009-10-07 00:50:32 +00:00
Joel Dice
4f78783ef1 various bugfixes for SSE-based floating-point support 2009-10-05 14:25:12 +00:00
Joel Dice
d25da6116a snapshot 2009-10-04 22:10:36 +00:00
Joel Dice
5dad9bddd6 snapshot 2009-10-04 19:56:48 +00:00
Joel Dice
6cef085d7e snapshot 2009-09-26 19:43:44 +00:00
Joel Dice
325f93b4d1 Merge branch 'master' into wip
Conflicts:

	src/compile.cpp
	src/compiler.cpp
	src/machine.h
	src/x86.cpp
2009-09-20 15:43:32 -06:00
Joel Dice
7aa906d97b support runtime-visible annotations and java.lang.reflect.Proxy 2009-09-18 18:01:54 -06:00
Joel Dice
bf2b17cfa6 fix misspelled comment 2009-09-04 17:08:45 -06:00
Joel Dice
b0ba70866e fix incorrect line numbers in NPE traces 2009-09-04 15:09:40 -06:00
Joel Dice
6519047342 fix bootimage build 2009-09-03 09:06:04 -06:00
Joel Dice
73dc058c14 implement StackTraceElement.getFileName properly 2009-08-27 16:28:44 -06:00
Joel Dice
1a0eef7e2d add support for building with MSVC on Windows 2009-08-26 18:26:44 -06:00
Joel Dice
0a2e611baa handle case of null thread local in SegFaultHandler::handleSignal 2009-08-18 15:47:08 -06:00
Joel Dice
c4edabdc02 implement ClassLoader.resolveClass and ensure class is linked in e.g. Class.getMethods; minor bugfixes 2009-08-18 14:26:28 -06:00
Joel Dice
3facd3f735 treat SoftReferences as WeakReferences; do vtable or interface table lookups as necessary in MyProcessor::invoke; various bugfixes 2009-08-13 09:17:05 -06:00
Joel Dice
61cb8b3deb handle zero-length lookup tables in lookupswitch 2009-08-12 19:32:12 -06:00
Josh warner
32167168f8 fixed incorrect opSize bug for 64-bit platforms 2009-08-11 13:25:22 -06:00
Joel Dice
83b0a217e0 disable debug trap 2009-08-11 09:40:54 -06:00
Joel Dice
336e822ba9 remove debug logging 2009-08-11 09:23:38 -06:00
Josh warner
af4d82ef7e Merge branch 'master' of git://oss.readytalk.com/avian 2009-08-10 13:42:57 -06:00
Josh warner
1d3ef1fc43 Merge branch 'master' of git://oss.readytalk.com/avian, fixed problems that occured in broader testing
Conflicts:
	src/compile.cpp
	src/compiler.cpp
	src/powerpc.cpp
	src/x86.S
	src/x86.cpp
2009-08-10 13:20:23 -06:00
Joel Dice
001000364d add classloader parameter to functions which may directly or indirectly load classes; include methods inherited from interfaces (but not explicitly declared) in method tables and virtual tables of abstract classes 2009-08-10 07:56:16 -06:00
Joel Dice
2da6980eb5 print intptr_t's as pointers in compareIpToMethodBounds to avoid printf compatibility issues 2009-08-07 16:27:24 -06:00
Josh warner
f8bbc609e8 corrected debug messages 2009-08-06 10:32:00 -06:00
Josh warner
7483fa154d added floating point support, instrinsics support 2009-08-06 10:01:57 -06:00
Joel Dice
ad66ae2691 disable debug logging 2009-07-27 18:09:12 -06:00
Joel Dice
0447d9bed3 use __MINGW32__ instead of __WINDOWS__ in x86.cpp and assume Linux if it's not defined 2009-07-27 07:49:54 -06:00
Joel Dice
f869e5be21 Merge branch 'master' into gnu
Conflicts:

	classpath/java/util/TreeSet.java
2009-07-25 18:38:57 -06:00
Joel Dice
d3a249a3fa Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-07-25 18:36:27 -06:00
Joel Dice
08e9a99cb5 don't abort if pthread_kill fails in MySystem::visit 2009-07-24 19:03:33 -06:00
Joel Dice
3787985b25 implement basic finalization support
This implementation does not conform to the Java standard in that
finalize methods are called from whichever thread happens to be garbage
collecting, and that thread may hold locks, whereas the standard
guarantees that finalize will be run from a thread which holds no locks.
Also, an object will never be finalized more than once, even if its
finalize method "rescues" (i.e. makes reachable) the object such that it
might become unreachable a second time and thus a candidate for
finalization once more.  It's not clear to me from the standard if this
is OK or not.

Nonwithstanding the above, this implementation is useful for "normal"
finalize methods which simply release resources associated with an
object.
2009-07-21 18:57:55 -06:00
Joel Dice
afdab27e02 backport GC safety fixes from gnu branch 2009-07-20 14:32:25 -06:00
Joel Dice
514d0bf7e5 fix deadlocks and other misbehaviors in class initialization code 2009-07-20 14:12:38 -06:00
Joel Dice
d12b441aa1 restore state from subroutine after jsr to avoid later confusion determining basic block boundaries 2009-07-20 08:26:01 -06:00
Joel Dice
5f6f8039e6 various bugfixes in subroutine stack mapping code 2009-07-13 17:49:15 -06:00
Joel Dice
e72ff8db0b Merge branch 'master' into gnu
Conflicts:

	src/compile.cpp
2009-07-11 12:11:59 -06:00
Joel Dice
ab5ba9c954 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian 2009-07-10 09:57:29 -06:00
Joel Dice
22852dcffa fix GC safety bug when walking stack 2009-07-10 08:33:38 -06:00
Joel Dice
c22b4b4e79 various subroutine handling bugfixes 2009-07-08 08:18:40 -06:00
Joel Dice
dae7b68d5c avoid indexing past the end of the array in makeSimpleFrameMapTable 2009-06-30 17:35:28 -06:00
Joel Dice
b308354a3a handle subroutines properly when generating frame maps (initial sketch) 2009-06-26 15:36:04 -06:00
Joel Dice
7ed14948b9 re-initialize frame maps for exception handlers on every iteration of the frame map calculation loop
This fixes incorrect frame map calcuation which may lead to crashes
during garbage collection from an exception handler.
2009-06-16 13:41:31 -06:00
Joel Dice
e1c7504eda attempt to flush the compile log (if any) before crashing in SegFaultHandler::handle 2009-06-11 17:14:54 -06:00
Joel Dice
4a87d82d8e fix GC safety bug in MyProcessor::initVtable 2009-06-04 17:20:55 -06:00
Joel Dice
ba5105c374 throw NoSuchMethodError in resolveMethod if method not found 2009-06-02 18:55:12 -06:00
Joel Dice
11e61543a3 fix bootimage build 2009-05-31 21:16:58 -06:00
Joel Dice
b1d92fc6c2 fix compilation of synchronized methods which return values 2009-05-31 14:15:45 -06:00
Joel Dice
02fba10614 set DebugCompile to false 2009-05-28 19:56:15 -06:00
Joel Dice
14613193fa include return address size in frameSize passed to vmInvoke; fix printf warnings 2009-05-28 19:50:44 -06:00
Joel Dice
d99f8df6e6 several bugfixes for powerpc continuations 2009-05-28 18:56:05 -06:00
Joel Dice
2608a2ee43 progress towards powerpc continuation and tail call support 2009-05-26 19:02:39 -06:00
Joel Dice
31eb75a736 support tail calls and continuations as build options 2009-05-25 23:27:10 -06:00
Joel Dice
ea5fea4802 fix printf format for 64-bit build 2009-05-25 14:59:36 -06:00
Joel Dice
9837528a3e set Thread::continuation before calling jumpAndInvoke in Rewind case of callContinuation 2009-05-24 22:49:39 -06:00
Joel Dice
0a4e77ffa7 fix thinko in callContinuation 2009-05-24 22:36:16 -06:00
Joel Dice
92aea95b36 continuation bugfixes 2009-05-24 22:27:50 -06:00
Joel Dice
c2bd828cc1 call the right continuation in callContinuation 2009-05-24 18:58:45 -06:00
Joel Dice
af59c85deb various bugfixes 2009-05-24 18:22:36 -06:00
Joel Dice
364f31b785 finish initial sketch of dynamicWind implementation 2009-05-23 19:49:14 -06:00
Joel Dice
4305fdc7f3 begin dynamicWind implementation 2009-05-23 16:15:06 -06:00
Joel Dice
e165d5f3fd avoid uninitialized variable warnings in MyProcessor::callWithCurrentContinuation 2009-05-19 18:28:43 -06:00
Joel Dice
ecfecf2006 translate local indexes before passing to Frame.stored{Int,Long,Object} 2009-05-18 09:16:17 -06:00
Joel Dice
398dec58bb GC bugfixes 2009-05-17 17:43:48 -06:00
Joel Dice
195d95d809 continuation bugfixes 2009-05-16 18:39:08 -06:00
Joel Dice
8cb59c9d4c various bugfixes to get Continuations test working 2009-05-16 02:03:03 -06:00
Joel Dice
57cec2d068 various bugfixes 2009-05-14 20:08:01 -06:00
Joel Dice
3d1ef68001 various bugfixes 2009-05-12 12:16:55 -06:00
Joel Dice
66c4867f18 more work on continuation support 2009-05-05 18:29:05 -06:00
Joel Dice
eb3bd25aa1 code cleanup and build fixes 2009-05-04 19:04:17 -06:00
Joel Dice
0cd4eb2655 early sketch of continuation support 2009-05-03 14:57:11 -06:00
Joel Dice
90dcf084a2 protect object from GC in compileVirtualMethod2; condense frame GC root maps to minimum size needed 2009-04-27 14:46:43 +00:00
Joel Dice
50529969f9 fix code to visit GC roots on stack to be compatible with tail calls; avoid generating unreachable jumps 2009-04-26 19:53:42 -06:00
Joel Dice
299699f1ff fix stack unwinding for new calling convention (2nd try) 2009-04-26 16:06:15 -06:00
Joel Dice
03653d2dd8 fix stack unwinding and GC root scan for new calling convention 2009-04-26 15:55:35 -06:00
Joel Dice
64b529c915 avoid generating unreachable code after tail calls 2009-04-25 20:54:36 -06:00
Joel Dice
bf8fdb6316 visit MyProcessor::virtualThunks during GC 2009-04-25 20:24:04 -06:00
Joel Dice
0245a94ab8 generate code in ReturnEvent if and only if the event is preceded by at least one non-tail-call 2009-04-25 19:51:33 -06:00
Joel Dice
89221bfcfa fix handling of virtual calls to native methods 2009-04-25 17:52:08 -06:00
Joel Dice
141862470b fix stack pointer adjustment in invokeNative2; pad frame size using Architecture::frameFootprint in MyProcessor::invoke to conform to new calling convention 2009-04-25 17:33:42 -06:00
Joel Dice
1ed7c0d94c adapt native method call code to new calling convention 2009-04-25 11:49:56 -06:00
Joel Dice
3113ae74eb various bugfixes 2009-04-22 01:39:25 +00:00
Joel Dice
717f359666 implement "callee pops arguments" calling convention and refactor tail call code accordingly 2009-04-19 16:36:11 -06:00
Joel Dice
dba72409aa move use of SingleRead::successor; fix build errors
We now use SingleRead::successor in pickTarget, where we use it to
determine the prefered target site for the successor without requiring
the target to conform to that preference.  The previous code made the
preference a hard requirement, which is not desirable or even possible
in general.
2009-04-07 18:55:43 -06:00
Joel Dice
35d1c6e068 add SingleRead::successor; fix build errors
The SingleRead::successor field is used (when non-null) to further
constrain the SiteMask in SingleRead::intersect based on reads of
successor values (as in the cases of moves and condensed-addressing
combine and translate instructions).
2009-04-06 18:34:12 -06:00
Joel Dice
fea92ed995 more work on tail recursion
We now create a unique thunk for each vtable position so as to avoid
relying on using the return address to determine what method is to be
compiled and invoked, since we will not have the correct return address
in the case of a tail call.  This required refactoring how executable
memory is allocated in order to keep AOT compilation working.  Also, we
must always use the same register to hold the class pointer when
compiling virtual calls, and ensure that the pointer stays there until
the call instruction is executed so we know where to find it in the
thunk.
2009-04-05 15:42:10 -06:00
Joel Dice
5e740170f2 initial sketch of tail call optimization (non-virtual calls only, so far) 2009-03-31 14:15:08 -06:00
Joel Dice
538e23c642 fix order-of-operations bugs in compile.cpp which led to creation of incorrect stack maps 2009-03-18 16:24:13 -06:00
Joel Dice
d1018bf078 update copyright years 2009-03-15 12:02:36 -06:00
Joel Dice
49cd2dd9bf fix powerpc bootimage build (second try) 2009-03-10 19:08:16 -06:00
Joel Dice
6c271ac994 fix powerpc bootimage build 2009-03-09 18:52:09 -06:00
Joel Dice
89a2739165 sync instruction cache after compiling a method 2009-03-09 08:26:23 -06:00
Joel Dice
8b0f7d790f don't assume sizeof(bool) == 8 2009-03-07 18:23:28 -07:00
Joel Dice
33ba8d084d avoid unecessary subtraction in tableswitch 2009-03-06 17:11:14 -07:00
Joel Dice
7388da6282 fix endianness issues when loading values smaller than BytesPerWord from the stack 2009-03-06 10:56:11 -07:00
Joel Dice
6e6035505c zero heap space ahead of time when allocating raw storage and garbage collecting, not when allocating individual objects
This helps us support the Java Memory Model without adding a memory
barrier to every object allocation.  It's also potentially more
efficient, since we zero out each heap segment all at once instead of
bit-by-bit with each object allocation.
2009-03-03 20:05:48 -07:00
Joel Dice
8410e1d683 ensure reads and writes of volatile 64-bit fields are atomic 2009-03-03 18:02:11 -07:00
Joel Dice
2ca8132d97 implement support for volatile fields 2009-03-02 20:18:15 -07:00
Joel Dice
8c9d625f8f add memory barriers where appropriate in compile.cpp 2009-03-02 18:40:06 -07:00
Joel Dice
1192ef939e fix stack offset calculation for multianewarray on x86 2009-03-01 15:39:52 -07:00
Joel Dice
412348d938 fix stack offset calulation for multianewarray 2009-03-01 10:49:37 -07:00
Joel Dice
d6bd2e7308 make Compiler::store take both a source size and a destination size to avoid endianness issues; change order of Compiler::load parameters to match 2009-02-28 16:17:24 -07:00
Joel Dice
60c4bede39 fix undefined-order-of-operations bug in Frame::dupped 2009-02-28 14:41:05 -07:00
Joel Dice
3e6c30a4b5 always return an 8-byte value (or void) from native functions called from Java
This is important on the 32-bit OS X PowerPC ABI, since the location
of the low 32-bits of a return value change depending on whether the
entire value is 64-bits or not.
2009-02-28 14:20:43 -07:00
Joel Dice
f22ce3f996 fix parameter offset calculation in invokeNative2 2009-02-28 12:33:26 -07:00
Joel Dice
4999c08e32 fix stack offset calculation for powerpc
This may break x86, in which case we'll iterate until they both work.
2009-02-26 18:54:25 -07:00
Joel Dice
d7d3dd5055 various bugfixes, especially concerning frame allocation and offset calculation 2009-02-25 20:49:42 -07:00
Joel Dice
324caaf98b add size parameter to Assembler::returnLow since the register used depends on the return value size on PowerPC 2009-02-17 18:19:31 -07:00
Joel Dice
c88e3fa230 ensure stack alignment in compile-x86.S and update vmInvoke to accept frame size parameter 2009-02-16 19:49:28 -07:00
Joel Dice
4b2d74f656 fix merge conflict bug preventing the bootimage code from seeing, marking, and fixing jsr addresses 2009-02-14 14:23:23 -07:00
Joel Dice
f58f7b3bdf fix bugs pertaining to tracking reads and and value sites across subroutines (jsr and ret instructions) 2009-02-14 13:26:39 -07:00
Joel Dice
9b0d6854ec fix merge conflicts 2009-02-09 16:22:51 -07:00
Joel Dice
a1ec71423e Merge branch 'master' into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/binaryToMacho.cpp
	src/compile.cpp
	src/compiler.cpp
	src/x86.cpp
2009-02-09 16:22:01 -07:00
Joel Dice
1c3504b62a fix various stack bugs 2009-01-29 18:36:19 -07:00
Joel Dice
54ad7c4e98 tolerate ConstantValue attributes on non-static fields, since the compiler ensures that they are initialized in any constructors for that class (i.e., the VM does not need to do anything special to initialize them) 2009-01-10 12:25:52 -07:00
Joel Dice
9495d03dc6 explicitly load jump target in tableswitch to avoid retaining stale memory sites 2009-01-04 15:56:47 -07:00
Joel Dice
c678fb30a4 snapshot 2008-12-24 13:35:43 -07:00
Joel Dice
c9bec0ce96 only steal sites recursively when all else fails in trySteal 2008-12-21 18:14:20 -07:00
Joel Dice
055ec4dd9f various fixes and cleanups concerning 64-bit values on 32-bit systems 2008-12-21 14:41:56 -07:00
Joel Dice
5e727c8c5d throw an error if a volatile field is encountered, since we don't yet support them properly 2008-12-18 16:32:18 -07:00
Joel Dice
4098368cb9 fix non-debug build of compile.cpp 2008-12-02 19:39:56 -07:00
Joel Dice
d4363d250a mark and fix up absolute addresses in boot image code 2008-12-02 09:45:20 -07:00
Joel Dice
25ade1484a lots of bugfixes and refactoring 2008-12-01 19:38:00 -07:00
Joel Dice
eaf30eb909 fix static class initialization when using a boot image 2008-11-29 21:58:09 -07:00
Joel Dice
e44f326377 various bugfixes 2008-11-29 18:39:42 -07:00
Joel Dice
0ec5ad3701 update makefile to optionally build and use a boot image; various bugfixes 2008-11-29 16:08:14 -07:00
Joel Dice
b8056d905c fix bugs in allocating and populating method object pools 2008-11-28 18:23:01 -07:00
Joel Dice
4d1af63ed2 initial work on booting from boot image 2008-11-28 15:02:45 -07:00
Joel Dice
a8a030140c various bugfixes 2008-11-27 21:44:04 -07:00
Joel Dice
f698c24ea6 delay resolving method call offsets until all methods have been compiled when creating a boot image 2008-11-27 13:59:40 -07:00
Joel Dice
61ecb56e21 Merge branch 'master' of oss:/var/local/git/avian into powerpc 2008-11-25 16:19:21 -07:00
Joel Dice
fdb9c05ac6 avoid uninitialized value warnings from valgrind when DebugFrameMaps is true 2008-11-25 16:01:30 -07:00
Joel Dice
eea2225176 save locals to memory before executing any instruction which might trigger an exception if that instruction lies within an exception handler 2008-11-25 10:34:48 -07:00
Joel Dice
035aa0ecd4 Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into bootimage
Conflicts:

	src/compile.cpp
	src/machine.h
	src/util.h
2008-11-23 17:02:34 -07:00
Joel Dice
20cf42c5e4 more work on boot image creation 2008-11-23 16:58:01 -07:00
Joel Dice
4392b04fd0 avoid creating unecessary garbage in treeInsertNode and friends 2008-11-22 16:25:35 -07:00
Joel Dice
92a8a4d83b clean up subroutine code in wake of merge from master branch 2008-11-15 18:03:43 -07:00
Joel Dice
9b6d4fdeab Merge branch 'master' of oss.readytalk.com:/var/local/git/avian into powerpc
Conflicts:

	src/compile.cpp
2008-11-15 17:49:08 -07:00
Joel Dice
dc2700d913 ensure that the saved exception in a finally block is visited during GC when the jsr instruction is used 2008-11-15 17:28:45 -07:00
Joel Dice
fb770d10fb implement jsr/ret support
The Subroutine test won't pass due to a bug in the stack mapping code
such that objects may be missed during GC.
2008-11-13 17:59:21 -07:00
Joel Dice
acfd9689b2 Merge branch 'master' of oss:/var/local/git/avian into powerpc
Conflicts:

	makefile
	src/assembler.h
	src/compile.cpp
	src/compiler.cpp
	src/compiler.h
	src/finder.cpp
2008-11-11 12:15:19 -07:00
Joel Dice
0bef625500 fix thinko in logCompile 2008-11-11 09:17:11 -07:00
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
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
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
dd4dc18916 snapshot 2008-11-01 13:14:13 -06:00
Joel Dice
7d6ca28b2f snapshot 2008-10-18 18:15:57 -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
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
83aa342bc8 hello, world on amd64 2008-10-04 11:26:35 -06:00
Joel Dice
823327a00b fix bytecode address calculations which broke when using -Os 2008-09-29 08:46:44 -06:00