Commit Graph

184 Commits

Author SHA1 Message Date
regis@google.com fc919001c5 Improve generated MIPS code for conditional expressions and branches by delaying
emission of comparison code.
Improve instruction tracing in all simulators.

R=zra@google.com

Review URL: https://codereview.chromium.org//817593002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42555 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-22 20:50:15 +00:00
regis@google.com 0fb9f43f32 Complete and clean up breakpoint support in all 3 debuggers embedded in MIPS,
ARM, and ARM64 simulators.
Implement the same debugging commands in all 3 simulators: stop_sim_at flag, bt,
p icount, break, del, unstop, etc...

R=zra@google.com

Review URL: https://codereview.chromium.org//789903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42216 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-09 19:26:26 +00:00
johnmccutchan@google.com 456bdc4ea3 Enable the profiler on the simulator
R=asiva@google.com

Review URL: https://codereview.chromium.org//718393005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41752 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-14 23:15:00 +00:00
iposva@google.com 55357d2993 - Use the simulator to do atomic operations that could also
be executed in generated code.

R=koda@google.com, zra@google.com

Review URL: https://codereview.chromium.org//677193002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41332 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-27 19:21:33 +00:00
zra@google.com f3a21e3ff3 Uses correct mnemonic for vmrs instructions.
Keeps vmstat as a macro.

R=iposva@google.com

Review URL: https://codereview.chromium.org//647523002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41042 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-10 15:30:41 +00:00
regis@google.com 632edf5d55 Implement bigint mulAdd and sqrAdd intrinsics on ARM.
Add support for umaal instruction on ARM (assembler, disassembler, simulator).
Add assembler test for umaal instruction on ARM.

R=johnmccutchan@google.com, zra@google.com

Review URL: https://codereview.chromium.org//638983002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40993 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-08 16:59:59 +00:00
regis@google.com b7120c779c Fix carry out calculation in ARM simulator.
Add a regression test.
Simplify overflow calculation in ARM simulator.

R=zra@google.com

Review URL: https://codereview.chromium.org//623823003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40918 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-06 07:12:15 +00:00
zra@google.com dba0530c27 Adds back arm ldrex strex.
R=iposva@google.com

Review URL: https://codereview.chromium.org//616223005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40865 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-02 02:41:08 +00:00
iposva@google.com cc13627fc8 - Remove Isolate::CurrentAddress().
- Remove use of INFINITY and -INFINITY.

R=rmacnak@google.com, srdjan@google.com

Review URL: https://codereview.chromium.org//609593002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40700 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 23:39:30 +00:00
zra@google.com c6f380ed3d Avoids vmovsr on ARM.
R=johnmccutchan@google.com, regis@google.com

Review URL: https://codereview.chromium.org//606893002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40696 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-25 22:09:26 +00:00
johnmccutchan@google.com 6f0b2bb2a9 Profiler tweaks
* Rename Script tag to Dart tag.
* Respect ignore bit on samples.
* Mark samples collected with an exit frame.
* Don't give exclusive CPU ticks to top frame on samples collected from an exit frame (because CPU usage is in the native code we've called out to not the function waiting to return).

R=asiva@google.com

Review URL: https://codereview.chromium.org//418433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38522 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-23 21:09:25 +00:00
srdjan@google.com 154eb30f58 ONe more iteration of PcDesacriptor iterator imporvement: do not copy record but access individual values when needed.
R=hausner@google.com

Review URL: https://codereview.chromium.org//403643002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38408 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-18 20:11:29 +00:00
srdjan@google.com 1259bda234 Fix PcDescriptor iterator to never return a pointer to a memory location since the PcDescriptor can move with the GC.
R=hausner@google.com

Review URL: https://codereview.chromium.org//396213005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38338 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-17 18:30:38 +00:00
johnmccutchan@google.com e7ddd5d047 Move some isolate state setup from C++ code to JumpToExceptionHandler stub (take 3).
- CL is the same as take 2, but, I now prohibit the profiler from walking the call stack when the isolate is executing the jump to exception handler.

R=asiva@google.com

Review URL: https://codereview.chromium.org//395233002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38300 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-16 18:03:17 +00:00
johnmccutchan@google.com 7366afd86e Revert r38240
BUG=

Review URL: https://codereview.chromium.org//393103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38257 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 20:48:20 +00:00
srdjan@google.com 9c8a395f6f More PcDescriptor cleanups, compress recors if no try index is needed (frequent).
R=asiva@google.com

Review URL: https://codereview.chromium.org//382993003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38242 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 17:07:03 +00:00
johnmccutchan@google.com efc684e4a8 Move some isolate state setup from C++ code to JumpToExceptionHandler stub
This change means that the isolate's top exit frame info and vm tag will only be updated after setting the frame pointer.

This is step one in a series of changes to allow the profiler to walk the stack when there is no frame pointer.

R=asiva@google.com

Review URL: https://codereview.chromium.org//393693002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38240 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-15 16:39:19 +00:00
johnmccutchan@google.com 4d25b35657 Revert r38216
BUG=

Review URL: https://codereview.chromium.org//390223003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38218 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 22:31:48 +00:00
johnmccutchan@google.com 8b99428010 Move some isolate state setup from C++ code to JumpToExceptionHandler stub
This change means that the isolate's top exit frame info and vm tag will only be updated after setting the frame pointer.

This is step one in a series of changes to allow the profiler to walk the stack when there is no frame pointer.

R=asiva@google.com, regis@google.com

Review URL: https://codereview.chromium.org//396463003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38216 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-14 21:59:49 +00:00
srdjan@google.com 4c69c06f27 Specify descriptor kind to iterate on.
R=asiva@google.com

Review URL: https://codereview.chromium.org//383523005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38128 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 19:44:49 +00:00
srdjan@google.com 2bb77cd8d5 Iterate over PcDescriptors only via iterators, not via an index. (preparation for more compression of PcDescriptors).
R=asiva@google.com

Review URL: https://codereview.chromium.org//356923006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38032 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-07 18:25:45 +00:00
zra@google.com 9e6655f810 Fixes Android build by using C++ math header instead of C one.
This change also requires prefacing the math calls with
std::, i.e. isinf -> std::isinf.

R=asiva@google.com, koda@google.com

Review URL: https://codereview.chromium.org//353403004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37839 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 22:15:26 +00:00
zra@google.com 0c562fdd16 For arm, chooses hard vs. soft fp ABI based on compiler.
We have been hard-coding hardfp in the gyp file. This makes
using softfp hard. This change detects hardfp by looking at
a predefined gcc macro, and otherwise uses softfp. This
change also adds a flag to simarm so that we can test softfp.

R=regis@google.com

Review URL: https://codereview.chromium.org//298533002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36337 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-19 23:13:25 +00:00
zra@google.com b39bcf7bf6 Allows unboxed doubles to be disabled.
This helps to support ARMv5TE. Also adds asserts to
ensure that neon and vfp instructions are not generated
when those features are disabled on ARM.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//292433008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36262 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-16 17:17:52 +00:00
johnmccutchan@google.com a0682663e0 Fix Android build warnings
BUG=
R=zra@google.com

Review URL: https://codereview.chromium.org//287933002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36183 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 18:32:11 +00:00
zra@google.com c323e2ac13 Implements unboxed Mints on ARM.
R=johnmccutchan@google.com, regis@google.com

Review URL: https://codereview.chromium.org//206503005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34256 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-21 16:26:21 +00:00
zra@google.com fd366da1cf Updates refactoring of CPU feature detection
with fix that uses cpuid for Intel/Linux.

R=asiva@google.com

Review URL: https://codereview.chromium.org//136303012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32980 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 19:28:30 +00:00
zra@google.com 3693beeb6b Reverts refactoring of CPU feature detection for
assertion failure in Dartium.

R=asiva@google.com

Review URL: https://codereview.chromium.org//142663004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32560 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-11 16:05:43 +00:00
zra@google.com 6f2096face Refactors some CPU feature detection into new class CpuInfo, and uses new information in VM service.
This change rewrites the code from the ARM assembler for parsing /proc/cpuinfo on Linux and Android, and collects it into a CpuInfo class that can be used for other architectures as well. This code is in cpuinfo_*.cc. /proc/cpuinfo equivalents are used for Mac and Windows. CpuInfo is used by the VM service to report on the hardware dart is running on. In the future CpuInfo can also be used here to provide more information.

R=iposva@google.com, johnmccutchan@google.com

Review URL: https://codereview.chromium.org//120723003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32468 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-08 22:27:27 +00:00
srdjan@google.com e8bd77a6f4 Use 'fabs' instead of 'abs' where appropriate.
R=zra@google.com

Review URL: https://codereview.chromium.org//123543002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31436 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 23:55:37 +00:00
zra@google.com b3158827fd Fixes ARM SIMD vabsqs instruction in the simulator.
R=srdjan@google.com

Review URL: https://codereview.chromium.org//77553008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30529 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 16:41:02 +00:00
zra@google.com df1e5247fe Adds support for ARM softfp calling convention.
The cross-compiler with the Android NDK doesn't support
the 'hard' calling convention, so we need both. I've
added a preprocessor define to the gyp file for the
standalone vm indicating support for 'hard' so that I
don't have to modify the Dartium gyp files.

R=srdjan@google.com

Review URL: https://codereview.chromium.org//52803002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29577 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 18:57:55 +00:00
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
srdjan@google.com 8cd4bf5b92 Change inlined stack frame iterator to use code and pc instead of frame.
R=asiva@google.com

Review URL: https://codereview.chromium.org//23494026

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27140 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-04 19:36:20 +00:00
zra@google.com a783459837 Preserves callee-saved FPU registers on ARM
Preserves callee-saved FPU registers on ARM when
going from C++ to Dart code. Adds assertions to
the simulator to make sure this is being done
correctly.

R=regis@google.com

Review URL: https://codereview.chromium.org//23549013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27072 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-03 18:23:43 +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 8f3e8783f8 Implements the two argument shuffle SIMD instruction for ARM.
R=regis@google.com

Review URL: https://codereview.chromium.org//21004011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25638 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 20:49:22 +00:00
zra@google.com 42217dc159 Implements far-branches on ARM.
R=regis@google.com

Review URL: https://codereview.chromium.org//21159002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25617 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-30 15:33:36 +00:00
zra@google.com af23dfc5b2 Increases the number of ARM floating-point registers.
This is to be consistent with VFPv3_D32. Later, we'll detect
VFPv3_D16 at runtime.

R=regis@google.com

Review URL: https://codereview.chromium.org//19806005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25352 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 18:25:44 +00:00
zra@google.com dd9adc1a86 Adds more SIMD instructions for ARM.
Adds the vnegqs, vabsqs, and vandq instructions.

Also reverts the increase in the number of floating point registers since it is causing crashes on hardware.

R=regis@google.com

Review URL: https://codereview.chromium.org//19493004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25320 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 23:26:12 +00:00
zra@google.com 4b97f8c18c Adds reciprocal squre root SIMD instructions for ARM.
R=regis@google.com

Review URL: https://codereview.chromium.org//19875002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25291 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-22 18:19:44 +00:00
zra@google.com a15bac1044 Adds ARM SIMD instructions.
vminqs, maxqs, vrecpeqs (Reciprocal estimate), vrecpsqs (Reciprocal Newton-Raphson step).

R=regis@google.com

Review URL: https://codereview.chromium.org//19773017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25245 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-19 21:32:03 +00:00
zra@google.com 18f6092d52 Implements ARM SIMD comparison instructions.
R=regis@google.com

Review URL: https://codereview.chromium.org//19678020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25189 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-18 22:56:45 +00:00
zra@google.com d886c10f6e Enables a SIMD test for ARM.
Required adding the veorq, vmovq, and vdup instructions.

R=regis@google.com

Review URL: https://codereview.chromium.org//19776007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25165 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-18 18:40:27 +00:00
zra@google.com 4731ad6b71 Adds the vtbl ARM SIMD instruction.
It is needed for the Float32x4ShuffleInstr of the intermediate language.

R=regis@google.com

Review URL: https://codereview.chromium.org//19400003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25073 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 21:18:26 +00:00
zra@google.com 344b295eee Implements ARM SIMD multiplication and subtraction instructions.
R=regis@google.com

Review URL: https://codereview.chromium.org//19290006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25052 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-16 16:13:56 +00:00
zra@google.com f219f81b14 Begins implementation of ARM neon instructions.
Just adds the vadd instruction, but also changes the
arm assembler to expose the Q registers rather than the
D registers. Q0 = D1:D0 = S3:S2:S1:S0. This is similar
to how ia32 and x64 use only the xmm registers for
floating point.

R=regis@google.com

Review URL: https://codereview.chromium.org//18684008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24982 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-12 23:22:50 +00:00