Commit Graph

72 Commits

Author SHA1 Message Date
Joshua Warner
c37b13301a remove old unused code
Conflicts:
	include/avian/codegen/lir.h
2014-03-16 19:41:48 -06:00
Joel Dice
918b7828f1 fix StackOverflowError stack walking in tails=true builds
The various Architecture::nextFrame implementations were not walking
the stack correctly when a StackOverflowError was thrown.  The
throwStackOverflow thunk is called before the frame of the most
recently called method has been fully created, and because tails=true
builds use a different calling convention, we need to treat this
situation carefully when building a stack trace or unwinding.
Otherwise, we will skip past all the java frames to the next native
frame, which is what was happening.
2014-03-14 09:59:04 -06:00
Joshua Warner
2ac9070399 fix arm/powerpc build 2014-02-25 21:33:08 -07:00
Joshua Warner
b711aef1b3 use Slice in Vector 2014-02-25 20:34:03 -07:00
Joshua Warner
52b23b8a6a move Allocator to include, properly namespaced 2014-02-25 19:13:41 -07:00
Joel Dice
3912f2c0e4 Merge pull request #171 from joshuawarner32/master
Flatten "vm" dir and split signal handling out of vm::System
2014-02-25 14:11:09 -07:00
Joshua Warner
f1806ce90e fix #172, regression in compiling shift operations 2014-02-24 13:24:14 -07:00
Joshua Warner
5ffdfecdc2 remove vm from code paths, to match namespacing 2014-02-21 13:32:28 -07:00
Joel Dice
2b1177039e use armv7 memory barriers by default
armv7 and later provide weaker cache coherency models than armv6 and
earlier, so we cannot just implement memory barriers as no-ops.  This
patch uses the DMB instruction (or the equivalent OS-provided barrier
function) to implement barriers.  This should fix concurrency issues
on newer chips such as the Apple A6 and A7.

If you still need to support ARMv6 devices, you should pass
"armv6=true" to make when building Avian.  Ideally, the VM would
detect what kind of CPU it was executing on at runtime and direct the
JIT compiler accordingly, but I don't know how to do that on ARM.
Patches are welcome, though!
2014-01-10 17:32:54 -07:00
Joshua Warner
fa65c67fbf Extract independent runtime thunks into their own file 2013-12-18 22:46:58 -07:00
Joshua Warner
eab36b3a23 Remove boilerplate code (nullaryOp methods in Compiler) 2013-12-18 16:51:20 -07:00
Joshua Warner
bd7b66a898 Remove boilerplate code (unaryOp methods in Compiler) 2013-12-18 16:43:15 -07:00
Joshua Warner
07d0f1172f Remove boilerplate code (float binaryOp methods in Compiler) 2013-12-18 15:22:38 -07:00
Joshua Warner
d5c1a094ca Remove boilerplate code (general binaryOp methods in Compiler) 2013-12-18 15:11:30 -07:00
Joshua Warner
b66a8549fd Remove boilerplate code (jump* methods in Compiler) 2013-12-18 14:38:05 -07:00
Joshua Warner
06432253ba consolidate many implicit list types into one 2013-12-11 10:54:50 -07:00
Joel Dice
a9d9bc5d20 fix Clang warnings 2013-07-03 13:33:46 -07:00
Joel Dice
87b02eb949 update copyright years
Previously, I used a shell script to extract modification date ranges
from the Git history, but that was complicated and unreliable, so now
every file just gets the same year range in its copyright header.  If
someone needs to know when a specific file was modified and by whom,
they can look at the Git history themselves; no need to include it
redundantly in the header.
2013-07-02 20:52:38 -06:00
Joel Dice
68c3b241ce handle sign extension of constants of various lengths
This is a generalization of 9918ea6 which handles 8-bit and 16-bit as
well as 32-bit values.
2013-04-22 21:15:49 -06:00
Joel Dice
d8729a7a8d fix zero-extension of constants in x86 compiler
scalac may emit a ldc followed by an i2c, whereas javac does the
conversion (including zero extension if necessary) at compile time.
This commit ensures we handle the i2c case properly.
2013-04-22 19:00:54 -06:00
Joel Dice
9918ea6cdd fix sign extension from constant to register on x86
scalac may generate a ldc followed by an l2i, whereas javac always
seems to condense this into a single ldc_w.  The former exposed a bug
in the JIT compiler which we never hit with javac-generated bytecode.
2013-04-18 11:27:05 -06:00
Joel Dice
8c1419fb89 jump to target if JumpIfFloatNotEqual comparison is unordered
A dcmpl or dcmpg followed by an ifneq should take the branch if an NaN
is involved.
2013-04-04 20:02:49 -06:00
Joel Dice
b436bd460a fix NaN handling in floating point comparisons 2013-04-03 16:19:33 -06:00
Joel Dice
54b560b149 fix Windows 32-bit bootimage build regression 2013-03-15 14:35:29 -06:00
Joshua Warner
add029ad3c fix powerpc build
Evidently, the powerpc gcc compiler feels it necessary to #define powerpc to 1. Seriously?  SERIOUSLY????
2013-02-28 16:41:44 -07:00
Joshua Warner
0b01dd565a fix multiple-include-of-stdint errors 2013-02-28 15:57:09 -07:00
Joshua Warner
9327043bc5 Merge branch 'master' into wip
Conflicts:
	makefile
	src/codegen/arm/assembler.cpp
	src/codegen/powerpc/assembler.cpp
	src/codegen/x86/assembler.cpp
2013-02-27 19:27:07 -07:00
Joel Dice
5e2d00010b move headers from src to src/avian
This is necessary to avoid name conflicts on various platforms.  For
example, iOS has its own util.h, and Windows has a process.h.  By
including our version as e.g. "avian/util.h", we avoid confusion with
the system version.
2013-02-27 13:33:29 -07:00
Joshua Warner
4d38873096 begin merging target assembler multimethod code 2013-02-24 22:38:58 -07:00
Joshua Warner
82eec28856 rename x86 Offset for consistency with arm and powerpc OffsetPromise 2013-02-24 20:48:06 -07:00
Joshua Warner
d2caf50772 fix debug build 2013-02-24 16:03:19 -07:00
Joshua Warner
4c8b593539 break Architecture out of Assembler 2013-02-23 23:03:01 -07:00
Joshua Warner
56625b89d8 group x86, arm, and powerpc target directories into 'target' 2013-02-23 22:47:52 -07:00
Joshua Warner
3d1ae1d517 fix include-what-you-use violations in x86 assembler 2013-02-23 22:29:58 -07:00
Joshua Warner
900b447e27 further break out powerpc assembler 2013-02-23 22:29:03 -07:00
Joshua Warner
73dda9c26e begin splitting out powerpc assembler 2013-02-23 22:26:48 -07:00
Joshua Warner
22d6ed1bec further split out arm assembler 2013-02-23 22:25:15 -07:00
Joshua Warner
fd59e1e08d begin splitting out arm assembler 2013-02-22 20:47:56 -07:00
Joshua Warner
fe7bb5e640 Merge branch 'master' into wip
Conflicts:
	makefile
2013-02-21 19:33:38 -07:00
Joshua Warner
a9e2984aaf fix arm and powerpc build 2013-02-21 16:51:31 -07:00
Joshua Warner
1f0833252d Merge branch 'master' into wip
Conflicts:
	src/codegen/compiler/event.cpp
	src/codegen/x86/assembler.cpp
	src/common.h
2013-02-20 11:27:39 -07:00
Joshua Warner
52b2fd74ef move math functions out of common.h, and into include/avian/util/math.h 2013-02-20 07:51:57 -07:00
Joshua Warner
b9e281612b move runtime-array to include 2013-02-19 22:56:05 -07:00
Joshua Warner
263c0dee4f move abort.h to include, add namespacing 2013-02-19 22:51:38 -07:00
Joshua Warner
987af120d8 move codegen headers to include/ 2013-02-19 22:21:22 -07:00
Joshua Warner
984f987e03 further break out x86 assembler 2013-02-19 09:05:31 -07:00
Joshua Warner
61f03643e0 begin splitting up x86 assembler 2013-02-19 09:05:31 -07:00
Joshua Warner
49bfda3932 construct SiteMasks based on OperationMasks 2013-02-19 09:05:30 -07:00
Joshua Warner
4462b87f10 group typeMask and registerMask into OperandMask, for Architecture::plan 2013-02-19 09:05:30 -07:00
Joshua Warner
2db0303e2f further compiler cleanup / organization 2013-02-13 23:23:07 -07:00