Commit Graph

35 Commits

Author SHA1 Message Date
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
fschneider@google.com 75c4844bf5 Cleanup uses of X::CheckedHandle where X::Cast or X::Handle is sufficient.
The only places where CheckedHandle is appropiate is with arguments to
runtime functions and values from Dart API functions.

For other places in the VM either normal Handle and ^=, or Cast is sufficient.

T::Cast is used when the value is guaranteed to be of type T (and never Object::null()).
Otherwise, the operator^= is used for casting.

Also fix a style issue where a Raw* should be used as return type.
Review URL: https://codereview.chromium.org//11826024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17013 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-14 09:51:48 +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
srdjan@google.com c83fd716e4 Implement SmiToInt and DoubleToInt. All necessary tests are in tests/language/arithmetic_test.dart
Review URL: https://codereview.chromium.org//11098009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13443 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-09 21:43:10 +00:00
fschneider@google.com 3efefbd582 Faster 64-bit right-shift for the ia32 compiler.
Review URL: https://codereview.chromium.org//11027060

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13295 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-05 14:42:00 +00:00
fschneider@google.com f60ebcc5fb Add fast 64-bit bitwise negation to the IA32 optimizing compiler.
Review URL: https://codereview.chromium.org//11043020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13221 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 12:01:12 +00:00
fschneider@google.com cb719805d8 Add fast 64-bit integer ADD and SUB to the optimizing compiler.
They operate on unboxed 64-bit integers stored in xmm registers.

I also fixed an issue with some SSE 4 specific assembler
tests where we hit an assert with an empty assembler buffer
when running with --no-use-sse41.
Review URL: https://codereview.chromium.org//11016028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13211 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-04 08:50:28 +00:00
fschneider@google.com 6632f191c4 Support for unboxed 64-bit integer bitwise operations and equality on ia32.
This CL adds AND, OR, XOR and == operations on unboxed 64-bit integers
(aka. mints).

Unboxed mints are stored in xmm registers. Each xmm register location
has an additional bit to keep track of its value representation.

Unboxed mints are materialized on the heap on deoptmization in the same way as
unboxed doubles.

The SSE instructions used are available on all CPUs that support SSE 4.1.
Review URL: https://codereview.chromium.org//10968059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@13112 260f80e4-7a28-3924-810f-c04153c831b5
2012-10-02 11:25:53 +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
cshapiro@google.com da14bf70a7 Add attributions so printf like functions can have their arguments checked.
This change also corrects some misuses of format strings and format
arguments that discovered by the compiler checks.

Review URL: https://chromiumcodereview.appspot.com//10869063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11912 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-06 00:58:25 +00:00
srdjan@google.com 06c5d1b818 Add disassembly of movaps to ia32 disassembler (movaps is better than movsd, avoids stalls etc.)
Review URL: https://chromiumcodereview.appspot.com//10917022

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11666 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 22:55:53 +00:00
cshapiro@google.com 72c02b48c4 Format pointer type declarations more consistently.
Review URL: https://chromiumcodereview.appspot.com//10896054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11645 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 19:26:28 +00:00
vegorov@google.com be313b5530 Restrict objects printing in disassembler to avoid GC.
R=iposva@google.com
BUG=4709

Review URL: https://chromiumcodereview.appspot.com//10918008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@11637 260f80e4-7a28-3924-810f-c04153c831b5
2012-08-30 18:08:30 +00:00
srdjan@google.com 0f925121e8 Add code comment to ia32 disassembly as well, bug fix new ia32 compiler, remove use of TMP register outside the assembler. Inlined special methods: ObjectArray, ImmutableArray and GrowableArray and String length getters.
Review URL: https://chromiumcodereview.appspot.com//10536096

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8554 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-12 16:09:02 +00:00
srdjan@google.com e409cd4ec6 Implement optimized unary ops for ia32 as well. Fix a crash in disassembler.
Review URL: https://chromiumcodereview.appspot.com//10453110

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@8211 260f80e4-7a28-3924-810f-c04153c831b5
2012-06-01 18:38:35 +00:00
asiva@google.com c483079e45 Remove the special stub code region as we don't need it anymore. With the new frame layout convention we can find the first dart frame quickly.
Review URL: https://chromiumcodereview.appspot.com//10409038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7778 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-18 23:28:34 +00:00
vegorov@google.com f999f30052 Extend assembler with ability to produce comments for the generated code.
Extend x64 disassembler with ability to decode and output recorded comments.

Example output (currently comments are emitted only by flow graph compiler at block/instruction boundaries, once instruction printing is refactored and supports printing into buffer simple "instruction" comment will be replaced with the actual IL construct):

        ;; B0
        ;; B1
        ;; instruction
0x007f0fff812525 00000055 49 bb 21 00 b4 04 10  mov    $0x7f1004b40021,%r11
0x007f0fff81252c 0000005c 7f 00 00
0x007f0fff81252f 0000005f 41 53                 push   %r11

R=srdjan@google.com

Review URL: https://chromiumcodereview.appspot.com//10407019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7723 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-17 21:56:16 +00:00
asiva@google.com c71a8cc1ee Change dart frame and stub frame layout to include the PC of the code executing on the frame. The stack frame layout is as follows:
ret PC
  saved EBP                          <== EBP
  PC (used to locate RawInstruction) <== ESP
Review URL: https://chromiumcodereview.appspot.com//10375059

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7675 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-16 00:47:05 +00:00
srdjan@google.com 328dadcbbf Fix disassembler crash.
Review URL: https://chromiumcodereview.appspot.com//10272017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7167 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-30 20:46:51 +00:00
vegorov@google.com ccc28fe3a9 Fix target address decoding in ia32 disassembler for CALL_JUMP_INSTR instructions.
R=kmillikin@google.com

Review URL: https://chromiumcodereview.appspot.com//10185001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6871 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 10:49:25 +00:00
asiva@google.com f9655463c7 Remove code index table.
Review URL: https://chromiumcodereview.appspot.com//10082017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6557 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-14 02:03:58 +00:00
asiva@google.com 2d3775a1b1 Resubmit change 6302 after fixing the compiler warning on older GCC compiler versions:
Change 6302 description:
- Wire the stack frame iterator to use stack maps for traversing objects if
there are stack maps in the code object. If there are no stack maps it still
does the old style stack frame traversal between fp and sp looking for tagged
pointers.
- Added a mechanism to be able to iterate over the code space and look for a
particular object.
Review URL: https://chromiumcodereview.appspot.com//10030001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6331 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-09 18:20:23 +00:00
asiva@google.com c79da818cc Revert change 6302 until the compiler warning is addressed.
Review URL: https://chromiumcodereview.appspot.com//10025003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6304 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 02:04:28 +00:00
asiva@google.com c27cec5b6e - Wire the stack frame iterator to use stack maps for traversing objects if there are stack maps in the code object. If there are no stack maps it still does the old style stack frame traversal between fp and sp looking for tagged pointers.
- Added a mechanism to be able to iterate over the code space and look for a particular object.

- Remove registration of code objects into the code index table.
Review URL: https://chromiumcodereview.appspot.com//9791048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6302 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-07 01:44:48 +00:00
srdjan@google.com f6dfa63c9a Cleaned up usage of Function::code, since it may be misunderstood that it points to the only Code object that belongs to that function. That is not the case, there can be several Code object generated for the same function. "Renamed" "code()" to "CurrentCode()", use unoptimized_code where it is clear that we are using unoptimized code only. If compiled, there is a 1:1 correspondence between function and unoptimized code.
Review URL: https://chromiumcodereview.appspot.com//9475031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@4656 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-28 01:31:44 +00:00
srdjan@google.com 4b3a6e1e57 Fixed a bug in isNegate intrinsified code, fixed negation for doubles (handling of negative zeros). Added tests. Fix issue 1554.
Factored out parts of X86Decoder::InstructionDecode in order to satisfy lint (500 lines max per function).
Review URL: https://chromiumcodereview.appspot.com//9338002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3971 260f80e4-7a28-3924-810f-c04153c831b5
2012-02-06 22:16:44 +00:00
sgjesse@google.com 65896148c9 Move utils.h and utils.cc from runtime/vm to runtime/platform
Moved additional parts of globals.h from vm/ to platform/ to support
types and constants used by utils.*.

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

BUG=
TEST=

Review URL: http://codereview.chromium.org//9209001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3337 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 13:23:40 +00:00
sgjesse@google.com bf67f24098 Move assert.h/assert.cc from runtime/vm to runtime/platform
The purpose of this change is twofold:

1. Source in the bin directory can now use the same assertions as
   source in the vm directory. The ASSERT macro used by the code
   in runtime/bin was just defined to use assert from the standard
   C library.
2. Moving other implementation parts from runtime/vm to
   runtime/platform (e.g. classes Monitor and Mutex) for sharing
   between runtime/bin and runtime/vm will be easier as these
   implementations rely on these assertion macros.

Created two gypi files for the platform directory. One for the
headers and one for the source. The source one is only included
when building the VM library and will be present in libdart.a
when the dart executable is linked.

All the code for asserts is still in the dart namespace.

Also re-arranged the order of includes to be alphabetically in
the files touched.

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

BUG=
TEST=

Review URL: http://codereview.chromium.org//9189003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@3335 260f80e4-7a28-3924-810f-c04153c831b5
2012-01-16 12:28:10 +00:00
turnidge@google.com c6aadb497d Teach the assembler how to generate multi-byte nops. Teach the
disassembler to understand them.  Use multi-byte nops in Align().  Add
tests.
Review URL: http://codereview.chromium.org//8888020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@2290 260f80e4-7a28-3924-810f-c04153c831b5
2011-12-08 23:35:34 +00:00
regis@google.com d55fe56fcc Disassembler for x64.
Review URL: http://codereview.chromium.org//8758005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1953 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 23:12:46 +00:00
hausner@google.com b7cf1328a1 Very first steps for a debugger
- Introduce Debugger class.
- Each isolate has a debugger object.
- Introduce stubs that can be put in place of static or dynamic
  Dart function calls.
- Very rudimentary command line option to place a breakpoint
  at the beginning of a function.
Review URL: http://codereview.chromium.org//8687037

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1928 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-30 17:04:45 +00:00
hausner@google.com a17bea5481 More info in disassembled code
Print out first 5 elements of an array object, rather than
just 'Array'. This helps in particular in disassembled
method and stub calls which now print the content of the
IC cache and ArgumentsDescriptor arrays. E.g.:

0x7404a5    ff7508            push [ebp+0x8]
0x7404a8    ff750c            push [ebp+0xc]
0x7404ab    b9012f7000        mov ecx,0x702f01  Array[bitAndFromInteger, 1, null, null]
0x7404b0    bafd050003        mov edx,0x30005fd  Array[2, 2, null]
0x7404b5    e8b6fcffff        call 0x740170  [stub: InlineCache]
0x7404ba    83c408            add esp,0x8
Review URL: http://codereview.chromium.org//8491061

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@1493 260f80e4-7a28-3924-810f-c04153c831b5
2011-11-12 00:45:17 +00:00
dgrove@google.com 4c0f559d23 Initial checkin.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15 260f80e4-7a28-3924-810f-c04153c831b5
2011-10-05 05:20:07 +00:00