Joel Dice
0e4fabffb7
fix incorrect parameter to maybeRex call in sseMoveRR
2009-12-03 17:57:28 -07:00
Joel Dice
60333c88f5
fix continuations=true build for Windows x86_64
2009-12-03 12:46:29 -07:00
Joel Dice
7cdf63c045
fix continuations=true build for Darwin
2009-12-02 23:15:27 -07:00
Joel Dice
f0e66eea37
remove extra semicolon
2009-12-02 23:09:05 -07:00
Joel Dice
7a3bf85caf
fix bootimage=true build for Windows
2009-12-02 20:08:07 -07:00
Joel Dice
b218117881
fix continuations=true build for Cygwin
2009-12-02 19:37:22 -07:00
Joel Dice
8b11f0c271
fix continuations=true build for Windows
2009-12-02 19:29:57 -07:00
Joel Dice
6118792ffd
update copyright years
2009-12-02 19:08:29 -07:00
jet
e516f3ce1c
Merge branch 'wip' of oss.readytalk.com:/var/local/git/avian into wip
2009-12-02 13:45:21 -07:00
Joel Dice
3777c9b429
fix MSVC build
2009-12-02 08:49:10 -07:00
Joel Dice
5a0e00ca39
GC safety bugfix
2009-12-01 22:41:12 -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
168e206812
fix GCC 3.4 build
2009-12-01 17:33:30 -07:00
Joel Dice
f216fe37ff
fix regression which led to register exhaustion
2009-12-01 11:14:57 -07:00
Joel Dice
98275e175e
powerpc bugfixes
2009-12-01 09:21:33 -07:00
Joel Dice
9ba71cf508
fix Darwin build
2009-12-01 08:23:11 -07:00
Joel Dice
0bdf1d8e82
use thunks for floating point ops if SSE is not available
2009-11-30 22:02:26 -07:00
Joel Dice
175cb8e89b
more floating point bugfixes
2009-12-01 02:06:01 +00:00
Joel Dice
7fa10909f4
more bugfixes for handling 64-bit floats on 32-bit systems
2009-11-30 22:08:59 +00:00
jet
69c9bf5ff9
Merge branch 'wip' of oss.readytalk.com:/var/local/git/avian into wip
2009-11-30 14:00:51 -07:00
Joel Dice
851187f0ce
refine memory barrier implementation and usage
2009-11-30 15:38:16 +00:00
Joel Dice
04454960ec
various bugfixes for handling 64-bit floating point values on 32-bit systems
2009-11-30 15:10:34 +00:00
Joel Dice
d9de4c607c
allow source operand of any type for move operations
2009-11-30 15:09:43 +00:00
Joel Dice
ec701b9994
whitespace tweaks
2009-11-30 15:08:45 +00:00
Joel Dice
79d281f7fa
encourage loads from memory directly into SSE registers where appropriate
2009-11-30 02:17:08 +00:00
Joel Dice
1c61c1f421
fix x86 memoryBarrier implementation
2009-11-29 16:53:46 -07:00
Joel Dice
0b09c6aa30
avoid busy wait when entering "exclusive" state
2009-11-29 16:53:05 -07:00
Joel Dice
6d9e1270ca
fix race conditions in atomic operations
2009-11-29 09:08:07 -07:00
Joel Dice
1558b85acf
second attempt to fix "idle to active" fast path
...
If another thread succeeds in entering the "exclusive" state while we
use the fast path to transition the current thread to "active", we
must switch back to "idle" temporarily to allow the exclusive thread a
chance to continue, and then retry the transition to "active" via the
slow path.
2009-11-28 15:35:15 -07:00
Joel Dice
3418a8bcbe
fix race condition introduced in previous commit
2009-11-28 15:24:02 -07:00
Joel Dice
75934c8342
provide fast paths for common thread state transitions
...
These paths reduce contention among threads by using atomic operations
and memory barriers instead of mutexes where possible. This is
especially important for JNI calls, since each such call involves two
state transitions: from "active" to "idle" and back.
2009-11-28 15:01:54 -07: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
c615db31fb
refine move cost calculation to avoid indirect moves (e.g. memory to memory)
2009-11-28 18:17:17 +00:00
Joel Dice
5ead8fab17
refactor code responsible for moving data in the compiler
...
This is partially to address incorrect code generation for 64-bit
floating-point values on x86_32 and partially to reduce unnecessary
moves.
2009-11-27 21:15:12 -07:00
Joel Dice
bd72745ff9
fix off-by-one error in intrinsic()
2009-11-27 21:01:27 -07:00
Joel Dice
f6a52e260b
specify CONTEXT::ContextFlags before calling GetThreadContext
...
Previously, we assumed that the "context" parameter to
GetThreadContext was only an output parameter, but it actually uses at
the value of CONTEXT::ContextFlags on entry to decide what parts of
the structure to fill in. We were getting lucking most of the time,
because whatever garbage was on the stack at that location had the
necessary bits set. When we weren't so lucky, we got all zeros for
the register values which sometimes lead to a crash depending on the
state of the thread being examined.
2009-11-24 19:16:22 -07:00
Joel Dice
9f14d63592
initialize MyProcessor::getStackTrace::Visitor::trace in case visit is never called
2009-11-24 19:15:27 -07:00
Stan
728a6ba706
use MapViewOfFile instead of mmap on Windows
2009-11-24 08:24:37 -07:00
jet
993d210232
Merge branch 'wip' of oss.readytalk.com:/var/local/git/avian into wip
2009-11-23 10:04:16 -07:00
Joel Dice
a0d763d871
use cmpxchgq for 64-bit operands in atomicCompareAndSwap
2009-11-20 15:17:35 -07:00
Joel Dice
2276eece0e
support atomicCompareAndSwap on powerpc for GCC versions prior to 4.1
2009-11-20 15:14:27 -07:00
Joel Dice
b83314e884
fix powerpc build
2009-11-20 10:42:02 -07:00
Joel Dice
15eada93ed
implement atomicCompareAndSwap on x86_32 for GCC versions prior to 4.1 and for MSVC
2009-11-20 10:40:01 -07:00
Joel Dice
e91157a390
avoid acquiring a mutex recursively in markDirty
2009-11-19 19:41:49 -07:00
Joel Dice
5f5cc57d12
only use atomic operations if the compiler supports them
2009-11-19 19:32:54 -07:00
Joel Dice
fdde34694c
use atomic operations in MyHeap::mark to avoid need for mutex
2009-11-19 18:13:00 -07:00
Joel Dice
c711ac5701
return null from NewString[UTF] if the char* parameter is null
2009-11-18 11:01:47 -07:00
jet
2f54eb5e55
Merge branch 'wip' of oss.readytalk.com:/var/local/git/avian into wip
2009-11-05 11:16:58 -07:00
Joel Dice
5b8a7ca566
temporarily disable use of SSE on 32-bit systems until a bug involving memory<->SSE-register moves is fixed
2009-11-04 15:16:06 +00:00
Joel Dice
fb5796b740
don't use SSE for long-to-double conversion on 32-bit systems
2009-11-04 00:02:38 +00:00
Joel Dice
82d2be8e71
implement JavaVM::AttachCurrentThreadAsDaemon
2009-11-03 14:52:14 -07:00
Joel Dice
4566e7a7dd
avoid infinite loop in deadWord
2009-11-03 14:14:27 -07:00
jet
ad379e1b20
Merge branch 'wip' of oss.readytalk.com:/var/local/git/avian into wip
2009-11-03 11:50:21 -07:00
Joel Dice
ed4206b06d
fix order-of-operations bug in compile loop
...
The code was capturing branch snapshots too early - before the call to
populateSources which might perform further moves.
2009-11-02 21:11:39 -07:00
jet
50dae3067d
modified binaryToObject to support ARM
2009-10-30 15:04:15 -06:00
Joel Dice
e825da60aa
update continuation constants to reflect new field offsets
2009-10-30 00:45:46 +00: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
3c893b2ee3
Merge commit 'origin/master' into wip
2009-10-27 10:36:19 -06:00
Joel Dice
1fd00dd55d
revert all __attribute__ ((externally_visible)) changes because it's not clear yet how to detect whether it's supported
2009-10-27 10:35:26 -06:00
Joel Dice
e3b21e80ba
Merge commit 'origin/master' into wip
2009-10-27 09:41:20 -06:00
Joel Dice
f57d80f1b7
ammend recent commit to avoid using __attribute__ ((externally_visible)) when it is not available (second try)
2009-10-27 09:41:00 -06:00
Joel Dice
8bf3487ff1
Merge commit 'origin/master' into wip
2009-10-27 09:35:13 -06:00
Joel Dice
51fcf1ef74
ammend recent commit to avoid using __attribute__ ((externally_visible)) when it is not available
2009-10-27 09:34:46 -06:00
Joel Dice
2efff818ea
Merge commit 'origin/master' into wip
2009-10-27 09:17:54 -06:00
Joel Dice
4570b86da0
add __attribute__ ((externally_visible)) to EXPORT macros to facilitate whole-program optimization using GCC 4.5
2009-10-27 09:16:08 -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
064ad572bc
use truncation, not rounding in float2Int instructions
2009-10-20 15:43:24 -06:00
Joel Dice
f27ecaa199
fix memcpy argument order in Avian_avian_Singleton_getLong
2009-10-20 13:38:05 -06:00
Joel Dice
e06f0407cb
fix powerpc bootimage build (second try)
2009-10-20 09:06:52 -06:00
Joel Dice
c044781807
fix powerpc bootimage build
2009-10-20 08:20:49 -06:00
Joel Dice
984f3106fd
fix powerpc build
2009-10-19 10:31:34 -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
963bfb3e3f
avoid array bounds warnings from GCC 4.3
...
These warnings are due to GCC being smart enough to do interprocedural
constant propagation but not smart enough to avoid false positives in
all cases when looking for array bounds errors.
2009-10-17 18:09:54 -06:00
Joel Dice
7b0378c180
support darwin/x86_64
2009-10-14 10:01:37 -06:00
Joel Dice
ef4a8430ad
add binaryToObject utility
...
We use this utility instead of objcopy to embed data into object files
because it offers more control over e.g. section alignment, which is
important for bootimage builds.
2009-10-13 19:00:16 -06:00
Joel Dice
87950e86b8
add missing parameter to native SystemClassLoader methods
2009-10-13 18:42:49 -06:00
Joel Dice
9fcdfaf7ff
implement binaryToElf utility and use it instead of objcopy on Linux
...
This is necessary because objcopy does not currently allow us to
specify the alignment requirement for the .boot section used to store
the boot image for AOT builds. This may be a problem for Windows as
well, in which case we'll need to add a binaryToPE utility.
2009-10-11 16:09:23 -06:00
Joel Dice
c65b106112
whitespace tweak in binaryToMacho.cpp
2009-10-11 16:06:09 -06:00
Joel Dice
b878b84d32
set DebugCompile to false in compile.cpp
2009-10-11 16:05:37 -06:00
Joel Dice
b4c1c6badf
fix process=interpret build
2009-10-10 18:23:14 -06:00
Joel Dice
44a6620aa1
disable use of SSE when compiling ahead-of-time
2009-10-10 17:46:43 -06:00
Joel Dice
38bf29300f
enable SSE<->GPR moves when size matches word size
2009-10-10 22:27:35 +00:00
Joel Dice
78d9e51b7e
replace hasMoreThanOneSite with uniqueSite; rename Value fields
...
uniqueSite also checks, if applicable, to see if the second word of a
value shares the specified site with the first value as its sole site.
Also renamed a couple of fields in Value for clarity.
2009-10-10 16:07:30 -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
23197da679
fix handling of subroutines in methods of return type long on 32-bit systems
2009-10-06 03:17:12 +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
953cb69e5e
move proxy and annotation code from C++ to Java
...
This allows code shrinkers to remove it if it's not used by the application.
2009-09-19 16:21:15 -06:00
Joel Dice
1a2eb3836c
Merge branch 'master' of oss.readytalk.com:/var/local/git/avian
2009-09-18 18:01:57 -06:00