fschneider@google.com
e2a0c8f7ca
Optimize stores to ExternalUint8Array and ExternalUint8ClampedArray in the optimizer.
...
This CL adds support for these two array types to the StoreIndexed instruction.
Review URL: https://codereview.chromium.org//12263010
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18517 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-14 12:59:51 +00:00
johnmccutchan@google.com
9fb0984c9d
SSE Assembler + Linux build fixes
...
Review URL: https://codereview.chromium.org//12223115
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18493 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-13 23:05:17 +00:00
johnmccutchan@google.com
dd140c2958
Revert SSE assembler changes
...
Review URL: https://codereview.chromium.org//12212151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18410 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 23:14:12 +00:00
johnmccutchan@google.com
06eb49d537
SSE Assembler and Disassembler support
...
Review URL: https://codereview.chromium.org//12207117
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18406 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-12 22:43:48 +00:00
regis@google.com
4ac3d21c08
Initial revision of ARM assembler.
...
Object references and calls, as well as their fixups, are still unimplemented.
Review URL: https://codereview.chromium.org//12090034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17775 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 16:46:10 +00:00
podivilov@google.com
1c451fc100
Replace "enter" instruction with "push(ebp); mov(ebp, esp);" sequence.
...
"enter" instruction is rare and is not supported by valgrind.
R=srdjan@google.com ,vegorov@google.com
Review URL: https://codereview.chromium.org//12028002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17378 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 09:30:41 +00:00
regis@google.com
912194a756
Fix vm code base so that it can be built for --arch=simarm (no snapshot yet).
...
Review URL: https://codereview.chromium.org//11956004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17246 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-18 00:34:20 +00:00
fschneider@google.com
3cd9fa513f
Fix bug in the x64 assembler's movw instruction.
...
The order of prefixes was wrong. The operand size prefix (0x66)
must occur before the REX prefix. From the instruction set reference:
[...]the REX prefix byte must immediately precede the opcode byte or
the escape opcode byte (0FH). [...]
Also, make movw(reg, addr) unavailable, consistent with ia32.
TEST=runtime/vm/assembler_x64_test.cc
Review URL: https://codereview.chromium.org//11961013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17135 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 12:12:21 +00:00
srdjan@google.com
40a7130741
Inline Doubles truncate and round.
...
Review URL: https://codereview.chromium.org//11573044
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16983 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 20:42:47 +00:00
fschneider@google.com
87a3a4b479
Support immediate and memory operands for PushArgumentInstr in optimized code.
...
If a value is a constant or stored on the stack this change avoids loading it into a
new register before pushing it.
Review URL: https://codereview.chromium.org//11791051
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16806 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-08 16:51:57 +00:00
asiva@google.com
92dee42dcc
Do not emit pointer information for embedded singleton VM Isolate objects while generating code. These embedded objects do not need to be visited during GC.
...
Review URL: https://codereview.chromium.org//11722026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16645 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 18:38:00 +00:00
asiva@google.com
6749a3be79
Add read only handles for the following predefined symbols
...
"=="
"[]"
"[]="
"this"
and use them in the code.
Review URL: https://codereview.chromium.org//11519006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15942 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 01:20:02 +00:00
vegorov@google.com
132bdc6bfb
Support VTune's JIT interface.
...
R=iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//11412106
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15517 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-29 13:54:06 +00:00
fschneider@google.com
5399496ac4
Only require SSE2 at minimum hardware requirement.
...
BUG=dart:6010
Review URL: https://codereview.chromium.org//11416136
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15253 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-22 12:46:57 +00:00
johnmccutchan@google.com
92d6c1e317
Add support for XMM8..XMM15
...
Review URL: https://codereview.chromium.org//11358262
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15162 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-20 17:37:07 +00:00
fschneider@google.com
8aa175b9e6
Restrict immediate operands to smi where only smis are supported.
...
Re-enable redundant phi elimination.
Add x64 codegen templates and assembler instructions for immediate operands.
Fix x64 assembler for imull when using r8-r15.
Add x64 instruction for imulq(reg, imm).
Fix x64 disassembler printing of immediates.
Review URL: https://codereview.chromium.org//11362210
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14814 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:44:34 +00:00
fschneider@google.com
c2ec22a652
Fix bug with mint unboxing on non-SSE 4.1 machines.
...
I forgot to check for SSE 4.1 support in one place. For machines
that do not support SSE 4.1 we should never generated unboxed
mint operations.
Review URL: https://codereview.chromium.org//11038016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13164 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-03 09:11:21 +00:00
johnmccutchan@google.com
4f193292df
Enable Float32Array_getIndexed on X64 now that cvtss2sd is implemented
...
Merge remote-tracking branch 'git-svn'
Implement cvtss2sd and cvtsd2ss on X64
Review URL: https://codereview.chromium.org//11009006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13077 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-01 17:59:51 +00:00
fschneider@google.com
71767f5218
Add code for CPU feature detection and use it to detect SSE3 and SSE 4.1.
...
The Dart VM now requires at least SSE3 to build and run.
There is a new flag --use-sse41 (default:true) to disable the use of
SSE 4.1 features manually.
Review URL: https://codereview.chromium.org//10990028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12897 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-26 09:08:21 +00:00
srdjan@google.com
b2f09ea5df
FIx crash in disassembler: check that an addrs is tagged before testing it to be part of the heap.
...
Review URL: https://codereview.chromium.org//10915256
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12308 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-13 09:46:04 +00:00
fschneider@google.com
a52116f4af
Add immediate operand support for indexed operations.
...
The value and/or the index of indexed loads/stores can
be emitted as immediate operands to reduce the number
of registers needed when constants are used.
Review URL: https://chromiumcodereview.appspot.com//10933045
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12265 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-12 13:49:12 +00:00
srdjan@google.com
3051c69910
Improve moves of Smi and null objects. Add result cid to List constructor calls. Add tracing of inline cache misses in optimized code (a big no-no).
...
Review URL: https://chromiumcodereview.appspot.com//10933019
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12208 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 15:41:34 +00:00
vegorov@google.com
5f9ff89e0a
Add support for WritableRegister policy in the register allocator.
...
Use it to eliminate push/pop on the fast path of the write barrier.
Tighten assertions in StoreIntoObject to ensure that value register is not equal to object register. Current code can't cope with that.
BUG=
Review URL: https://chromiumcodereview.appspot.com//10909169
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12193 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-11 12:50:52 +00:00
srdjan@google.com
fd09b935dd
Intrinsify Double.toInt.
...
Review URL: https://chromiumcodereview.appspot.com//10914142
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12064 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-07 20:41:53 +00:00
vegorov@google.com
1911b2bc81
Make register allocator to disregard constant computation with no uses.
...
Inline constant values into environments, instead of creating a use of the constant definition.
Change BinarySmiOpComp code template to allow inline constant uses for the right hand side.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10916082
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11798 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-04 09:58:57 +00:00
vegorov@google.com
7f5971b251
Fix computations in LeaveCallRuntimeFrame to use kDoubleSize for saved XMM registers.
...
On ia32 a single XMM register occupies two words.
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10912028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11659 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 21:21:59 +00:00
vegorov@google.com
a573d2dec8
Unbox phis that were proven to be of type Double.
...
Eliminate Boxing/Unboxing pairs.
Allow boxing, unboxing and double binary operations to participate in CSE.
Allow double comparisons to operate on unboxed inputs.
Support XMM registers and double spill slots in deoptimization.
Save XMM registers when calling to runtime from WriteBarrier stub.
R=srdjan@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10919008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11652 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 20:39:48 +00:00
vegorov@google.com
264c4f6d1a
Add support for XMM registers in SSA code generation pipeline.
...
Split BinaryDoubleOp into several instructions that manipulate unboxed doubles.
R=fschneider@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10875030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11313 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-24 14:45:42 +00:00
kmillikin@google.com
25ac913c69
Remove the default contains_call parameter on location summaries.
...
The plan is to use this parameter to make finer distinctions between
calls (e.g., safepoint vs. non-safepoint). It's a bit safer to eliminate
the default.
R=vegorov@google.com
BUG=
Review URL: https://chromiumcodereview.appspot.com//10843006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10052 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-31 11:51:47 +00:00
vegorov@google.com
61dc368874
Fix kStoreBufferBlockProcessRuntimeEntry calling sequence.
...
Poping of volatile registers was performed without taking into account the fact that stack pointer could have been modified to ensure correct alignment _after_ volatile registers were pushed.
Enable --use-ssa on x64 again.
BUG=4221
Review URL: https://chromiumcodereview.appspot.com//10820053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@10007 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-30 10:38:48 +00:00
srdjan@google.com
d0a991a41c
Various cleanups, adding tests.
...
Review URL: https://chromiumcodereview.appspot.com//10807070
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9821 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 17:55:53 +00:00
vegorov@google.com
d83a634324
Add spill slot locations.
...
Review URL: https://chromiumcodereview.appspot.com//10805053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9810 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-23 14:05:48 +00:00
srdjan@google.com
9b391ef9cf
Add some missing x64 instruction variations.
...
Review URL: https://chromiumcodereview.appspot.com//10696183
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9578 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-12 00:41:45 +00:00
srdjan@google.com
e74f5a721b
Implement more intrinisification for x64 (not as inlined code but as header of the target).
...
Review URL: https://chromiumcodereview.appspot.com//10701147
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9573 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 22:37:41 +00:00
vegorov@google.com
1bd5a9b414
Skeleton of a linear scan register allocator.
...
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10696151
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9563 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-11 18:52:17 +00:00
iposva@google.com
dd800b6870
- On store buffer block overflow call a VM leaf function to
...
add the entries into the store buffer.
- Add a way to preserve and restore caller saved registers.
- Clean up the implementation of the stub for Assembler::Stop.
Review URL: https://chromiumcodereview.appspot.com//10758008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9490 260f80e4-7a28-3924-810f-c04153c831b5
2012-07-09 22:58:27 +00:00
iposva@google.com
cccf112d1e
- Document the store barrier.
...
Review URL: https://chromiumcodereview.appspot.com//10658008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9051 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-23 00:17:25 +00:00
iposva@google.com
d4bd618e75
- Fix the x64 store-barrier.
...
- Allow assembler test drivers to be shared across architectures.
- Add a shared StoreIntoObject assembler test.
Review URL: https://chromiumcodereview.appspot.com//10636017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9050 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 23:48:51 +00:00
iposva@google.com
936e659da1
- Remove extra jumps from store barrier on x64.
...
Review URL: https://chromiumcodereview.appspot.com//10641018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@9014 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-22 07:57:11 +00:00
iposva@google.com
5e52657f33
- Implement the filtering store barrier on x64.
...
Review URL: https://chromiumcodereview.appspot.com//10581049
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8953 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-20 23:48:26 +00:00
asiva@google.com
88243dfce2
Rework leaf calls as just simple C calls with a signature and not the NativeArgumentDescriptor.
...
Review URL: https://chromiumcodereview.appspot.com//10592006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8881 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-19 23:57:40 +00:00
vegorov@google.com
959cf98b00
Implement a simple register allocator that tries to keep instruction results in registers.
...
Add --optimization-filter flag that allows to disbable optimizations for all function which do not match prefix. This allows to quickly localize problems with code generation.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10559035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8811 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-18 18:04:22 +00:00
regis@google.com
7527d97cf5
Inline Math.sqrt in new compilers.
...
Review URL: https://chromiumcodereview.appspot.com//10542167
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8702 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-15 00:56:25 +00:00
vegorov@google.com
bd19464867
Implement kDoubleToDouble and kIntegerToDouble on ia32 and x64.
...
Fix bug in assembling of cvtsi2sd on x64.
R=srdjan@google.com
Review URL: https://chromiumcodereview.appspot.com//10534116
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8593 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-13 08:29:40 +00:00
vegorov@google.com
70a81f4264
Implement inlined version of binary arithmetic operations for doubles.
...
No attempt to reuse temporary boxes or locally propagate types is done.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//10533053
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8433 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-08 11:27:28 +00:00
cshapiro@google.com
4dc1d4de6d
Intrinsify some ByteArray methods.
...
get:length is intrinsified for internal and external subtypes.
[] is intrinsified for 8- and 16-bit internal subtypes on ia32.
[] is also intrinsified for 32-bit internal subtypes on x64.
Review URL: https://chromiumcodereview.appspot.com//10546035
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8371 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 23:43:42 +00:00
srdjan@google.com
0912e4ded7
More code for ia32, more shared code.
...
CreateArrayComp, EqualityCompareComp, StoreStaticField, LoadStaticField, StoreIndexedComp, StoreInstanceFieldComp, Throw, Rethrow, AssertBooleanComp.
Made more code shared, which has the disadvantage od splitting MakeLocationSummary from EmitNativeCode. Discuss.
Review URL: https://chromiumcodereview.appspot.com//10543013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8343 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-06 15:42:07 +00:00
srdjan@google.com
755790f46f
Adding unary op optimizations, missing assembly operations.
...
Review URL: https://chromiumcodereview.appspot.com//10440099
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8174 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 20:38:55 +00:00
vegorov@google.com
9125248ea2
In generated code for x64 don't load object's class directly from class_ field.
...
Instead look it up in class table by class index taken from object's tags.
R=iposva@google.com
Review URL: https://chromiumcodereview.appspot.com//10458031
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8159 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-31 15:35:14 +00:00
srdjan@google.com
60cb692878
Do pops instead of addq(RSP when possible).
...
Review URL: https://chromiumcodereview.appspot.com//10458033
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8110 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-30 16:05:10 +00:00