ART: Fix host test failure (assembler_thumb_test).

Check if "bin/{as,objcopy,objdump}" exists in the tools dir we found in "prebuilts/gcc/linux-x86/arm/".
Now there's an empty tree in platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9,
causing assembler_thumb_test to fail.

Change-Id: If6ba4f778b79f95239aa85e54816ab168e7d8940
AddIntrinsicSlowPath with resume requires clobbering

AddIntrinsicSlowPath with resume results in a call.
So all temps must be clobbered at the point where
AddIntrinsicSlowPath returns.

Change-Id: If9eb887e295ff5e59920f4da1cef63258ad490b0
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Slow path should break def tracking

Slow path usually results in invocation of runtime. Runtime
should be ensured that all VR on stack are up to date.
To do this we reset def tracking system at the moment of
adding slow path and as a result actual writes to stack
for all VRs will not be optimized away.

The decision is conservative to be safe however
probably not all runtime calls can potentially require VRs
to be on stack. In this case we will need insert reset def
tracking in all places where dangerous slow path is used.

Change-Id: I2cb7698a12c17354060fdbb944e1da1fb922c23b
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
ART: Address three issues with x86 assembler before enabling load store elimination.

1) Remove the IS_LOAD attribute from LEA instructions.
2) Change the attribute of fp stack instructions from IS_UNARY_OP to IS_BINARY_OP as
   operands[1] will be used to compute GetInstructionOffset.
3) Add IS_MOVE attribute for general register move instructions.

Change-Id: I7054df47956f2acecf579ff7acfde385fd8ac194
Signed-off-by: Haitao Feng <haitao.feng@intel.com>
Fix sput-wide verification flag.

The vA register for sput-wide is a wide register.  Thus, the
verification flag should be kVerifyRegAWide instead of
kVerifyRegA.

Without this change, the invalid Dex bytecode won't be
rejected by VerifyInstruction().  As the result, the
DCHECK_LT() in register_line-inl.h will abort the program.

Change-Id: I24b746d8a85ddaf811d9aebed12a3dd9f97d755f
X86 QBE: Make some X86 routines virtual

Add virtual in one place, and move some code into a virtual routine.
This allows subclassing and overriding for my purposes.

Change-Id: Ie415df943b17b56ad1f057513b2df2a31801a72f
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
ART: Overflow of bound check in ArrayCopy intrinsic

System.arraycopy method is implemented as intrinsic on x86. It has
bound check which has a bug to overflow in certain conditions
when summ of array offset and number elements to be copied are
more than MAX_INT. For the methods like CarArrayBuffer.get it
means no OutOfBound exception to be thrown. The proposed
solution fixed that.

Change-Id: Id16a26163a61d934b862a8729a52ca5c1a56caec
Signed-off-by: avignate <aleksey.v.ignatenko@intel.com>
ART: Allow oatdump to verify oat file

Bring up a runtime for oatdump of an oat file if the boot image
option is given. This allows to use the verifier on any oat file.

Some refactoring.

Change-Id: Ifa895f22b648c7064fb0837fb36a0118422a3462
ART: Fix instruction flags of kMirOpCheck and kMirOpCheckPart2

Since they are just wrappers for correct modeling, it was believed
that these instructions do not need flags. However, the flags
are needed to correctly reflect their semantic behavior in a manner
consistent with all other instructions.

Also, missing flags for new extended instructions have also been added.

Change-Id: I2282eebf4b9c82b82e26722914645fcc0be49c82
Signed-off-by: Udayan Banerji <udayan.banerji@intel.com>
Signed-off-by: Razvan A Lupusoru <razvan.a.lupusoru@intel.com>
First optimization in new compiler: simple GVN.

Change-Id: Ibe0efa4e84fd020a53ded310a92e0b4363f91b12
Merge "First optimization in new compiler: simple GVN."
Merge "X86 QBE: Make some X86 routines virtual"
Merge "ART: Fix instruction flags of kMirOpCheck and kMirOpCheckPart2"
Merge "AddIntrinsicSlowPath with resume requires clobbering"
Merge "Slow path should break def tracking"
Merge "ART: Overflow of bound check in ArrayCopy intrinsic"
Merge "ART: Fix host test failure (assembler_thumb_test)."
Merge "ART: Allow oatdump to verify oat file"
Merge "ART: Address three issues with x86 assembler before enabling load store elimination."
Merge "Fix sput-wide verification flag."