OSDN Git Service

android-x86/art.git
10 years agoART: Correct disassembling of regs from opcodes
Vladimir Kostyukov [Tue, 1 Jul 2014 11:28:43 +0000 (18:28 +0700)]
ART: Correct disassembling of regs from opcodes

Registers, which are part of opcode might have 1-byte size
or 2-byte size depending on the instruction and 66h prefix.
This patch makes the decoding of such instruction correct.

Examples:
  - '664155' should be decoded as 'push r13w'
    (66h + REX.B)

  - '41B320' should be decoded as 'mov r11l, 0x20'
    (byte-operand + REX.B)

Change-Id: I83913e3a5f2ef03c4019c0f5eea6b11fc51ee4cc
Signed-off-by: Vladimir Kostyukov <vladimir.kostyukov@intel.com>
10 years agoMerge "Fix a compile assert name with inverted meaning."
Vladimir Marko [Wed, 9 Jul 2014 09:38:31 +0000 (09:38 +0000)]
Merge "Fix a compile assert name with inverted meaning."

10 years agoFix a compile assert name with inverted meaning.
Vladimir Marko [Tue, 8 Jul 2014 16:49:09 +0000 (17:49 +0100)]
Fix a compile assert name with inverted meaning.

Change-Id: I50cc9a8b88c19e1ce7bc5b34cc4b7d650b2f052d

10 years agoMerge "Workaround for invalid monitor-exit catch ranges."
Vladimir Marko [Wed, 9 Jul 2014 08:39:39 +0000 (08:39 +0000)]
Merge "Workaround for invalid monitor-exit catch ranges."

10 years agoWorkaround for invalid monitor-exit catch ranges.
Vladimir Marko [Tue, 8 Jul 2014 17:06:45 +0000 (18:06 +0100)]
Workaround for invalid monitor-exit catch ranges.

Avoid bogus exception edges from monitor-exit to a
catch handler that does exactly the same monitor-exit.

Bug: 15745363
Change-Id: I2b8b44b313c470557714744bdfb7beaef2cd2246

10 years agoMerge "Fix local reference leaks in debugger and use a cache."
Mathieu Chartier [Tue, 8 Jul 2014 16:51:57 +0000 (16:51 +0000)]
Merge "Fix local reference leaks in debugger and use a cache."

10 years agoFix local reference leaks in debugger and use a cache.
Mathieu Chartier [Fri, 27 Jun 2014 17:20:14 +0000 (10:20 -0700)]
Fix local reference leaks in debugger and use a cache.

Changed alloc record stack trace element to use jmethodID instead of
JNI weak global references. Added code to delete the local ref
created in AllocRecord::SetType.

Bug: 15886342
External bug: https://code.google.com/p/android/issues/detail?id=72330

Change-Id: Id18e765820baad02246768dc9d633aada60f4fed

10 years agoMerge "Add kIntrinsicIsStatic flag for System.arraycopy()."
Vladimir Marko [Tue, 8 Jul 2014 16:42:47 +0000 (16:42 +0000)]
Merge "Add kIntrinsicIsStatic flag for System.arraycopy()."

10 years agoAdd kIntrinsicIsStatic flag for System.arraycopy().
Vladimir Marko [Tue, 8 Jul 2014 16:34:04 +0000 (17:34 +0100)]
Add kIntrinsicIsStatic flag for System.arraycopy().

Change-Id: I40ffb07e62474f418eabb7361f129c633022666c

10 years agoMerge "Fix style issue."
Vladimir Marko [Tue, 8 Jul 2014 16:24:12 +0000 (16:24 +0000)]
Merge "Fix style issue."

10 years agoFix style issue.
Vladimir Marko [Tue, 8 Jul 2014 16:21:32 +0000 (17:21 +0100)]
Fix style issue.

Change-Id: Ifc73dd4331d91be8c6c5eed2159ec1733fa84995

10 years agoMerge "Check invoke type for intrinsic method invokes."
Vladimir Marko [Tue, 8 Jul 2014 16:06:12 +0000 (16:06 +0000)]
Merge "Check invoke type for intrinsic method invokes."

10 years agoCheck invoke type for intrinsic method invokes.
Vladimir Marko [Thu, 3 Jul 2014 16:28:33 +0000 (17:28 +0100)]
Check invoke type for intrinsic method invokes.

Bug: 16017877
Change-Id: I931c0b19b500a042bc9235aa18212c4ab5240745

10 years agoMerge "BaseMutex::IsExclusiveHeld should only be called on self."
Ian Rogers [Tue, 8 Jul 2014 06:04:43 +0000 (06:04 +0000)]
Merge "BaseMutex::IsExclusiveHeld should only be called on self."

10 years agoBaseMutex::IsExclusiveHeld should only be called on self.
Ian Rogers [Tue, 8 Jul 2014 04:38:36 +0000 (21:38 -0700)]
BaseMutex::IsExclusiveHeld should only be called on self.

Fix issue in Thread::DumpState of lock dumping calling IsExclusiveHeld on a
thread that isn't self causing intermittent crashes of ThreadStress oat test.

Bug: 15446488
Change-Id: I86924397a4e21ce10a95ea2a737d7bfbcb8ffe28

10 years agoMerge "JNI dlsym lookup fixes."
Ian Rogers [Tue, 8 Jul 2014 06:04:28 +0000 (06:04 +0000)]
Merge "JNI dlsym lookup fixes."

10 years agoJNI dlsym lookup fixes.
Ian Rogers [Tue, 8 Jul 2014 04:44:06 +0000 (21:44 -0700)]
JNI dlsym lookup fixes.

Thread* self is passed on all architectures apart from ARM and ARM64.
On x86 restore ebx correctly. Pass self in correct register on x86-64.
Ensure methods are compiled in jni_compiler_test even if the generic JNI
trampoline is present.

Change-Id: If5fdb1de97b78ac5a5cf8d0915c5b82311f23eb9

10 years agoMerge "Enable compiler testing for ARM64 and x86-64."
Ian Rogers [Tue, 8 Jul 2014 05:51:03 +0000 (05:51 +0000)]
Merge "Enable compiler testing for ARM64 and x86-64."

10 years agoEnable compiler testing for ARM64 and x86-64.
Ian Rogers [Tue, 8 Jul 2014 04:37:04 +0000 (21:37 -0700)]
Enable compiler testing for ARM64 and x86-64.

Change-Id: Ica1e43b3cf07de8d4ae2b69f7a8b35205fe32a83

10 years agoFix dex file dependencies for oat tests.
Ian Rogers [Mon, 7 Jul 2014 23:05:18 +0000 (16:05 -0700)]
Fix dex file dependencies for oat tests.

The initial prerequisit used as an argument to "cp" wasn't set causing dex2oat
to attempt to compile dex2oat. Make the setting of host and target dex
dependencies more explicit in build-art-test-dex and update the test rules
appropriately.

Change-Id: I4f591f817537043bcb0328c7623fe7e2f0830b60

10 years agoMerge "ART: Intrinsic implementation for java.lang.System.arraycopy."
Ian Rogers [Tue, 8 Jul 2014 05:29:19 +0000 (05:29 +0000)]
Merge "ART: Intrinsic implementation for java.lang.System.arraycopy."

10 years agoART: Intrinsic implementation for java.lang.System.arraycopy.
DaniilSokolov [Wed, 25 Jun 2014 00:34:00 +0000 (17:34 -0700)]
ART: Intrinsic implementation for java.lang.System.arraycopy.

Implements intrinsic for  java.lang.System.arraycopy(char[], int, char[], int, int) -
this method is internal to android class libraries and used in such classes as StringBuffer and
StringBuilder. It is not possible to call it from application code. The intrinsic for
this method is implemented as inline method (assembly code is generated manually).

The intrinsic is x86 32 bit only.

Change-Id: Id1b1e0a20d5f6d5f5ebfe1fdc2447b6d8a515432
Signed-off-by: Daniil Sokolov <daniil.y.sokolov@intel.com>
10 years agoMerge "Fix dex file dependencies for oat tests."
Ian Rogers [Tue, 8 Jul 2014 02:15:36 +0000 (02:15 +0000)]
Merge "Fix dex file dependencies for oat tests."

10 years agoMerge "Add patchoat tool to Art."
Brian Carlstrom [Mon, 7 Jul 2014 22:41:10 +0000 (22:41 +0000)]
Merge "Add patchoat tool to Art."

10 years agoAdd patchoat tool to Art.
Alex Light [Thu, 12 Jun 2014 18:26:29 +0000 (11:26 -0700)]
Add patchoat tool to Art.

Add a new executable called patchoat to art. This tool takes already
compiled images and oat files and changes their base address, acting as
a cheap form of relocation.

Add a --include-patch-information flag to dex2oat and code to add
required patch information to oat files created with the quick compiler.

Bug: 15358152

Change-Id: Ie0c580db45bb14ec180deb84930def6c3628d97d

10 years agoMerge "ART: Add HADDPS/HADDPD/SHUFPS/SHUFPD instruction generation"
Ian Rogers [Mon, 7 Jul 2014 18:18:03 +0000 (18:18 +0000)]
Merge "ART: Add HADDPS/HADDPD/SHUFPS/SHUFPD instruction generation"

10 years agoMerge "Only allow whitelisted exceptions during dex2oat resolving."
Mathieu Chartier [Mon, 7 Jul 2014 16:47:12 +0000 (16:47 +0000)]
Merge "Only allow whitelisted exceptions during dex2oat resolving."

10 years agoOnly allow whitelisted exceptions during dex2oat resolving.
Mathieu Chartier [Sat, 28 Jun 2014 00:19:04 +0000 (17:19 -0700)]
Only allow whitelisted exceptions during dex2oat resolving.

Previously we would clear any exceptions even though we only want
to clear NoClassDefFound and IncompatibleClassChangeError exceptions.
This meant that out of memory exceptions would incorrectly get
cleared resulting in excessively long dex2oat times when you ran out
of memory.

Bug: 15936401
Change-Id: Iba3911f2c689b8c8d7d41e8c36546f027c08e9d7

10 years agoMerge "Revert "ART: Key-Value Store in Oat header""
Nicolas Geoffray [Wed, 9 Jul 2014 07:58:38 +0000 (07:58 +0000)]
Merge "Revert "ART: Key-Value Store in Oat header""

10 years agoRevert "ART: Key-Value Store in Oat header"
Nicolas Geoffray [Wed, 9 Jul 2014 07:58:10 +0000 (07:58 +0000)]
Revert "ART: Key-Value Store in Oat header"

Broke arm64 build.

This reverts commit c87d27b25994da8670d82a8f7bad6327b693bfff.

Change-Id: I4c2ade295d2b5aa77fc3ad810e0e859629a5bf09

10 years agoMerge "Adds PGO_GEN and PGO_USE for libart and libart-compiler."
Ian Rogers [Wed, 9 Jul 2014 07:46:42 +0000 (07:46 +0000)]
Merge "Adds PGO_GEN and PGO_USE for libart and libart-compiler."

10 years agoMerge "X86 Backend support for vectorized float and byte 16x16 operations"
Ian Rogers [Wed, 9 Jul 2014 07:44:21 +0000 (07:44 +0000)]
Merge "X86 Backend support for vectorized float and byte 16x16 operations"

10 years agoX86 Backend support for vectorized float and byte 16x16 operations
Udayan Banerji [Wed, 9 Jul 2014 02:59:43 +0000 (19:59 -0700)]
X86 Backend support for vectorized float and byte 16x16 operations

Add support for reserving vector registers for the duration of vector loop.
Add support for 16x16 multiplication, shifts, and add reduce.

Changed the vectorization implementation to be able to use the dataflow
elements for SSA recreation and fixed a few implementation details.

Change-Id: I2f358f05f574fc4ab299d9497517b9906f234b98
Signed-off-by: Jean Christophe Beyler <jean.christophe.beyler@intel.com>
Signed-off-by: Olivier Come <olivier.come@intel.com>
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
10 years agoMerge "x86_64: Clean-up after cmp-long fix"
Ian Rogers [Wed, 9 Jul 2014 07:22:15 +0000 (07:22 +0000)]
Merge "x86_64: Clean-up after cmp-long fix"

10 years agox86_64: Clean-up after cmp-long fix
Serguei Katkov [Tue, 24 Jun 2014 06:23:17 +0000 (13:23 +0700)]
x86_64: Clean-up after cmp-long fix

The patch adresses the coments from review done by Ian Rogers.
Clean-up of assembler.

Change-Id: I9dbb350dfc6645f8a63d624b2b785233529459a9
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
10 years agoMerge "Clean-up call_x86.cc"
Ian Rogers [Wed, 9 Jul 2014 07:15:44 +0000 (07:15 +0000)]
Merge "Clean-up call_x86.cc"

10 years agoClean-up call_x86.cc
Serguei Katkov [Fri, 4 Jul 2014 20:09:32 +0000 (03:09 +0700)]
Clean-up call_x86.cc

Also adds some DCHECKs and fixes for the bugs found by them.

Change-Id: I455bbfe2c6018590cf491880cd9273edbe39c4c7
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
10 years agoMerge "ART: Fix FP promotion"
Andreas Gampe [Wed, 9 Jul 2014 05:29:07 +0000 (05:29 +0000)]
Merge "ART: Fix FP promotion"

10 years agoART: Fix FP promotion
Andreas Gampe [Wed, 9 Jul 2014 04:10:55 +0000 (21:10 -0700)]
ART: Fix FP promotion

A previous CL changed != by mistake to ==, causing incorrect
promotion results for ARM32.

Change-Id: I62572e3e86d38a55be7043196027563735010b30

10 years agoMerge "Make dex2oat heap size product configurable [art]"
Brian Carlstrom [Wed, 9 Jul 2014 04:07:52 +0000 (04:07 +0000)]
Merge "Make dex2oat heap size product configurable [art]"

10 years agoMerge "ART: Key-Value Store in Oat header"
Andreas Gampe [Tue, 8 Jul 2014 19:16:24 +0000 (19:16 +0000)]
Merge "ART: Key-Value Store in Oat header"

10 years agoART: Key-Value Store in Oat header
Andreas Gampe [Thu, 26 Jun 2014 23:11:07 +0000 (16:11 -0700)]
ART: Key-Value Store in Oat header

Allows the storage of string-string pairs in the oat header. The
first significant use of this is storing the implicit-check flags,
so that an oat file can be rejected if it doesn't agree with the
current runtime.

Bump the oat version as the header structure changes.

Change-Id: I15a1c16886e6b8fa7b881c918c19c1efa5c7c00f

10 years agoMake dex2oat heap size product configurable [art]
Brian Carlstrom [Tue, 8 Jul 2014 17:34:02 +0000 (10:34 -0700)]
Make dex2oat heap size product configurable [art]

Bug: 15919420
Change-Id: I1b4f3256f6352b2d3e268991406def9e8efab945

10 years agoAdds PGO_GEN and PGO_USE for libart and libart-compiler.
Dehao Chen [Tue, 8 Jul 2014 17:00:56 +0000 (10:00 -0700)]
Adds PGO_GEN and PGO_USE for libart and libart-compiler.

PGO_GEN=device_path is used to build an instrumented binary. The profile will be stored in the specified path in device.
PGO_USE=host_path is used to build an PGO-optimized binary. The profile should be pre-stored in the specified path in host.

Bug: 16153819
Change-Id: Ib56f8707df009f290608ca66f669db06e65815c1

10 years agoMerge "Whitelist another exception during dex2oat resolving."
Brian Carlstrom [Wed, 9 Jul 2014 05:14:21 +0000 (05:14 +0000)]
Merge "Whitelist another exception during dex2oat resolving."

10 years agoWhitelist another exception during dex2oat resolving.
Brian Carlstrom [Wed, 9 Jul 2014 05:01:08 +0000 (22:01 -0700)]
Whitelist another exception during dex2oat resolving.

Bug: 15936401
Bug: 16162780
Change-Id: I7389edc8cdacd5e3c2cc7d86bbd56e8c503c34b0

10 years agoMerge "ART: Do not emit load when inlining unused Thread.currentThread()"
Andreas Gampe [Wed, 9 Jul 2014 01:46:39 +0000 (01:46 +0000)]
Merge "ART: Do not emit load when inlining unused Thread.currentThread()"

10 years agoMerge "Only allow instance-of to improve knowledge of a type for downcasts."
Ian Rogers [Wed, 9 Jul 2014 00:37:32 +0000 (00:37 +0000)]
Merge "Only allow instance-of to improve knowledge of a type for downcasts."

10 years agoOnly allow instance-of to improve knowledge of a type for downcasts.
Ian Rogers [Tue, 8 Jul 2014 06:53:08 +0000 (23:53 -0700)]
Only allow instance-of to improve knowledge of a type for downcasts.

Previous "not upcast" test could improve a type to an impossible type that
following a merge back with the original register would lead to conflict
(and subsequent verifier errors).
Modify UpdateRegisters so that the work line will be updated if merging
causes changes in the fall-through case.

Bug: 15808277
Issue: https://code.google.com/p/android/issues/detail?id=72093
Change-Id: Ib16cae8506246177e902825af036d5a397ad0dac

10 years agoART: Do not emit load when inlining unused Thread.currentThread()
Andreas Gampe [Tue, 8 Jul 2014 18:03:59 +0000 (11:03 -0700)]
ART: Do not emit load when inlining unused Thread.currentThread()

When the result is not used, do not emit the load. This avoids
uninitialized registers leading to size-check errors.

Change-Id: I212392ffea7243720f120b2f12679df286106a02

10 years agoMerge "ART: Update Monitor::Wait so it releases monitor_lock_ before throwing an...
Andreas Gampe [Tue, 8 Jul 2014 19:18:27 +0000 (19:18 +0000)]
Merge "ART: Update Monitor::Wait so it releases monitor_lock_ before throwing an exception"

10 years agoART: Update Monitor::Wait so it releases monitor_lock_ before throwing an exception
Elena Sayapina [Fri, 20 Jun 2014 09:58:37 +0000 (16:58 +0700)]
ART: Update Monitor::Wait so it releases monitor_lock_ before throwing an exception

Thread should release monitor_lock_ Mutex (which guards shared structures behind Java monitor)
in Monitor::Wait before throwing any exception. Otherwise the thread may be suspended by GC
during that time still holding the lock. This may cause deadlock during GC in case
some other thread needs to acquire the monitor_lock_. The other thread can't be suspended
by GC then waiting for exclusive lock and "thread suspend timeout" occurs.

Change-Id: Id02f45052e1cfc01e676a43434125817564d7874
Signed-off-by: Elena Sayapina <elena.v.sayapina@intel.com>
10 years agoMerge "Remove Dbg::VisitRoots()."
Hiroshi Yamauchi [Tue, 8 Jul 2014 19:10:46 +0000 (19:10 +0000)]
Merge "Remove Dbg::VisitRoots()."

10 years agoRemove Dbg::VisitRoots().
Hiroshi Yamauchi [Mon, 7 Jul 2014 20:07:08 +0000 (13:07 -0700)]
Remove Dbg::VisitRoots().

We replace the GC strong roots with JNI.

jdwp_test passes.

Bug: 12687968
Change-Id: I841f1aaa5dffa784ca25953a251600f70df273b2

10 years agoMerge "Aarch64: fix bug and enable register promotion."
Andreas Gampe [Mon, 7 Jul 2014 15:51:50 +0000 (15:51 +0000)]
Merge "Aarch64: fix bug and enable register promotion."

10 years agoAarch64: fix bug and enable register promotion.
Matteo Franchin [Mon, 7 Jul 2014 12:35:14 +0000 (13:35 +0100)]
Aarch64: fix bug and enable register promotion.

Iteration over arguments in invoke implementation was not correct
for wide arguments.

Change-Id: I46c7edcbfc9e32ded0e9a535fab3d333905bcf41

10 years agoMerge "Fix some style nitpicks"
Brian Carlstrom [Tue, 8 Jul 2014 17:17:32 +0000 (17:17 +0000)]
Merge "Fix some style nitpicks"

10 years agoFix some style nitpicks
Alex Light [Tue, 8 Jul 2014 16:53:18 +0000 (09:53 -0700)]
Fix some style nitpicks

Change-Id: Icfdd327f4ddf129f0a8607162c09ba271c1d49d9

10 years agoMerge "Add make rule to debug interpreter-only mode"
Sebastien Hertz [Fri, 4 Jul 2014 09:07:47 +0000 (09:07 +0000)]
Merge "Add make rule to debug interpreter-only mode"

10 years agoAdd make rule to debug interpreter-only mode
Sebastien Hertz [Fri, 4 Jul 2014 08:53:22 +0000 (10:53 +0200)]
Add make rule to debug interpreter-only mode

Adds "use-artd-interpret-only" make rule to run interpreter-only mode with
libartd.so.

Change-Id: Ib9fbcdbdcc79a89900ee751b5dc2ad554f834127

10 years agoMerge "Do not attempt to compile on architectures we do not support."
Nicolas Geoffray [Fri, 4 Jul 2014 09:00:17 +0000 (09:00 +0000)]
Merge "Do not attempt to compile on architectures we do not support."

10 years agoDo not attempt to compile on architectures we do not support.
Nicolas Geoffray [Fri, 4 Jul 2014 08:43:26 +0000 (09:43 +0100)]
Do not attempt to compile on architectures we do not support.

Change-Id: I431edff0a753a7fa37c79bdf7ab918d6747667a4

10 years agoMerge "More checks in JNI RegisterNatives"
Sebastien Hertz [Fri, 4 Jul 2014 08:11:20 +0000 (08:11 +0000)]
Merge "More checks in JNI RegisterNatives"

10 years agoMore checks in JNI RegisterNatives
Sebastien Hertz [Thu, 3 Jul 2014 07:39:53 +0000 (09:39 +0200)]
More checks in JNI RegisterNatives

Throws NoSuchMethodError (and returns JNI_ERR) when given method name, method
signature or native function is null.

Bug: https://code.google.com/p/android/issues/detail?id=72293
Bug: 15886341
Change-Id: I1c0582d54031eaa58a6025a2417d65090a2a622a

10 years agoMerge "x86_64: Turn on promotion optimization"
Andreas Gampe [Fri, 4 Jul 2014 05:36:52 +0000 (05:36 +0000)]
Merge "x86_64: Turn on promotion optimization"

10 years agox86_64: Turn on promotion optimization
Dmitry Petrochenko [Sat, 28 Jun 2014 03:59:19 +0000 (10:59 +0700)]
x86_64: Turn on promotion optimization

This CL turns on the promotion optimization (longs).
The 64-bit references support is disabled in x86_64 backend.

Change-Id: I62723388f549b51bae41c8a6b334228b2d782610
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
10 years agoMerge "Fix missing dependency in new X86 instruction"
Andreas Gampe [Sun, 6 Jul 2014 17:57:54 +0000 (17:57 +0000)]
Merge "Fix missing dependency in new X86 instruction"

10 years agoFix missing dependency in new X86 instruction
Mark Mendell [Sun, 6 Jul 2014 16:24:40 +0000 (12:24 -0400)]
Fix missing dependency in new X86 instruction

AX is written by this opcode.   Note the dependency.

Change-Id: I25209e1fb4ceb0387269436c8b00730b1caa03bc
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
10 years agoMerge "x86_64: TargetReg update for x86"
Andreas Gampe [Thu, 3 Jul 2014 21:46:10 +0000 (21:46 +0000)]
Merge "x86_64: TargetReg update for x86"

10 years agox86_64: TargetReg update for x86
Chao-ying Fu [Wed, 2 Jul 2014 00:43:41 +0000 (17:43 -0700)]
x86_64: TargetReg update for x86

Also includes changes in common code. Elimination of use of TargetReg
with one parameter and direct access to special target registers.

Change-Id: Ied2c1f87d4d1e4345248afe74bca40487a46a371
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Chao-ying Fu <chao-ying.fu@intel.com>
10 years agoMerge "Load 64 bit constant into GPR by single instruction for 64bit mode"
Andreas Gampe [Thu, 3 Jul 2014 20:48:11 +0000 (20:48 +0000)]
Merge "Load 64 bit constant into GPR by single instruction for 64bit mode"

10 years agoMerge "Register promotion support for 64-bit targets"
Andreas Gampe [Thu, 3 Jul 2014 20:10:57 +0000 (20:10 +0000)]
Merge "Register promotion support for 64-bit targets"

10 years agoRegister promotion support for 64-bit targets
buzbee [Sat, 21 Jun 2014 22:31:01 +0000 (15:31 -0700)]
Register promotion support for 64-bit targets

Not sufficiently tested for 64-bit targets, but should be
fairly close.

A significant amount of refactoring could stil be done, (in
later CLs).

With this change we are not making any changes to the vmap
scheme.  As a result, it is a requirement that if a vreg
is promoted to both a 32-bit view and the low half of a
64-bit view it must share the same physical register.  We
may change this restriction later on to allow for more flexibility
for 32-bit Arm.

For example, if v4, v5, v4/v5 and v5/v6 are all hot enough to
promote, we'd end up with something like:

v4 (as an int)    -> r10
v4/v5 (as a long) -> r10
v5 (as an int)    -> r11
v5/v6 (as a long) -> r11

Fix a couple of ARM64 bugs on the way...

Change-Id: I6a152b9c164d9f1a053622266e165428045362f3

10 years agoMerge "Fix build-art-target and build-art-host rules."
Nicolas Geoffray [Thu, 3 Jul 2014 08:01:16 +0000 (08:01 +0000)]
Merge "Fix build-art-target and build-art-host rules."

10 years agoMerge "Aarch64: fix references handling in Load*Indexed."
Andreas Gampe [Mon, 7 Jul 2014 15:39:09 +0000 (15:39 +0000)]
Merge "Aarch64: fix references handling in Load*Indexed."

10 years agoAarch64: fix references handling in Load*Indexed.
Matteo Franchin [Fri, 4 Jul 2014 12:50:41 +0000 (13:50 +0100)]
Aarch64: fix references handling in Load*Indexed.

Fix the way we handle references in Load/StoreBaseIndexed and friends.
We assume references are 64-bit RegStorage entities, with the
difference that they are load as 32-bit values.

Change-Id: I7fe987ef9e97e9a5042b85378b33d1e85710d8b5

10 years agoMerge "x86_64: Fix intrinsics"
Andreas Gampe [Fri, 4 Jul 2014 01:38:56 +0000 (01:38 +0000)]
Merge "x86_64: Fix intrinsics"

10 years agox86_64: Fix intrinsics
nikolay serdjuk [Tue, 10 Jun 2014 10:07:10 +0000 (17:07 +0700)]
x86_64: Fix intrinsics

The following intrinsics have been ported:

- Abs(double/long/int/float)
- String.indexOf/charAt/compareTo/is_empty/length
- Float.floatToRawIntBits, Float.intBitsToFloat
- Double.doubleToRawLongBits, Double.longBitsToDouble
- Thread.currentThread
- Unsafe.getInt/Long/Object, Unsafe.putInt/Long/Object
- Math.sqrt, Math.max, Math.min
- Long.reverseBytes

Math.min and max for longs have been implemented for x86_64.

Commented out until good tests available:
- Memory.peekShort/Int/Long, Memory.pokeShort/Int/Long

Turned off on x86-64 as reported having problems
- Cas

Change-Id: I934bc9c90fdf953be0d3836a17b6ee4e7c98f244

10 years agoMerge "AArch64: Add few more inline functions"
Andreas Gampe [Fri, 4 Jul 2014 00:42:46 +0000 (00:42 +0000)]
Merge "AArch64: Add few more inline functions"

10 years agoAArch64: Add few more inline functions
Serban Constantinescu [Wed, 2 Jul 2014 15:13:38 +0000 (16:13 +0100)]
AArch64: Add few more inline functions

This patch adds inlining support for the following functions:
* Math.max/min(long, long)
* Math.max/min(float, float)
* Math.max/min(double, double)
* Integer.reverse(int)
* Long.reverse(long)

Change-Id: Ia2b1619fd052358b3a0d23e5fcbfdb823d2029b9
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
10 years agoMerge "x86_64: Fix InstanceofFinal"
Andreas Gampe [Sun, 6 Jul 2014 17:35:52 +0000 (17:35 +0000)]
Merge "x86_64: Fix InstanceofFinal"

10 years agox86_64: Fix InstanceofFinal
Dmitry Petrochenko [Mon, 30 Jun 2014 18:21:38 +0000 (01:21 +0700)]
x86_64: Fix InstanceofFinal

Comparison should be made using GetReg()

Change-Id: Ic5bebf680395d9b93710511db9760d0e867b38cb
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
10 years agoMerge "AArch64: Enable Inlining."
Andreas Gampe [Fri, 4 Jul 2014 23:19:40 +0000 (23:19 +0000)]
Merge "AArch64: Enable Inlining."

10 years agoAArch64: Enable Inlining.
Serban Constantinescu [Mon, 30 Jun 2014 16:10:28 +0000 (17:10 +0100)]
AArch64: Enable Inlining.

This patch fixes the remaining issues with inlining for ARM64.

Change-Id: I2d85b7c4f3fb2b667bf6029fbc271ab954378889
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Signed-off-by: Matteo Franchin <matteo.franchin@arm.com>
10 years agoMerge "Aarch64: fix encoding map for kA64Fmov2xS."
Andreas Gampe [Fri, 4 Jul 2014 18:24:39 +0000 (18:24 +0000)]
Merge "Aarch64: fix encoding map for kA64Fmov2xS."

10 years agoAarch64: fix encoding map for kA64Fmov2xS.
Matteo Franchin [Fri, 4 Jul 2014 16:57:21 +0000 (17:57 +0100)]
Aarch64: fix encoding map for kA64Fmov2xS.

Change-Id: I5127a4443969dc2322461a4b4a34d6c39a0ffd64

10 years agoMerge "ART: FF-opcodes are target-specific"
Andreas Gampe [Thu, 3 Jul 2014 23:24:49 +0000 (23:24 +0000)]
Merge "ART: FF-opcodes are target-specific"

10 years agoART: FF-opcodes are target-specific
Vladimir Kostyukov [Mon, 30 Jun 2014 08:44:12 +0000 (15:44 +0700)]
ART: FF-opcodes are target-specific

Some of the FF-opcodes' (i.e., push, call, jmp) register names
depend on the the target (32-bit vs 64-bit). This patch makes
such opcodes target-specific.

Change-Id: I4fa0b7ee5310e14f4022850ac2160c21be5d1c99
Signed-off-by: Vladimir Kostyukov <vladimir.kostyukov@intel.com>
10 years agoFix build-art-target and build-art-host rules.
Nicolas Geoffray [Wed, 2 Jul 2014 16:54:33 +0000 (17:54 +0100)]
Fix build-art-target and build-art-host rules.

They did not build the right libjavacore.so for 64bits builds.

Change-Id: I8475f73588ffd17933aac4591d19f8803741ef8a

10 years agoLoad 64 bit constant into GPR by single instruction for 64bit mode
Yixin Shou [Tue, 1 Jul 2014 17:48:17 +0000 (13:48 -0400)]
Load 64 bit constant into GPR by single instruction for 64bit mode

This patch load 64 bit constant into a register by a single movabsq
instruction on 64 bit bit instead of previous mov, shift, add
instruction sequences.

Change-Id: I9d013c4f6c0b5c2e43bd125f91436263c7e6028c
Signed-off-by: Yixin Shou <yixin.shou@intel.com>
10 years agoMerge "Fix art script for 'clean' environments."
Nicolas Geoffray [Wed, 2 Jul 2014 15:28:16 +0000 (15:28 +0000)]
Merge "Fix art script for 'clean' environments."

10 years agoFix art script for 'clean' environments.
Nicolas Geoffray [Wed, 2 Jul 2014 15:25:12 +0000 (16:25 +0100)]
Fix art script for 'clean' environments.

We need to define ANDROID_HOST_OUT in the script before using it.

Change-Id: I6b415d8de5fb6001bc579b013683957abb33f394

10 years agoMerge "ART: JNI ExceptionDescribe crashes if no exception occurred"
Andreas Gampe [Wed, 2 Jul 2014 15:27:18 +0000 (15:27 +0000)]
Merge "ART: JNI ExceptionDescribe crashes if no exception occurred"

10 years agoART: JNI ExceptionDescribe crashes if no exception occurred
Alexei Zavjalov [Wed, 25 Jun 2014 09:04:55 +0000 (16:04 +0700)]
ART: JNI ExceptionDescribe crashes if no exception occurred

Some tests are calling ExceptionDescribe without checking if
we have an exception occurred. The most JVM's like Dalvik can
handle this in a good way, but art crashes with JNI error.

This adds a check in art::ExceptionDescribe for a case when it
called without exception.

Change-Id: Id9eddcc73e78b1197109be5a6340f9ff60940c74
Signed-off-by: Alexei Zavjalov <alexei.zavjalov@intel.com>
10 years agoMerge "Support longs in the register allocator for x86_64."
Nicolas Geoffray [Wed, 2 Jul 2014 15:01:40 +0000 (15:01 +0000)]
Merge "Support longs in the register allocator for x86_64."

10 years agoSupport longs in the register allocator for x86_64.
Nicolas Geoffray [Thu, 19 Jun 2014 09:00:34 +0000 (10:00 +0100)]
Support longs in the register allocator for x86_64.

Change-Id: I7fb6dfb761bc5cf9e5705682032855a0a70ca867

10 years agoMerge "Fix art-host rule and art script after build changes."
Nicolas Geoffray [Wed, 2 Jul 2014 14:05:06 +0000 (14:05 +0000)]
Merge "Fix art-host rule and art script after build changes."

10 years agoFix art-host rule and art script after build changes.
Nicolas Geoffray [Wed, 2 Jul 2014 13:57:53 +0000 (14:57 +0100)]
Fix art-host rule and art script after build changes.

Change-Id: Ideb6a83d71cda126d94ad01965b2dcf5005d449a

10 years agoMerge "Relax limits for profiler based compilation options."
Calin Juravle [Wed, 2 Jul 2014 13:15:17 +0000 (13:15 +0000)]
Merge "Relax limits for profiler based compilation options."

10 years agoRelax limits for profiler based compilation options.
Calin Juravle [Wed, 2 Jul 2014 13:00:33 +0000 (14:00 +0100)]
Relax limits for profiler based compilation options.

Change-Id: I57a7b11588f5c5b5f12217239ecf58f59ae02e2b