OSDN Git Service
Mark Mendell [Thu, 7 May 2015 15:25:03 +0000 (11:25 -0400)]
[optimizing] Tune some x86_64 moves
Generate Moves of constant FP values by loading from the constant table.
Use 'movl' to load a 64 bit register for positive 32-bit values, saving
a byte in the generated code by taking advantage of the implicit
zero extension.
Change a couple of xorq(reg, reg) to xorl to (potentially) save a byte
of code per xor.
Change-Id: I5b2a807f0d3b29294fd4e7b8ef6d654491fa0b01
Signed-off-by: Mark Mendell <mark.p.mendell@intel.com>
Nicolas Geoffray [Wed, 6 May 2015 14:02:23 +0000 (14:02 +0000)]
Merge "Bump jdwp timeout to 12 minutes."
Nicolas Geoffray [Wed, 6 May 2015 13:57:09 +0000 (14:57 +0100)]
Bump jdwp timeout to 12 minutes.
A run on volantis now is around 10 minutes.
Change-Id: I6e1f436d71da6eec55e984f7af99ba34438e49fb
Nicolas Geoffray [Wed, 6 May 2015 08:23:00 +0000 (08:23 +0000)]
Merge "Re-enable JDWP tests on volantis."
Nicolas Geoffray [Wed, 6 May 2015 08:19:32 +0000 (09:19 +0100)]
Re-enable JDWP tests on volantis.
Change-Id: Ibf1d16c9830155526cee38e242a4de9a3d5ed943
Sebastien Hertz [Wed, 6 May 2015 08:07:06 +0000 (08:07 +0000)]
Merge "Fix instrumentation exit stub for arm64"
Sebastien Hertz [Tue, 5 May 2015 18:03:50 +0000 (20:03 +0200)]
Fix instrumentation exit stub for arm64
Fixes bad offset to restore register x21.
Bug:
20798393
(cherry picked from commit
a538effb3f848bfec232c55f167b9f35b416948f)
Change-Id: I030d848ab0f46043e86f53abae204463f0aaccbe
Andreas Gampe [Wed, 6 May 2015 01:01:27 +0000 (01:01 +0000)]
Merge "Fix Mips64 utils.h typo"
Duane Sand [Tue, 5 May 2015 21:48:43 +0000 (14:48 -0700)]
Fix Mips64 utils.h typo
Include of art's utils.h was mistyped as util.h, and instead
brought in external/icu/icu4c/source/common/util.h,
which caused art build failures from -Wdeprecated warnings
when Mips64 libart is compiled with clang.
Change-Id: I9370c4dc041eaecc5d5a1490ec23034ece4322a9
Hiroshi Yamauchi [Tue, 5 May 2015 22:13:32 +0000 (22:13 +0000)]
Merge "Temporarily suppress 098-ddmc for the read barrier config."
Hiroshi Yamauchi [Tue, 5 May 2015 20:36:39 +0000 (13:36 -0700)]
Temporarily suppress 098-ddmc for the read barrier config.
Bug:
20720510
Change-Id: Ie8c159767654837c02f0484f4dda569bb0118a03
Roland Levillain [Tue, 5 May 2015 13:45:56 +0000 (13:45 +0000)]
Merge "Revert "Revert "Revert "Revert "[optimizing] Improve x86 shifts"""""
Nicolas Geoffray [Tue, 5 May 2015 09:26:29 +0000 (09:26 +0000)]
Merge "Find better split positions in the register allocator."
Nicolas Geoffray [Wed, 29 Apr 2015 13:16:00 +0000 (14:16 +0100)]
Find better split positions in the register allocator.
In a standard if/else control flow graph, this avoids
doing a move in one branch if the other branch decided
to move an interval.
This also needs a new register hint kind, which is what
was the location of the interval at the predecessor block.
Change-Id: I18b78264587b4d693540fbb5e014d12df2add3e2
Andreas Gampe [Tue, 5 May 2015 01:31:33 +0000 (01:31 +0000)]
Merge "ART: Fix double-free in oatdump"
Andreas Gampe [Tue, 5 May 2015 01:25:23 +0000 (18:25 -0700)]
ART: Fix double-free in oatdump
The ImageDumper doesn't own the OatDumperOptions.
Bug:
20818721
Change-Id: Iea11ada8fb6418b226d39b33c252a834c42e655e
Andreas Gampe [Mon, 4 May 2015 22:13:05 +0000 (22:13 +0000)]
Merge "ART: Emit debug info when app is debuggable"
Andreas Gampe [Mon, 4 May 2015 15:33:31 +0000 (08:33 -0700)]
ART: Emit debug info when app is debuggable
Emit debug symbols and CFI when dex2oat is compiling with the
--debuggable flag.
Bug:
17011129
(cherry picked from commit
8484d23186c229e2927441f85ae819abb4996072)
Change-Id: I0afab1e46abd819eded2b823580e766619497393
Christopher Ferris [Mon, 4 May 2015 21:58:44 +0000 (21:58 +0000)]
Merge "Fix mismatched new[]/delete."
Mathieu Chartier [Mon, 4 May 2015 19:12:45 +0000 (19:12 +0000)]
Merge "Delete invalid DCHECK"
Christopher Ferris [Mon, 27 Apr 2015 22:19:41 +0000 (15:19 -0700)]
Fix mismatched new[]/delete.
Another two cases where a new[] is used but only a delete occurs.
Bug:
18202869
Change-Id: If68264807150f3a9783e44ef8823cc366bff8df2
Mathieu Chartier [Mon, 4 May 2015 18:46:25 +0000 (11:46 -0700)]
Delete invalid DCHECK
We can have large objects mapped at address 0xebad____.
Change-Id: I9e27d4948e7e853b4af6eb1b36dbfec6d4d7a99a
Mathieu Chartier [Mon, 4 May 2015 18:17:40 +0000 (18:17 +0000)]
Merge "Improve JNI registration failure logging"
Mathieu Chartier [Mon, 4 May 2015 17:18:24 +0000 (10:18 -0700)]
Improve JNI registration failure logging
Print INTERNAL_FATAL instead of ERROR, print the
"Failed to register native method" message last.
Bug:
13885477
Change-Id: I9f1a7ea45bd926f3984b8008d84c75e676a1ed10
Mathieu Chartier [Mon, 4 May 2015 17:10:47 +0000 (17:10 +0000)]
Merge "Fix NanoSleep and add test"
Mathieu Chartier [Mon, 4 May 2015 16:53:43 +0000 (09:53 -0700)]
Fix NanoSleep and add test
Fixed a bug where tv_nsec was't between 0 and 999,999,999.
Bug:
14450052
Change-Id: I30b29a716bfa63c6b57d589dd1102d2ca934c061
Mark P Mendell [Wed, 29 Apr 2015 14:56:17 +0000 (14:56 +0000)]
Revert "Revert "Revert "Revert "[optimizing] Improve x86 shifts""""
This reverts commit
2a7a1d7808f003bea908023ebd11eb442d2fca39.
Fix the problem that a long long >> 63 got the wrong answer. The
problem was that a shr was used instead of a sar.
Change-Id: I0327f79c718016ddec9272a605fc50ec15ec4566
Mathieu Chartier [Sun, 3 May 2015 22:26:22 +0000 (22:26 +0000)]
Merge "Add some more DISALLOW_COPY_AND_ASSIGN"
Mathieu Chartier [Sun, 3 May 2015 22:20:23 +0000 (15:20 -0700)]
Add some more DISALLOW_COPY_AND_ASSIGN
May help prevent bugs maybe.
Change-Id: Ie73d469dfcd078492ecb3aa28682b42707221202
Christopher Ferris [Sat, 2 May 2015 00:20:15 +0000 (00:20 +0000)]
Merge "Let the map function compute the relative pc."
Christopher Ferris [Fri, 1 May 2015 23:03:49 +0000 (16:03 -0700)]
Let the map function compute the relative pc.
The new packed relocations linker option creates an elf with a non-zero
load base. It's no longer an easy task to compute the relative pc yourself
so call the helper function to do it for us.
Bug:
20687795
(cherry picked from commit
332ef327c2b1a5e1774ba0d1da23e07303002af9)
Change-Id: I3d61c767f21a3f240a14f9e8bc6bee53b6cdb60d
Hiroshi Yamauchi [Fri, 1 May 2015 23:22:51 +0000 (23:22 +0000)]
Merge "Request full/partial GC type from VMRuntime.requestConcurrentGC()."
Andreas Gampe [Fri, 1 May 2015 23:13:38 +0000 (23:13 +0000)]
Merge "ART: Fix max build"
Andreas Gampe [Fri, 1 May 2015 23:11:04 +0000 (16:11 -0700)]
ART: Fix max build
Change-Id: Id1b9c0ee05b61195d1c1f09a8938df3110c2f2b3
Chih-hung Hsieh [Fri, 1 May 2015 22:30:07 +0000 (22:30 +0000)]
Merge "Re-enable clang for Mips/Mips64 targets."
Hiroshi Yamauchi [Fri, 1 May 2015 21:33:19 +0000 (14:33 -0700)]
Request full/partial GC type from VMRuntime.requestConcurrentGC().
Bug:
20554807
Change-Id: I1cd855507c3f4e191035dbc2c429e1b8b344d81b
Duane Sand [Fri, 1 May 2015 18:34:51 +0000 (11:34 -0700)]
Re-enable clang for Mips/Mips64 targets.
The build-time errors described in
https://android-review.googlesource.com/#/c/120512
are no longer happening.
BUG:
18807290
BUG:
18789639
Change-Id: I195bbb7d102fecd6a6e6a3357b0863dd6fddb01f
Hiroshi Yamauchi [Fri, 1 May 2015 20:35:57 +0000 (20:35 +0000)]
Merge "Print memory maps on GC crash."
Andreas Gampe [Fri, 1 May 2015 20:34:11 +0000 (20:34 +0000)]
Merge "Add binary search table to .eh_frame_hdr"
David Srbecky [Thu, 30 Apr 2015 18:57:35 +0000 (19:57 +0100)]
Add binary search table to .eh_frame_hdr
The addresses in the search table must be relative to the start
of .eh_frame_hdr which results in yet another pointer type to patch.
I have moved the Patch method back to elf_writer_quick where
it can be specialized to one of the three pointer types.
The .eh_frame_hdr takes around 17% of .eh_frame now.
Change-Id: I4770d1355ded6cdff9489c33380f6b06c4e3f9fe
Andreas Gampe [Fri, 1 May 2015 20:22:57 +0000 (20:22 +0000)]
Merge "Do not write CFI and symbols for deduplicate methods."
Hiroshi Yamauchi [Fri, 1 May 2015 18:50:24 +0000 (11:50 -0700)]
Print memory maps on GC crash.
Bug:
20557050
Change-Id: I0fc35bace77b11181f06199c121bc4e246d02100
Mathieu Chartier [Fri, 1 May 2015 20:19:14 +0000 (20:19 +0000)]
Merge "Change invalid root from LOG(ERROR) to LOG(INTERNAL_FATAL)"
Mathieu Chartier [Fri, 1 May 2015 20:00:23 +0000 (13:00 -0700)]
Change invalid root from LOG(ERROR) to LOG(INTERNAL_FATAL)
INTERNAL_FATAL is more likely to remain in bug reports.
Bug:
20736048
Change-Id: I518f079d8d1839e22b3595e807730edf36318f1d
David Srbecky [Fri, 1 May 2015 14:00:40 +0000 (15:00 +0100)]
Do not write CFI and symbols for deduplicate methods.
There is no need to have multiple symbols for a given address
since libunwind still has to pick only one to print.
Likewise, there is no need to duplicate the CFI.
There is fair number of duplicate methods in the boot image,
so this saves over 20% from those debug sections.
Change-Id: Ib4390150257d009a6303b084076750ce56afed60
Nicolas Geoffray [Fri, 1 May 2015 09:10:56 +0000 (09:10 +0000)]
Merge "Update the remaining input index of phis after deleting an input."
Nicolas Geoffray [Mon, 27 Apr 2015 23:52:43 +0000 (00:52 +0100)]
Update the remaining input index of phis after deleting an input.
bug:
20715803
bug:
20690906
Change-Id: Iaf08f0c30d629e766be2b04815dc3e38b6e7ff35
David Srbecky [Thu, 30 Apr 2015 16:08:32 +0000 (16:08 +0000)]
Merge "Move .eh_frame to the end of ELF file."
David Srbecky [Tue, 28 Apr 2015 18:43:56 +0000 (19:43 +0100)]
Move .eh_frame to the end of ELF file.
Move .eh_frame to the end together with other debug sections.
This should make it easier to remove it using standard strip tools.
Bug:
20556771
Change-Id: I8303ccb053aee50d53fb193819d345c91f1e5b75
David Srbecky [Thu, 30 Apr 2015 16:07:16 +0000 (16:07 +0000)]
Merge "Major refactoring of ElfBuilder."
David Srbecky [Thu, 30 Apr 2015 16:07:06 +0000 (16:07 +0000)]
Merge "Minor refactoring of ElfBuilder."
David Srbecky [Wed, 22 Apr 2015 18:40:27 +0000 (19:40 +0100)]
Major refactoring of ElfBuilder.
Simplify ElfBuilder by removing duplicated or redundant code.
Many of the repeated code patterns were replaced by just
looping over the list of all sections.
Methods Init() and Write() have been merged into one.
The split between those was rather arbitrary, but it was there
for a reason. It allowed creation of raw sections between
the calls which may have depended on layout decisions done in
Init(), but not in Write() (e.g. knowing of offset of .text).
This has been replaced by more generic solution.
All sections are asked about their size first and complete
file layout is calculated. Then the sections are asked to
write their content (potentially using the layout information).
This should be pure refactoring CL - the compiler should
produce bit for bit identical output as before.
Change-Id: I281d13d469801bd8288b36b360d200d98a3e92d7
Nicolas Geoffray [Thu, 30 Apr 2015 11:16:06 +0000 (11:16 +0000)]
Merge "Revert "GVN final fields even with side effects.""
Nicolas Geoffray [Thu, 30 Apr 2015 11:15:40 +0000 (11:15 +0000)]
Revert "GVN final fields even with side effects."
This reverts commit
781733632637db98d79dfffad72bf063be3259be.
Change-Id: Id7c4591f6b8190921852044b278d11627457c570
Nicolas Geoffray [Thu, 30 Apr 2015 10:21:19 +0000 (10:21 +0000)]
Merge "GVN final fields even with side effects."
Nicolas Geoffray [Wed, 29 Apr 2015 15:46:27 +0000 (16:46 +0100)]
GVN final fields even with side effects.
Two accesses of a final field can be GVN'ed even if there are
side effects between them.
Change-Id: I04495ae83c7858f4216b083ad1c29851954320ad
Sebastien Hertz [Thu, 30 Apr 2015 07:18:07 +0000 (07:18 +0000)]
Merge "ART: Allow oat files with duplicates classes in corner case"
Sebastien Hertz [Thu, 30 Apr 2015 06:53:35 +0000 (06:53 +0000)]
Merge "Fix missing transaction abort error message"
Andreas Gampe [Thu, 30 Apr 2015 03:47:16 +0000 (20:47 -0700)]
ART: Allow oat files with duplicates classes in corner case
When the oat file is actually an odex file, that is, a preopted
/system app, then it is impossible to fall back to the original
APK, as that has been stripped.
When it looks like it will be impossible to successfully open the
original dex location, grudgingly allow to open the found oat file,
even if it has duplicate classes, but warn accordingly.
Bug:
20697582
Change-Id: I1dd459563d977a2e77806eacd03e49334d5b1f14
Jeff Hao [Wed, 29 Apr 2015 23:03:46 +0000 (23:03 +0000)]
Merge "Restore interpreter check during DoCall removed by string init."
Jeff Hao [Wed, 29 Apr 2015 22:58:17 +0000 (15:58 -0700)]
Restore interpreter check during DoCall removed by string init.
Also reorder test in verifier to check for string_init first.
Change-Id: I585ef3f5890819a3e233236ea85b51a03918f5dc
Mathieu Chartier [Wed, 29 Apr 2015 17:37:47 +0000 (17:37 +0000)]
Merge "Only print IRT remove local warning if CheckJNI is enabled"
Mathieu Chartier [Wed, 29 Apr 2015 16:57:48 +0000 (09:57 -0700)]
Only print IRT remove local warning if CheckJNI is enabled
Less spammy.
Bug:
17405090
Change-Id: Ib78d0d7bc31a88182cb9d85ddba9b469bd50324b
Nicolas Geoffray [Wed, 29 Apr 2015 17:10:08 +0000 (17:10 +0000)]
Merge "Add synthesize uses at back edge."
Nicolas Geoffray [Tue, 21 Apr 2015 13:28:41 +0000 (14:28 +0100)]
Add synthesize uses at back edge.
This reduces the cost of linearizing the graph (hence removing
the notion of back edge). Since linear scan allocates/spills registers
based on next use, adding a use at a back edge ensures we do count
for loop uses.
Change-Id: Idaa882cb120edbdd08ca6bff142d326a8245bd14
David Brazdil [Wed, 29 Apr 2015 16:42:48 +0000 (16:42 +0000)]
Merge "ART: Fix loop information after dead code elimination"
David Brazdil [Wed, 29 Apr 2015 16:16:07 +0000 (17:16 +0100)]
ART: Fix loop information after dead code elimination
Compilation failed when only some blocks of a loop were removed during
dead code elimination.
Bug:
20680703
Change-Id: If31025169ca493f0d7f7f2788576e98d05f03394
Roland Levillain [Wed, 29 Apr 2015 15:30:17 +0000 (15:30 +0000)]
Merge "Factor MoveArguments methods in Optimizing's intrinsics handlers."
Narayan Kamath [Wed, 29 Apr 2015 14:31:27 +0000 (14:31 +0000)]
Merge "Add dependency on libbase."
Narayan Kamath [Tue, 28 Apr 2015 08:56:28 +0000 (09:56 +0100)]
Add dependency on libbase.
Used by the static libziparchive dependency on target.
Change-Id: Ib88dd67941f0679682bcae01346277ffe8d6df9b
Roland Levillain [Tue, 28 Apr 2015 14:50:20 +0000 (15:50 +0100)]
Factor MoveArguments methods in Optimizing's intrinsics handlers.
Also add a precondition similar to the one present in code
generators, regarding static invoke related explicit clinit
check elimination in non-baseline compilations.
Change-Id: I26f4dcb5d02824d7556f90b4b0c85b08b737fa53
Sebastien Hertz [Tue, 28 Apr 2015 10:31:41 +0000 (12:31 +0200)]
Fix missing transaction abort error message
Change-Id: I5157def06d385c082f9fdd4714e20bead9e707e8
Roland Levillain [Wed, 29 Apr 2015 13:37:57 +0000 (13:37 +0000)]
Merge "Refactor InvokeDexCallingConventionVisitor in Optimizing."
Roland Levillain [Tue, 28 Apr 2015 14:48:45 +0000 (15:48 +0100)]
Refactor InvokeDexCallingConventionVisitor in Optimizing.
Change-Id: I7ede0f59d5109644887bf5d39201d4e1bf043f34
Vladimir Marko [Wed, 29 Apr 2015 11:56:55 +0000 (11:56 +0000)]
Merge "Fix for incorrect encode and parse of PEXTRW instruction"
Roland Levillain [Wed, 29 Apr 2015 11:12:59 +0000 (11:12 +0000)]
Merge "Revert "Revert "Revert "[optimizing] Improve x86 shifts""""
Roland Levillain [Wed, 29 Apr 2015 11:12:33 +0000 (11:12 +0000)]
Revert "Revert "Revert "[optimizing] Improve x86 shifts"""
This reverts commit
9b95a057ee20e4b1ca2e9c663726482172dc9ba3.
Reverting this CL as it breaks libcore tests:
org.apache.harmony.tests.java.lang.DoubleTest#test_compare
junit.framework.AssertionFailedError: compare() -0.0 should be less 0.0
at junit.framework.Assert.assertTrue(Assert.java:140)
at org.apache.harmony.tests.java.lang.DoubleTest.test_compare(DoubleTest.java:258)
org.apache.harmony.tests.java.lang.DoubleTest#test_compare FAIL (EXEC_FAILED)
org.apache.harmony.tests.java.lang.DoubleTest#test_compareToLjava_lang_Double
junit.framework.AssertionFailedError: Assert 2: compare() -0.0 should be less 0.0
at junit.framework.Assert.assertTrue(Assert.java:140)
at org.apache.harmony.tests.java.lang.DoubleTest.test_compareToLjava_lang_Double(DoubleTest.java:1320)
org.apache.harmony.tests.java.lang.DoubleTest#test_compareToLjava_lang_Double FAIL (EXEC_FAILED)
Change-Id: I10f0ec8cc9495cc225fef1940b3f1a9fe87d996f
Nicolas Geoffray [Wed, 29 Apr 2015 10:34:20 +0000 (10:34 +0000)]
Merge "Bugs have been fixed, so run the tests."
Roland Levillain [Wed, 29 Apr 2015 10:23:07 +0000 (10:23 +0000)]
Merge "Add InsertInstructionAfter in HBasicBlock."
Roland Levillain [Wed, 29 Apr 2015 10:18:40 +0000 (10:18 +0000)]
Merge "Revert "Revert "[optimizing] Improve x86 shifts"""
Nicolas Geoffray [Wed, 29 Apr 2015 09:57:50 +0000 (10:57 +0100)]
Bugs have been fixed, so run the tests.
Change-Id: I6769cf244d246160b65d6dd4e4df0efb0aa8a7e5
Roland Levillain [Wed, 29 Apr 2015 09:22:37 +0000 (10:22 +0100)]
Revert "Revert "[optimizing] Improve x86 shifts""
This reverts commit
f9aac1e9f442c2486cd54f045d43e15791601205.
Don't use Location::Any() for the first input if the output is
Location::SameAsFirstInput().
Change-Id: I400834052b114abf0d616da1b4b6506f7bba10ab
Andreas Gampe [Wed, 29 Apr 2015 06:30:40 +0000 (06:30 +0000)]
Merge "ART: Move dex2oat watchdog output to LogLine"
Andreas Gampe [Wed, 29 Apr 2015 06:16:03 +0000 (23:16 -0700)]
ART: Move dex2oat watchdog output to LogLine
The fprintf isn't visible on device, as it doesn't end up in the
logcat.
Also increase the watchdog timeout to 10 minutes.
Bug:
20658562
Change-Id: I1fec8dae25f9282f72e762bda934fceb948bbd5f
nikolay serdjuk [Mon, 27 Apr 2015 11:52:57 +0000 (17:52 +0600)]
Fix for incorrect encode and parse of PEXTRW instruction
The instruction PEXTRW encoded by sequence 66 0F 3A 15
was incorrectly encoded in compiler table and incorrectly
parsed by disassembler.
Change-Id: Ib4d4db923cb15a76e74f13f6b5514cb0d1cbe164
Signed-off-by: nikolay serdjuk <nikolay.y.serdjuk@intel.com>
Andreas Gampe [Wed, 29 Apr 2015 05:10:04 +0000 (05:10 +0000)]
Merge "ART: Remove multidex limit"
Andreas Gampe [Tue, 28 Apr 2015 03:01:52 +0000 (20:01 -0700)]
ART: Remove multidex limit
Remove the arbitrary multidex limit. If users want to use many
files, allow them, but print a warning after a considerable amount.
Bug:
20071800
(cherry picked from commit
32c26b8f9b995250479c185172f4ffd881a59996)
Change-Id: Ic51c96b84042f769a7d33ec53fe587b68cd69df4
Mathieu Chartier [Tue, 28 Apr 2015 21:06:33 +0000 (21:06 +0000)]
Merge "Fix possible null deference in Throwable::Dump"
Mathieu Chartier [Tue, 28 Apr 2015 20:53:02 +0000 (13:53 -0700)]
Fix possible null deference in Throwable::Dump
Bug:
20640601
Change-Id: Ibd6081ed9ea16f320e505e06e690b8eddb1228ef
Jeff Hao [Tue, 28 Apr 2015 19:15:05 +0000 (19:15 +0000)]
Merge "Change ddmc run-test to make new objects instead of strings."
Jeff Hao [Tue, 28 Apr 2015 19:11:22 +0000 (12:11 -0700)]
Change ddmc run-test to make new objects instead of strings.
Before, the test was creating new strings until overflowing allocations,
which was half string objects and half character arrays. Now, it
allocates all strings with the character data, which is larger than
before, causing the test to run out of memory. Allocating only objects
prevents the test from running out of memory.
Change-Id: Icf3f0fd2ae847e76a9b8d5dfb762be92de16aaa3
Vladimir Marko [Tue, 28 Apr 2015 18:35:17 +0000 (18:35 +0000)]
Merge "Quick: Fix crash on fall-through out of method code."
Calin Juravle [Tue, 7 Apr 2015 18:43:36 +0000 (19:43 +0100)]
Quick: Fix crash on fall-through out of method code.
Fix Quick crash when the last insn has a fall-through out of
the method's code. Allow creation of an out-of-method block
and at the end of MIRGraph::InlineMethod() check if that
block is reachable. If it is, punt to interpreter. Add tests
for unreachable if-lt and packed-switch as the last insn.
Also fix MIRGraph::ProcessCanSwitch() to treat the offset to
the data as signed. Jumping over the data with a goto and
using it from a switch further down is valid. This was also
crashing (presumably only on 64-bit dex2oat).
Thanks to Stephen Kyle (stephenckyle@googlemail.com) for the
bug report.
Bug:
19988134
Change-Id: I627f4137f61901897bfb9a5252741c6ded3a1adb
Dan Albert [Tue, 28 Apr 2015 18:11:38 +0000 (18:11 +0000)]
Merge "Prevent undefined behavior in RosAlloc."
Dan Albert [Thu, 16 Apr 2015 18:50:30 +0000 (11:50 -0700)]
Prevent undefined behavior in RosAlloc.
In cases where remain == 0, the 32-bit value would be left shifted
32-bits, which is undefined behavior.
Change-Id: I6277279341b168536f928ce87375c395a1aa865c
Mathieu Chartier [Tue, 28 Apr 2015 17:47:45 +0000 (17:47 +0000)]
Merge "Fix some compaction bugs in string allocation"
Mathieu Chartier [Tue, 28 Apr 2015 17:01:28 +0000 (10:01 -0700)]
Fix some compaction bugs in string allocation
Change-Id: I2b8499c60de7690e1012d71bccba4ecd589da9af
David Srbecky [Tue, 28 Apr 2015 16:54:52 +0000 (17:54 +0100)]
Minor refactoring of ElfBuilder.
* Nest section builder classes within the main builder
class to reduce verbosity caused by templates.
* Move .eh_frame and .eh_frame_hdr section headers earlier
so that the section headers are sorted by file offset.
* Do not emit PT_NULL header if .eh_frame_hdr is missing.
None of these changes should have any material impact.
This CL just prepares ground for the following CL.
Change-Id: I56f9825892adb01d413a18ca10cb5c805cb8cd78
Sebastien Hertz [Tue, 28 Apr 2015 14:33:00 +0000 (14:33 +0000)]
Merge "Fix constructor access check through reflection"
Vladimir Marko [Tue, 28 Apr 2015 13:31:38 +0000 (13:31 +0000)]
Merge "ART: Add FOUR_ARG_DOWNCALL macro for MIPS64 entry points."