OSDN Git Service

android-x86/art.git
9 years agoMerge "Avoid abort in malformed dex code."
Ian Rogers [Sat, 15 Nov 2014 00:19:56 +0000 (00:19 +0000)]
Merge "Avoid abort in malformed dex code."

9 years agoMerge "AArch64: Small improvements."
Bill Buzbee [Fri, 14 Nov 2014 23:51:16 +0000 (23:51 +0000)]
Merge "AArch64: Small improvements."

9 years agoAvoid abort in malformed dex code.
Ian Rogers [Wed, 5 Nov 2014 19:07:30 +0000 (11:07 -0800)]
Avoid abort in malformed dex code.

Don't allow a perceived double monitor-enter on a register
to abort libartd.
Allow expected verifier errors in the smali tests.
Tidy includes in the method verifier.
Bug: 17978759

Change-Id: Ic44924c788cd2334f91a047fb41b459b89a1843b

9 years agoMerge "Fix LinkFieldsComparator."
Vladimir Marko [Fri, 14 Nov 2014 19:02:32 +0000 (19:02 +0000)]
Merge "Fix LinkFieldsComparator."

9 years agoFix LinkFieldsComparator.
Vladimir Marko [Wed, 12 Nov 2014 17:02:02 +0000 (17:02 +0000)]
Fix LinkFieldsComparator.

Define order for primitive types with the same sizes.
Previously, the comparator would consider the fields equal
so the order would depend on std::sort() implementation.
Changing the STL implementation could silently change the
field offsets. (And, unlike std::stable_sort(), the
std::sort() doesn't even need to be deterministic.)

Change-Id: I91fa562f82447606aced64643bea8c70784766b5

9 years agoAArch64: Small improvements.
Matteo Franchin [Wed, 12 Nov 2014 18:06:14 +0000 (18:06 +0000)]
AArch64: Small improvements.

Remove useless branches (branch to the next instruction).
Change the implicit stack overflow check to do a 32-bit rather than a
64-bit load. Also put the result in wzr, as we do not need it.

Change-Id: I2d29fc62cb757ac5443fdd09282871f734deeef9

9 years agoMerge "Add support for int-to-char in the optimizing compiler."
Roland Levillain [Fri, 14 Nov 2014 15:21:32 +0000 (15:21 +0000)]
Merge "Add support for int-to-char in the optimizing compiler."

9 years agoMerge "Keep original order of fields in Class."
Vladimir Marko [Fri, 14 Nov 2014 14:36:43 +0000 (14:36 +0000)]
Merge "Keep original order of fields in Class."

9 years agoAdd support for int-to-char in the optimizing compiler.
Roland Levillain [Fri, 14 Nov 2014 11:47:14 +0000 (11:47 +0000)]
Add support for int-to-char in the optimizing compiler.

- Add support for the int-to-char Dex instruction in the
  optimizing compiler.
- Implement the ARM and Thumb-2 UBFX instructions and add
  tests for them.
- Generate x86, x86-64 and ARM (but not ARM64) code for
  byte to char, short to char, int to char (and char to
  char!) HTypeConversion nodes.
- Add related tests to test/422-type-conversion.

Change-Id: I5cd4c6d86f0f6a966c059715b98db35cc8f9de76

9 years agoKeep original order of fields in Class.
Vladimir Marko [Mon, 10 Nov 2014 18:32:59 +0000 (18:32 +0000)]
Keep original order of fields in Class.

The fields of a class are ordered alphabetically in the dex
file. Keep the same order in the field arrays so that we can
do binary search lookups by name. Those lookups will be
implemented in a subsequent change in libcore/.

Bug: 18211592

(cherry picked from commit bfa3ed0ad988e1da13626ddbaf6dcae0c58ea79e)

Change-Id: I8f979de62ffe37d1c7d5c721717d2f3501e7c9e6

9 years agoMerge "Quick: Fix arm64 AGET/APUT to use 32-bit index."
Vladimir Marko [Fri, 14 Nov 2014 10:51:40 +0000 (10:51 +0000)]
Merge "Quick: Fix arm64 AGET/APUT to use 32-bit index."

9 years agoMerge "ART: Fix last lpae occurrence, Arm64 generic"
Andreas Gampe [Fri, 14 Nov 2014 03:31:25 +0000 (03:31 +0000)]
Merge "ART: Fix last lpae occurrence, Arm64 generic"

9 years agoART: Fix last lpae occurrence, Arm64 generic
Andreas Gampe [Fri, 14 Nov 2014 03:10:33 +0000 (19:10 -0800)]
ART: Fix last lpae occurrence, Arm64 generic

Fix the last occurrence of an lpae string in the default
instruction-set-feature strings (should be removed).

Allow "generic" Arm64 variant (same as "default").

Change-Id: I8bdd9fc7f596245e6541469664db01b3e781c51c

9 years agoMerge "ART: Multiview assembler_test, fix x86-64 assembler"
Andreas Gampe [Fri, 14 Nov 2014 00:47:35 +0000 (00:47 +0000)]
Merge "ART: Multiview assembler_test, fix x86-64 assembler"

9 years agoART: Multiview assembler_test, fix x86-64 assembler
Andreas Gampe [Wed, 12 Nov 2014 22:05:46 +0000 (14:05 -0800)]
ART: Multiview assembler_test, fix x86-64 assembler

Expose "secondary" names for registers so it is possible to test
32b views for 64b architectures.

Add floating-point register testing.

Refactor assembler_test for better code reuse (and simpler adding
of combination drivers).

Fix movss, movsd (MR instead of RM encoding), xchgl, xchgq,
both versions of EmitGenericShift.

Tighten imull(Reg,Imm), imulq(Reg,Imm), xchgl and xchgq encoding.

Clarify cv*** variants with a comment.

Add tests for movl, addl, imull, imuli, mull, subl, cmpqi, cmpl,
xorq (regs), xorl, movss, movsd, addss, addsd, subss, subsd, mulss,
mulsd, divss, divsd, cvtsi2ss, cvtsi2sd, cvtss2si, cvtss2sd, cvtsd2si,
cvttss2si, cvttsd2si, cvtsd2ss, cvtdq2pd, comiss, comisd, sqrtss,
sqrtsd, xorps, xorpd, fincstp, fsin, fcos, fptan, xchgl (disabled,
see code comment), xchgq, testl, andl, andq, orl, orq, shll, shrl,
sarl, negq, negl, notq, notl, enter and leave, call, ret, and jmp,
and make some older ones more exhaustive.

Follow-up TODOs:
1) Support memory (Address).
2) Support tertiary and quaternary register views.

Bug: 18117217
Change-Id: I1d583a3bec552e3cc7c315925e1e006f393ab687

9 years agoMerge "Instruction set features for ARM64, MIPS and X86."
Ian Rogers [Fri, 14 Nov 2014 00:21:21 +0000 (00:21 +0000)]
Merge "Instruction set features for ARM64, MIPS and X86."

9 years agoInstruction set features for ARM64, MIPS and X86.
Ian Rogers [Thu, 6 Nov 2014 07:46:43 +0000 (23:46 -0800)]
Instruction set features for ARM64, MIPS and X86.

Also, refactor how feature strings are handled so they are additive or
subtractive.
Make MIPS have features for FPU 32-bit and MIPS v2. Use in the quick compiler
rather than #ifdefs that wouldn't have worked in cross-compilation.
Add SIMD features for x86/x86-64 proposed in:
  https://android-review.googlesource.com/#/c/112370/

Bug: 18056890

Change-Id: Ic88ff84a714926bd277beb74a430c5c7d5ed7666

9 years agoMerge "ART: Implicit null check should break def tracking"
Bill Buzbee [Thu, 13 Nov 2014 23:41:14 +0000 (23:41 +0000)]
Merge "ART: Implicit null check should break def tracking"

9 years agoMerge "ART: Compiled-classes list for compiler-driver"
Andreas Gampe [Thu, 13 Nov 2014 21:26:09 +0000 (21:26 +0000)]
Merge "ART: Compiled-classes list for compiler-driver"

9 years agoART: Compiled-classes list for compiler-driver
Andreas Gampe [Tue, 11 Nov 2014 21:28:29 +0000 (13:28 -0800)]
ART: Compiled-classes list for compiler-driver

Similar to the image-classes list, introduce a list of class names
that are to be compiled when creating a boot image. This defaults
to all classes.

Bug: 18336591

(cherry picked from commit 26318f722958ac1cba6a812026a1377f37c54941)

Change-Id: I95f69afdb500a9defb6795803d4040bbe67c5a01

9 years agoMerge "kill HAVE_GETHOSTBYNAME_R"
Yabin Cui [Thu, 13 Nov 2014 19:09:36 +0000 (19:09 +0000)]
Merge "kill HAVE_GETHOSTBYNAME_R"

9 years agoMerge "Disable DumpNativeStack."
Ian Rogers [Thu, 13 Nov 2014 18:56:03 +0000 (18:56 +0000)]
Merge "Disable DumpNativeStack."

9 years agoMerge "Exercise the generation of SBFX on ARM32 & Thumb-2."
Roland Levillain [Thu, 13 Nov 2014 18:44:47 +0000 (18:44 +0000)]
Merge "Exercise the generation of SBFX on ARM32 & Thumb-2."

9 years agoMerge "Add support for int-to-byte in the optimizing compiler."
Roland Levillain [Thu, 13 Nov 2014 18:44:19 +0000 (18:44 +0000)]
Merge "Add support for int-to-byte in the optimizing compiler."

9 years agoDisable DumpNativeStack.
Ian Rogers [Thu, 13 Nov 2014 18:34:29 +0000 (10:34 -0800)]
Disable DumpNativeStack.

Causes crashes on 004-ThreadStress, already was a no-op on the target.
Bug: 15446488

Change-Id: I9a1541b894087337dafa3fdde00d845f3542b141

9 years agokill HAVE_GETHOSTBYNAME_R
Yabin Cui [Thu, 13 Nov 2014 18:29:25 +0000 (10:29 -0800)]
kill HAVE_GETHOSTBYNAME_R

Bug: 18363225
Change-Id: I71a62235db14412d2471f20ea663beb7df7326cd

9 years agoMerge "Revert "Unfortunately, the test still hits too many run failures.""
Ian Rogers [Thu, 13 Nov 2014 18:25:02 +0000 (18:25 +0000)]
Merge "Revert "Unfortunately, the test still hits too many run failures.""

9 years agoRevert "Unfortunately, the test still hits too many run failures."
Ian Rogers [Thu, 13 Nov 2014 18:24:52 +0000 (18:24 +0000)]
Revert "Unfortunately, the test still hits too many run failures."

This reverts commit 05b6570eb63d1236d38b1bb8b4ebeb8d36a76c31.

Change-Id: I8e0143e59e4e2f66930f04ecf295ed01418a7135

9 years agoExercise the generation of SBFX on ARM32 & Thumb-2.
Roland Levillain [Thu, 13 Nov 2014 18:03:06 +0000 (18:03 +0000)]
Exercise the generation of SBFX on ARM32 & Thumb-2.

Exercise the generation of the ARM SBFX intruction in
compiler/utils/arm/assembler_arm32_test.cc (ARM
instruction set encoding) and in
compiler/utils/arm/assembler_thumb2_test.cc (Thumb
instruction set encoding).

Change-Id: Ic72683aac6dd6628e227523e352c395e1a63b52e

9 years agoMerge "[optimizing compiler] Add 014-math3 to the list of arm64 broken tests"
Calin Juravle [Thu, 13 Nov 2014 17:33:20 +0000 (17:33 +0000)]
Merge "[optimizing compiler] Add 014-math3 to the list of arm64 broken tests"

9 years agoMerge "[optimizing compiler] Rename dex_offset to dex_pc in the builder"
Calin Juravle [Thu, 13 Nov 2014 17:32:29 +0000 (17:32 +0000)]
Merge "[optimizing compiler] Rename dex_offset to dex_pc in the builder"

9 years ago[optimizing compiler] Add 014-math3 to the list of arm64 broken tests
Calin Juravle [Thu, 13 Nov 2014 17:31:59 +0000 (17:31 +0000)]
[optimizing compiler] Add 014-math3 to the list of arm64 broken tests

Change-Id: I71f48c55eaf86113c1b19c490939bb1518f8dd9e

9 years agoAdd support for int-to-byte in the optimizing compiler.
Roland Levillain [Thu, 13 Nov 2014 14:11:42 +0000 (14:11 +0000)]
Add support for int-to-byte in the optimizing compiler.

- Add support for the int-to-byte Dex instruction in the
  optimizing compiler.
- Implement the ARM and Thumb-2 SBFX instructions.
- Generate x86, x86-64 and ARM (but not ARM64) code for
  char to byte, short to byte and int to byte
  HTypeConversion nodes.
- Add related tests to test/422-type-conversion.

Change-Id: Ic8b8911b90d4b5281fad15bcee96bc3ee85dc577

9 years ago[optimizing compiler] Rename dex_offset to dex_pc in the builder
Calin Juravle [Thu, 13 Nov 2014 16:46:39 +0000 (16:46 +0000)]
[optimizing compiler] Rename dex_offset to dex_pc in the builder

The term dex offset comes from Dalvik where these were addresses in
memory. Currently these should be dex PCs, namely offsets from the start
of code items. Quick lacks this clean up but there's no need to bring
over the convention to optimizing.

(thanks to irogers for the commit message text)

Change-Id: If86c0cf021a06f04a21462053e9d5f31bba7f65d

9 years agoMerge "[optimizing compiler] Fix Move for instruction with constant output"
Calin Juravle [Thu, 13 Nov 2014 16:28:16 +0000 (16:28 +0000)]
Merge "[optimizing compiler] Fix Move for instruction with constant output"

9 years ago[optimizing compiler] Fix Move for instruction with constant output
Calin Juravle [Thu, 13 Nov 2014 15:53:04 +0000 (15:53 +0000)]
[optimizing compiler] Fix Move for instruction with constant output

Change-Id: I15d89292dc62f8dd8643530f95ace2e8be034411

9 years agoMerge "Use correct register class for refs"
Vladimir Marko [Thu, 13 Nov 2014 14:27:54 +0000 (14:27 +0000)]
Merge "Use correct register class for refs"

9 years agoART: Implicit null check should break def tracking
Pavel Vyssotski [Thu, 13 Nov 2014 12:25:23 +0000 (18:25 +0600)]
ART: Implicit null check should break def tracking

Implicit null check can provoke exception that needs to be sure all VRs are saved on stack.
The fix is to reset the def tracking system at the moment of adding an implicit null check.

Change-Id: Ie8a32b727086438e04e745d4a3f87f096ff36cac
Signed-off-by: Pavel Vyssotski <pavel.n.vyssotski@intel.com>
9 years agoQuick: Fix arm64 AGET/APUT to use 32-bit index.
Vladimir Marko [Fri, 7 Nov 2014 16:11:00 +0000 (16:11 +0000)]
Quick: Fix arm64 AGET/APUT to use 32-bit index.

Change-Id: Iaa230024c934fc0ff7e45dcbebeb6c0e94e1af63

9 years agoMerge "[optimizing compiler] Add DIV_LONG"
Calin Juravle [Thu, 13 Nov 2014 11:16:37 +0000 (11:16 +0000)]
Merge "[optimizing compiler] Add DIV_LONG"

9 years agoMerge "[optimizing compiler] add HTemporary support for long and doubles"
Calin Juravle [Thu, 13 Nov 2014 11:16:27 +0000 (11:16 +0000)]
Merge "[optimizing compiler] add HTemporary support for long and doubles"

9 years agoMerge "And another failing test on optimizing/armv8."
Nicolas Geoffray [Thu, 13 Nov 2014 11:04:54 +0000 (11:04 +0000)]
Merge "And another failing test on optimizing/armv8."

9 years agoAnd another failing test on optimizing/armv8.
Nicolas Geoffray [Thu, 13 Nov 2014 10:58:26 +0000 (10:58 +0000)]
And another failing test on optimizing/armv8.

Change-Id: Ia0bcb40a9407e8709f43d00ff3d43b2063129ed9

9 years agoMerge "Add a --method-filter option to oatdump."
Nicolas Geoffray [Thu, 13 Nov 2014 10:51:45 +0000 (10:51 +0000)]
Merge "Add a --method-filter option to oatdump."

9 years agoMerge "Unfortunately, the test still hits too many run failures."
Nicolas Geoffray [Thu, 13 Nov 2014 10:30:38 +0000 (10:30 +0000)]
Merge "Unfortunately, the test still hits too many run failures."

9 years agoUnfortunately, the test still hits too many run failures.
Nicolas Geoffray [Thu, 13 Nov 2014 10:20:47 +0000 (10:20 +0000)]
Unfortunately, the test still hits too many run failures.

Change-Id: I3917c994e454b8e9321b28173059d3ac8739c02e

9 years agoMerge "Do a parallel move in BoundsCheckSlowPath."
Nicolas Geoffray [Thu, 13 Nov 2014 09:58:56 +0000 (09:58 +0000)]
Merge "Do a parallel move in BoundsCheckSlowPath."

9 years agoUse correct register class for refs
Serguei Katkov [Thu, 6 Nov 2014 08:45:44 +0000 (14:45 +0600)]
Use correct register class for refs

LoadValue requires thar ref location should reguest kRefReg
register class. The patch fixes GenFilledNewArray to specify
the register class correctly.

This is a fix for the crash of dex2oat on 412-new-array unit test.
This is a second attempt with an additional fix for arm64.

Change-Id: I9f0bb098cd1d1721ef03e8976c1460f8fa49aa2a
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
9 years agoMerge "Modify the behavior of thread suspend shootouts."
Ian Rogers [Thu, 13 Nov 2014 00:53:47 +0000 (00:53 +0000)]
Merge "Modify the behavior of thread suspend shootouts."

9 years agoModify the behavior of thread suspend shootouts.
Ian Rogers [Wed, 12 Nov 2014 07:08:07 +0000 (23:08 -0800)]
Modify the behavior of thread suspend shootouts.

The thread doing the suspension doesn't attempt to suspend the other thread
unless it knows another thread isn't trying to suspend it. Use the suspend
count, and its lock, for this purpose.
Re-enable ThreadStress test.
Bug: 15446488

Change-Id: Idd34410c7b89d8abd6973e5699a15ca699472c78

9 years agoMerge "Use the new name for the libc++ libbacktrace."
Dan Albert [Wed, 12 Nov 2014 22:12:42 +0000 (22:12 +0000)]
Merge "Use the new name for the libc++ libbacktrace."

9 years agoMerge "ART: Fix clobbering low part in 32-bit version of X86Mir2Lir::GenNegDouble"
Bill Buzbee [Wed, 12 Nov 2014 21:31:32 +0000 (21:31 +0000)]
Merge "ART: Fix clobbering low part in 32-bit version of X86Mir2Lir::GenNegDouble"

9 years agoMerge "ART: GenNegLong incorrectly handled register overlap for x86"
Bill Buzbee [Wed, 12 Nov 2014 21:31:25 +0000 (21:31 +0000)]
Merge "ART: GenNegLong incorrectly handled register overlap for x86"

9 years ago[optimizing compiler] Add DIV_LONG
Calin Juravle [Tue, 11 Nov 2014 19:07:44 +0000 (19:07 +0000)]
[optimizing compiler] Add DIV_LONG

- for backends: arm, x86, x86_64
- added cqo, idivq, testq assembly for x64_64
- small cleanups

Change-Id: I762ef37880749038ed25d6014370be9a61795200

9 years agoMerge "Use CommonRuntimeTest::boot_class_path_ in DexMethodIteratorTest"
Brian Carlstrom [Wed, 12 Nov 2014 18:41:23 +0000 (18:41 +0000)]
Merge "Use CommonRuntimeTest::boot_class_path_ in DexMethodIteratorTest"

9 years ago[optimizing compiler] add HTemporary support for long and doubles
Calin Juravle [Tue, 11 Nov 2014 15:38:19 +0000 (15:38 +0000)]
[optimizing compiler] add HTemporary support for long and doubles

Change-Id: I5247ecd71d0193050484b7632c804c9bfd20f924

9 years agoMerge "Mark test as failing for optimizing/armv8."
Nicolas Geoffray [Wed, 12 Nov 2014 18:29:03 +0000 (18:29 +0000)]
Merge "Mark test as failing for optimizing/armv8."

9 years agoMark test as failing for optimizing/armv8.
Nicolas Geoffray [Wed, 12 Nov 2014 18:28:18 +0000 (18:28 +0000)]
Mark test as failing for optimizing/armv8.

Change-Id: I43e8ade5fb27a66a52309516bce72e081b4ebbf6

9 years agoAdd a --method-filter option to oatdump.
Nicolas Geoffray [Wed, 12 Nov 2014 18:02:36 +0000 (18:02 +0000)]
Add a --method-filter option to oatdump.

I intend to use oatdump for testing generated code, and
being able to filter on a method name will make the
testing more reliable.

Change-Id: Iaf7fef7228d9d8a901bd9b98452d244d42ca497e

9 years agoDo a parallel move in BoundsCheckSlowPath.
Nicolas Geoffray [Wed, 12 Nov 2014 17:50:07 +0000 (17:50 +0000)]
Do a parallel move in BoundsCheckSlowPath.

The two locations of the index and length could overlap,
so we need a parallel move. Also factorize the code for
doing a parallel move based on two locations.

Change-Id: Iee8b3459e2eed6704d45e9a564fb2cd050741ea4

9 years agoMerge "Implement and/or/xor in optimizing."
Nicolas Geoffray [Wed, 12 Nov 2014 17:53:18 +0000 (17:53 +0000)]
Merge "Implement and/or/xor in optimizing."

9 years agoMerge "Fix bad OOM check in Thread::CreatePeer()."
Vladimir Marko [Wed, 12 Nov 2014 17:29:28 +0000 (17:29 +0000)]
Merge "Fix bad OOM check in Thread::CreatePeer()."

9 years agoFix bad OOM check in Thread::CreatePeer().
Vladimir Marko [Wed, 12 Nov 2014 15:41:57 +0000 (15:41 +0000)]
Fix bad OOM check in Thread::CreatePeer().

Bug: 18342629

(cherry picked from commit 7bcea103af7cd130254835a30b45d5277a478074)

Change-Id: I5d5c7511bbc705d040095f4934d98d326d54d39e

9 years agoImplement and/or/xor in optimizing.
Nicolas Geoffray [Wed, 12 Nov 2014 13:19:37 +0000 (13:19 +0000)]
Implement and/or/xor in optimizing.

Change-Id: I7cf6da1fd334a7177a5580931b8f174dd40b7cec

9 years agoMerge "More armv8/optimizing test failures."
Nicolas Geoffray [Wed, 12 Nov 2014 12:21:43 +0000 (12:21 +0000)]
Merge "More armv8/optimizing test failures."

9 years agoMore armv8/optimizing test failures.
Nicolas Geoffray [Wed, 12 Nov 2014 12:19:58 +0000 (12:19 +0000)]
More armv8/optimizing test failures.

Change-Id: Ic2472e4339f96789086f4397f4a4c53529a3fe49

9 years agoMerge "Implement monitorenter/monitorexit."
Nicolas Geoffray [Wed, 12 Nov 2014 11:43:01 +0000 (11:43 +0000)]
Merge "Implement monitorenter/monitorexit."

9 years agoImplement monitorenter/monitorexit.
Nicolas Geoffray [Tue, 11 Nov 2014 16:29:44 +0000 (16:29 +0000)]
Implement monitorenter/monitorexit.

Pretty simple as they just invoke the runtime.

Change-Id: I5fcb2c783deac27e55e28d8b3da3e68ea4b77363

9 years agoMerge "Revert "Revert "Add support for long-to-int in the optimizing compiler."""
Roland Levillain [Wed, 12 Nov 2014 11:33:41 +0000 (11:33 +0000)]
Merge "Revert "Revert "Add support for long-to-int in the optimizing compiler."""

9 years agoMerge "Update list of armv8/optimizing failing tests."
Nicolas Geoffray [Wed, 12 Nov 2014 10:48:29 +0000 (10:48 +0000)]
Merge "Update list of armv8/optimizing failing tests."

9 years agoUpdate list of armv8/optimizing failing tests.
Nicolas Geoffray [Wed, 12 Nov 2014 10:47:41 +0000 (10:47 +0000)]
Update list of armv8/optimizing failing tests.

Change-Id: I9db077b1c8bd687f665574ab64445161dbf0771b

9 years agoMerge "Remove HTemporary when building the SSA graph."
Nicolas Geoffray [Wed, 12 Nov 2014 10:24:10 +0000 (10:24 +0000)]
Merge "Remove HTemporary when building the SSA graph."

9 years agoMerge "Implement invokesuper in optimizing."
Nicolas Geoffray [Wed, 12 Nov 2014 10:22:11 +0000 (10:22 +0000)]
Merge "Implement invokesuper in optimizing."

9 years agoImplement invokesuper in optimizing.
Nicolas Geoffray [Tue, 11 Nov 2014 14:40:10 +0000 (14:40 +0000)]
Implement invokesuper in optimizing.

- Ensure dex2oat is in PIC mode, as this will drive the decisions
  made in the compiler driver, and optimizing only suppots PIC
  anyway.

- Since invokesuper is sharpened into invoke-direct, also support
  sharpening of invokeinterface and invokevirtual.

Change-Id: I0a1bd79a13dc1c9e67e3cb11d38f0cd4459968ae

9 years agoMerge "Implement checkcast for optimizing."
Nicolas Geoffray [Wed, 12 Nov 2014 09:19:35 +0000 (09:19 +0000)]
Merge "Implement checkcast for optimizing."

9 years agoImplement checkcast for optimizing.
Nicolas Geoffray [Mon, 10 Nov 2014 15:09:21 +0000 (15:09 +0000)]
Implement checkcast for optimizing.

- Ended up not using HTypeCheck because of how
  instanceof and checkcast end up having different logic
  for code generation.

- Fix a x86_64 assembler bug triggered by now enabling
  more methods to be compiled. Difficult to test today
  without b/18117217.

Change-Id: I3022e7ae03befb1d10bea9637ad21fadc430abe0

9 years agoMerge "Don't try to handle nested SIGSEGV inside fault handler."
Ian Rogers [Wed, 12 Nov 2014 01:42:44 +0000 (01:42 +0000)]
Merge "Don't try to handle nested SIGSEGV inside fault handler."

9 years agoDon't try to handle nested SIGSEGV inside fault handler.
Ian Rogers [Wed, 12 Nov 2014 00:55:11 +0000 (16:55 -0800)]
Don't try to handle nested SIGSEGV inside fault handler.

Trying to handle nested SIGSEGV in the fault handler leads to infinite signals
and retrying if the cause of the SIGSEGV was a lack of stack space. This can
lead to applications not chaining through to debuggerd and dying.
Bug: 18330119

Change-Id: Iadcffe0fa0e55d783b84a06504bbd9d181e641e4

9 years agoMerge "Allow JNI AttachCurrentThread to fail if not enough stack."
Ian Rogers [Wed, 12 Nov 2014 00:15:58 +0000 (00:15 +0000)]
Merge "Allow JNI AttachCurrentThread to fail if not enough stack."

9 years agoAllow JNI AttachCurrentThread to fail if not enough stack.
Ian Rogers [Wed, 12 Nov 2014 00:10:33 +0000 (16:10 -0800)]
Allow JNI AttachCurrentThread to fail if not enough stack.

Add unit tests and move JavaVM JNI tests into there own set of gtests.
Bug: 18330119

Change-Id: I0e93dff783b1f5d787b3084d24122883e14951a1

9 years agoUse the new name for the libc++ libbacktrace.
Dan Albert [Tue, 11 Nov 2014 23:14:07 +0000 (15:14 -0800)]
Use the new name for the libc++ libbacktrace.

I'm removing the stlport flavored libbacktrace, so the libc++ one can
have the normal name now.

Bug: 15193147
Change-Id: Ie138bc8034533cae56ea15095eebc5f52e56f32d

9 years agoRemove HTemporary when building the SSA graph.
Nicolas Geoffray [Tue, 11 Nov 2014 18:21:53 +0000 (18:21 +0000)]
Remove HTemporary when building the SSA graph.

- They are useless afterwards. If we keep them around, they can
  crash the dump of the graph, where they always assume a previous
  instruction.

- In the call to HTemporary::GetType, check that the previous
  instruction exists.

Change-Id: Ie7bf44d05cb61e3654a69725c1980925580dd3a6

9 years agoMerge "Add null check for thread name creation"
Mathieu Chartier [Tue, 11 Nov 2014 17:46:36 +0000 (17:46 +0000)]
Merge "Add null check for thread name creation"

9 years agoAdd null check for thread name creation
Mathieu Chartier [Tue, 11 Nov 2014 00:58:19 +0000 (16:58 -0800)]
Add null check for thread name creation

Previously we didn't check for null which could result in check jni
failures if we tried to throw another OOM in the next allocation.

Bug: 18297817

(cherry picked from commit a7ade888ab99b1453571d14c41d4a0322c400fcd)

Change-Id: Ideef46f4900e546e81fbd9a5225c06698f36e9ac

9 years agoRevert "Revert "Add support for long-to-int in the optimizing compiler.""
Roland Levillain [Tue, 11 Nov 2014 17:35:19 +0000 (17:35 +0000)]
Revert "Revert "Add support for long-to-int in the optimizing compiler.""

This reverts commit 3adfd1b4fb20ac2b0217b5d2737bfe30ad90257a.

Change-Id: Iacf0c6492d49267e24f1b727dbf6379b21fd02db

9 years agoMerge "Add jni_internal_test for GetArrayLength(NULL)."
Ian Rogers [Tue, 11 Nov 2014 16:49:46 +0000 (16:49 +0000)]
Merge "Add jni_internal_test for GetArrayLength(NULL)."

9 years agoAdd jni_internal_test for GetArrayLength(NULL).
Ian Rogers [Tue, 11 Nov 2014 16:43:05 +0000 (08:43 -0800)]
Add jni_internal_test for GetArrayLength(NULL).

Change-Id: I6c6ad38de3b60d58e6bcf734714f5fad29e73c30

9 years agoMerge "Revert "Add support for long-to-int in the optimizing compiler.""
Roland Levillain [Tue, 11 Nov 2014 14:49:25 +0000 (14:49 +0000)]
Merge "Revert "Add support for long-to-int in the optimizing compiler.""

9 years agoRevert "Add support for long-to-int in the optimizing compiler."
Roland Levillain [Tue, 11 Nov 2014 14:48:08 +0000 (14:48 +0000)]
Revert "Add support for long-to-int in the optimizing compiler."

This reverts commit 647b96f29cb81832e698f863884fdba06674c9de.

Change-Id: I552f23585463c676acbd547521b4d3ee5c0342eb

9 years agoMerge "Fix lint error."
Calin Juravle [Tue, 11 Nov 2014 14:14:54 +0000 (14:14 +0000)]
Merge "Fix lint error."

9 years agoFix lint error.
Calin Juravle [Tue, 11 Nov 2014 14:13:15 +0000 (14:13 +0000)]
Fix lint error.

Change-Id: Ief9b9fe6982e7e76aae74d6c909bd9f4b3f82673

9 years agoMerge "Revert "Use correct register class for refs""
Vladimir Marko [Tue, 11 Nov 2014 12:31:28 +0000 (12:31 +0000)]
Merge "Revert "Use correct register class for refs""

9 years agoRevert "Use correct register class for refs"
Vladimir Marko [Tue, 11 Nov 2014 12:30:29 +0000 (12:30 +0000)]
Revert "Use correct register class for refs"

This reverts commit 5c2555407d823356fb55ea3ffdf281aac00a583e.

Change-Id: I0490e9b1a9470e429f31911c9a4f28f71df78cc1

9 years agoMerge "Add support for long-to-int in the optimizing compiler."
Roland Levillain [Tue, 11 Nov 2014 12:29:57 +0000 (12:29 +0000)]
Merge "Add support for long-to-int in the optimizing compiler."

9 years agoAdd support for long-to-int in the optimizing compiler.
Roland Levillain [Tue, 11 Nov 2014 12:26:26 +0000 (12:26 +0000)]
Add support for long-to-int in the optimizing compiler.

- Add support for the long-to-int Dex instruction in the
  optimizing compiler.
- Generate x86, x86-64 and ARM (but not ARM64) code for
  long-to-int HTypeConversion nodes.
- Add related tests to test/422-type-conversion.
- Also fix comments in test/415-optimizing-arith-neg and
  in test/416-optimizing-arith-not.

Change-Id: I3084af30f2a495d178362ae1154dc7ceb7bf3a58

9 years agoMerge "Use correct register class for refs"
Vladimir Marko [Tue, 11 Nov 2014 12:10:56 +0000 (12:10 +0000)]
Merge "Use correct register class for refs"

9 years agoMerge "Opt compiler: Add arm64 support for a few more IRs."
Nicolas Geoffray [Tue, 11 Nov 2014 10:04:25 +0000 (10:04 +0000)]
Merge "Opt compiler: Add arm64 support for a few more IRs."

9 years agoMerge "Opt compiler: Add arm64 support for floating-point."
Nicolas Geoffray [Tue, 11 Nov 2014 09:58:34 +0000 (09:58 +0000)]
Merge "Opt compiler: Add arm64 support for floating-point."

9 years agoUse correct register class for refs
Serguei Katkov [Thu, 6 Nov 2014 08:45:44 +0000 (14:45 +0600)]
Use correct register class for refs

LoadValue requires thar ref location should reguest kRefReg
register class. The patch fixes GenFilledNewArray to specify
the register class correctly.

This is a fix for the crash of dex2oat on 412-new-array unit test.

Change-Id: I58d969ddac0d84d4024bf686b5b0c12337ca9a37
Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
9 years agoMerge "Fix CombineBlocks optimization"
Ian Rogers [Tue, 11 Nov 2014 08:47:57 +0000 (08:47 +0000)]
Merge "Fix CombineBlocks optimization"