srdjan@google.com
d78737298c
Last cleanup int -> intptr_t. Also removed a hack (boolean is not an integer).
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//26345002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28372 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-08 18:54:00 +00:00
fschneider@google.com
9d8049dd4d
Small code cleanup in the assembler/simulator.
...
Review URL: https://codereview.chromium.org//23578013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27189 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-05 11:07:09 +00:00
fschneider@google.com
cfab482b84
Follow-up fix to my change to IsPowerOfTwo: Alignment of one means no alignment, not zero.
...
We assert that the alignment is a power of two. Therefore, platforms that do not need
alignment should return alignment of one instead of zero.
R=kmillikin@google.com
Review URL: https://codereview.chromium.org//23745008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27037 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 10:56:43 +00:00
jacobr@google.com
605b33c1bc
fix cpp11 compile errors
...
R=asiva@google.com
Review URL: https://codereview.chromium.org//23072026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26387 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-20 20:24:11 +00:00
asiva@google.com
b4d9e0d620
Auto create ApiLocalScope before calling native functions, this ensures that
...
native functions do not have to call Dart_EnterScope/Dart_ExitScope
when they callback into the VM.
Remove Dart_EnterScope/Dart_ExitScope calls around native functions in 'bin'
directory.
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//22303002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25827 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 19:27:48 +00:00
zra@google.com
fa2ad38a31
Enables per-function far-branches for ARM and MIPS.
...
R=regis@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//21363003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25723 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-01 20:51:46 +00:00
zra@google.com
dad3270d95
Implements far branch targets for MIPS.
...
This change adds a flag --mips-far-branches, which when set causes
relative branches to be converted to absolute branches by determining
the PC, adding the branch offset to it, and using the jr or jalr
instruction to jump if the branch test passes.
This procedure clobbers the assembler temporary TMP, so TMP can no
longer be used in a branch test or in the branch delay slot of a
relative branch. Because TMP can't be used in a branch test, a
new temporary is introduced CMPRES2. This change replaces TMP with
CMPRES1 or another register where TMP can no longer be used.
Tests that were failing due to a too-far relative have the
--mips-far-branches flag set.
R=regis@google.com
Review URL: https://codereview.chromium.org//20369003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25543 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-26 23:30:32 +00:00
zra@google.com
765960a56f
Removes checks for stack overflow from arm and mips simulators
...
The checks were performed before runtime and native calls,
but if we abort on an assertion failure there, then we
never make it to the StackOverflow runtime call.
R=regis@google.com
Review URL: https://codereview.chromium.org//18704006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24979 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 23:06:27 +00:00
zra@google.com
573b9d859a
Fixes a bug in the mips Random_nextState intrinsic.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//18141002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24549 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 20:46:28 +00:00
iposva@google.com
7c6573258b
- Protect against icount_ overflow in the delay slot and only
...
stop if a stop_sim_at value has been set.
R=zra@google.com
Review URL: https://codereview.chromium.org//18055006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24537 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-27 17:40:35 +00:00
zra@google.com
5bf5a92064
Fixes bugs in arm and mips intrinsifier.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//17634003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24427 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 18:58:47 +00:00
zra@google.com
8edda78ccc
Enables more tests for SIMMIPS.
...
. Fixes register allocation bugs
. Implements float <-> double conversion in assembler and simulator.
. Fixes floating point argument passing for simarm and simmips,
and floating point return for simarm, and adjusts tests to match.
R=regis@google.com
Review URL: https://codereview.chromium.org//17502002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24365 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 20:16:16 +00:00
zra@google.com
6ea08a30af
Allows exception object to be null in simarm and simmips.
...
Also, updates status files.
R=regis@google.com
Review URL: https://codereview.chromium.org//17587015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24361 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 18:38:46 +00:00
zra@google.com
488b20bd7e
Fixes buggy FPU tests for MIPS hardware.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//15874005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24152 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-18 16:47:43 +00:00
zra@google.com
4a99fabecb
Enables language tests for SIMMIPS.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//17131002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24098 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-17 15:58:31 +00:00
zra@google.com
c004b84376
Enables more VM tests for SIMMIPS.
...
Implements:
- Megamorphic instance calls
- Left-shift
- Equality
- and various bug-fixes.
R=regis@google.com
Review URL: https://codereview.chromium.org//15934025
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23877 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 20:08:40 +00:00
zra@google.com
e846af4128
Implements intrinsics for MIPS.
...
Also, adds the MADD, MADDU, MTLO, MTHI instructions
to the MIPS simulator, assembler, and disassembler.
R=regis@google.com
Review URL: https://codereview.chromium.org//16272004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23489 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-31 21:03:41 +00:00
zra@google.com
354b204cf0
Enables optimization on MIPS
...
- Exposes double precision rather than single precision floating point registers
to architecture generic code. This entails a mechanical change in the assembler
to floating point instructions.
- Adds slti, sltiu instructions for comparison with small immediates, and uses
them in the Branch(Un)Signed* macros.
- Fixes a bug in the intermediate language comparison/branching instructions
caused by using subu for comparison. Now it uses two slt instructions.
- Fixes register use bugs in intermediate language.
- More uses of NULLREG instead of loading Object::null()
R=regis@google.com
Review URL: https://codereview.chromium.org//16022011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23190 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-24 23:45:41 +00:00
zra@google.com
b350781cad
Impelemnts some FPU arithmetic function for the MIPS simulator, assembler, disassembler.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//15038008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22818 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-16 21:18:04 +00:00
zra@google.com
18268541b0
Implements int to double conversion instructions for MIPS simulator, assembler, disassembler.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//15144004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22763 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-15 23:51:17 +00:00
zra@google.com
144def4ee3
Implements FPU compare and branching for MIPS simulator, assembler, disassembler.
...
R=regis@google.com
Review URL: https://codereview.chromium.org//14672037
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22752 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-15 18:37:47 +00:00
zra@google.com
697364354b
Implements catch on MIPS.
...
Enables UnhandledException test for MIPS.
Review URL: https://codereview.chromium.org//14289006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21898 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 18:15:52 +00:00
regis@google.com
ad6005e5c4
Support debugger API on ARM.
...
Support smull ARM instruction in order to detect 32-bit multiplication overflow.
Enable debugger api tests on ARM.
Enable isolate tests on ARM.
Enable code descriptors tests on ARM.
Enable snapshot tests on ARM.
Enable heap tests on ARM.
Review URL: https://codereview.chromium.org//13983016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21890 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-23 16:10:22 +00:00
iposva@google.com
539588333e
- Reduce warnings about project settings in Xcode 4.
...
- Address compilation warnings found by clang.
Review URL: https://codereview.chromium.org//14084006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21786 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-22 05:31:03 +00:00
zra@google.com
069456803e
Implements features to run "Hello, world!" on simulated MIPS.
...
Review URL: https://codereview.chromium.org//14246039
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21759 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-19 18:31:47 +00:00
regis@google.com
48bb59325d
Reset simulator top exit frame info when coming via long jump from a throw.
...
Thanks to Srdjan for reporting the crash on Mac.
Review URL: https://codereview.chromium.org//14141008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21695 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 19:30:26 +00:00
regis@google.com
d79c7c1969
Implement long jump in ARM and MIPS simulators.
...
Implement error and exception handler stubs on ARM.
Hook up simulator for object tests.
Enable codegen and object tests on ARM.
Review URL: https://codereview.chromium.org//14309004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21680 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-18 16:23:25 +00:00
zra@google.com
e8f86c5d3a
Adds support for UseDartApi vm test on MIPS.
...
Also, adds:
- xori instruction,
- SubuDetectOverflow (like AdduDetectOverflow).
Review URL: https://codereview.chromium.org//13884017
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21396 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 22:20:32 +00:00
zra@google.com
1349cb1fea
Adds some floating point instructions to MIPS simulator, assembler, disassembler.
...
Review URL: https://codereview.chromium.org//14206002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21376 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-12 17:25:38 +00:00
zra@google.com
2c5cea8d4e
Supports FrameLookup vm test on MIPS
...
As with the similar CL for ARM, also:
- Supports inline allocation of objects.
- Supports checking of inline cache and instance calls.
- Supports subtype test cache.
- Supports (some) equality checks.
- Supports for (some) conditional branches.
- Supports for pool pointer setup in stubs.
Review URL: https://codereview.chromium.org//14076005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21233 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-10 21:59:57 +00:00
zra@google.com
9e05e96e90
Fixes a bug in MIPS simulator runtime call handling.
...
Also:
- Fixes a bug in the MIPS SimulatorDebugger that
causes a crash if the pc is an illegal address
- Reenables the FindCodeObject test on MIPS when
checking is off
Review URL: https://codereview.chromium.org//13489008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20924 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-04 16:56:00 +00:00
regis@google.com
05e2ba9540
Support FrameLookup vm test on ARM, requiring among other things:
...
Maintain a separate top_exit_frame_info for simulated frames and use it to
verify that longjumps are safe.
Make sure unwinding of scopes works in the presence of a simulator.
Support inline allocation of objects.
Support checking of inline cache and instance calls.
Support subtype test cache.
Support (some) equality checks.
Support for (some) conditional branches.
Support for pool pointer setup in stubs.
Review URL: https://codereview.chromium.org//13502002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20890 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 20:17:14 +00:00
srdjan@google.com
ec54a6e409
Mark CallLeafRuntimeStubCode as failing on Mips/Mac OS X.
...
Added some cleanups.
Review URL: https://codereview.chromium.org//13575002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20885 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-03 19:42:29 +00:00
zra@google.com
c4b55c1276
Third codegen test passing for simulated MIPS.
...
Review URL: https://codereview.chromium.org//13407003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20794 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-02 16:40:14 +00:00
zra@google.com
35aeebcd8c
First two codegen tests passing on SIMMIPS
...
Review URL: https://codereview.chromium.org//13228002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20734 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-01 17:02:44 +00:00
zra@google.com
463b651f78
Adds Stop to MIPS. Starts on MIPS call patcher.
...
Review URL: https://codereview.chromium.org//12703028
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20527 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-26 17:50:43 +00:00
zra@google.com
007c830756
Adds branch instructions and labels to the MIPS simulator, assembler, disassembler.
...
Review URL: https://codereview.chromium.org//12634030
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20419 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 21:37:10 +00:00
zra@google.com
f6da1febeb
Drops into Simulator Debugger only in a session that is already interactive.
...
This change backs out an earlier change to the disassemblers that
made them return false if an instruction couldn't be decoded.
This was used in the simulator debuggers for arm and mips to avoid
executing an instruction that couldn't be decoded.
Instead, now when an unknown instruction is encountered in the simulator,
if the simulator is running interactively, we drop into
the debugger, and otherwise die. We detect that a simulator is
running interactively by setting a flag if we enter the debugger
for a user set break point.
Review URL: https://codereview.chromium.org//12903006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20394 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-22 18:11:05 +00:00
zra@google.com
2bdc772122
Adds MIPS SPECIAL instructions to simulator, assembler, debugger.
...
Review URL: https://codereview.chromium.org//12837009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20321 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-21 15:50:31 +00:00
zra@google.com
82367b380d
Copies Simulator Debugger from ARM to MIPS.
...
Also includes changes to keep it from aborting unexpectedly.
Among other things, I changed the Disassembler::Disassemble to return false
when the underlying decoder can't decode an instruction. Then,
the MIPS SimulatorDebugger will refuse to step or cont on an instruction
that the Disassembler can't decode.
Review URL: https://codereview.chromium.org//12431016
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19958 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-13 18:43:16 +00:00
zra@google.com
ad8004569d
Adds MIPS instructions to simulator, assembler, disassembler
...
ins - bitfield insert
ext - bitfield extract
l{b,bu,h,hu,w} - load byte, unsigned byte, etc.
s{b,h,w} - store byte, halfword, word
Review URL: https://codereview.chromium.org//12519007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19819 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-11 20:50:50 +00:00
zra@google.com
6699610946
Adds a few MIPS arithmetic instructions to the simulator, assembler, disassembler
...
Review URL: https://codereview.chromium.org//12545024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19730 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 21:47:03 +00:00
iposva@google.com
f507e542de
- Add a skeleton MIPS assembler, disassembler and simulator.
...
- Remove unused fields and methods from ARM simulator.
- Remove unused 5th parameter from Simulator::Call.
Review URL: https://codereview.chromium.org//12541003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19606 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 11:04:27 +00:00
regis@google.com
a879bba2ff
Second codegen test passing on ARM (simulated).
...
This required support on ARM for:
- compilation of static calls
- patching of static calls
- stub to call into runtime
- redirection support for calls from simulator to host runtime
- stack frame iteration
Review URL: https://codereview.chromium.org//12381034
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19405 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-04 18:08:38 +00:00
regis@google.com
3b374ead4b
Compile and simulate first dart function on arm generated from ast.
...
Review URL: https://codereview.chromium.org//12335102
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19152 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 17:13:51 +00:00
regis@google.com
5675b85979
Generate first ARM assembler test and execute (simulate) it.
...
RFC: First draft showing how generated ARM code accesses GC'ed objects and
accesses patched call targets.
Review URL: https://codereview.chromium.org//12224024
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18200 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-07 00:55:47 +00:00
regis@google.com
cd746c8172
Initial revision of ARM simulator and (empty) MIPS simulator.
...
Review URL: https://codereview.chromium.org//12041056
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17623 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-25 01:16:35 +00:00