Make exception logging a little prettier.

Convert the class descriptor to dotted form when logging an exception
from the VM (e.g. when CheckJNI gets upset).  Instead of

  Ljava/lang/Throwable;: yikes
    at android.test.JNITest.part1a(Native Method)

we now show:

  java.lang.Throwable: yikes
    at android.test.JNITest.part1a(Native Method)

Change-Id: I8b65920b85f03a1871e6a417b43b269b448340d5

Conflicts:
	vm/Exception.cpp
Use Throwable.getMessage() when logging exceptions.

The VM's internal exception logger was pulling the exception's detail
message out of a field in Throwable.  This gets the wrong answer when
the exception overrides getMessage().

The VM now invokes the appropriate getMessage() method and displays
that instead.  This is of particular interest in CheckJNI failure
messages.

Also, don't assert that switching from "running" to "running" is
a problem.  It's a bit weird, but there's nothing wrong with it,
and there's a fair chance that the updated exception log function
will do it.

Bug 2845581

Change-Id: Id8d77221129ae7b45473e700a79a335164049362

Conflicts:
	vm/Exception.cpp
	vm/Thread.cpp
Provide "ordered" put calls.

Implement "ordered" Unsafe "put" calls, which are less expensive than
the volatile puts but provide more guarantees that plain puts.  The
implementation is just a clone of the basic "put" functions with the
new store fence macro inserted.

Bug 2579452

Change-Id: If08f5d51d3ea47a4ff0925a86ad8e168721c9e55
Check at startup that we can resolve all the inline natives.

Also fix a bug where we'd dereference NULL if an inline native's class failed
to resolve.

Also merge this method lookup with Optimize.c's (superior) near-duplicate.

Change-Id: Ic7a95e1f7445b6c9964ddd5e2e1d14d70792a622

Conflicts:
	vm/Init.cpp
	vm/InlineNative.cpp
	vm/analysis/Optimize.cpp
Staticify.

Mark some functions "static".

Change-Id: Ia80bccab1f72690729e43f99783d34fe366108b2
Add source code skeletons for x86 work.  No actual JIT'ng yet.

Change-Id: Ic94a916e777e9bc5163cf205899daf9c18dcafe1

Conflicts:
	vm/Dvm.mk
x86 mterp: reduce x86/x86-atom differences

To ease future x86 development, elminate unnecessary differences
between x86 and x86-atom targets.

1.  Macros instead of defines (cosmetic change)
2.  Register naming convention (cosmetic change)
3.  Register usage convention
    - Drop rIBASE, freeing %edx for general usage
    - use %edi for rPC (callee-save) & eliminate spills
4.  Spill & temp frame layout
5.  rGLUE usage 0(%ebp) instead of -24(%ebp)
6.  Jump table transition between instruction interpretations
    instead of computed goto.
7.  Change entry convention for instruction handlers:
    Previously:
       %bl contains 8-bit Dalvik opcode
       %bh contains 2nd half of 16-bit Dalvik insn (usually AA or BA)
       upper 16 bits of %ebx are zero
    Now:
       %bl contains 2nd half of 16-bit Dalvik insn (usually AA or BA)
       upper 24 bits of %ebx are zero
8.  Include copies of x86-atom macros and defines into x86 build.  This
    allows the x86 build to mix-and-match x86 and x86-atom handlers
    via the normal config mechanism.  [Note - only for non-control-flow
    instructions.  There are still some conflicts in the footer.S
    main loop re-entry points].

Change-Id: Ib9d549b56f7ffd7420f9dbf97b2169f65603ee83

Conflicts:
	vm/mterp/out/InterpAsm-x86.S
	vm/mterp/x86/OP_APUT_OBJECT.S
	vm/mterp/x86/OP_IPUT_OBJECT.S
	vm/mterp/x86/OP_SPUT_OBJECT.S
Fix 64-bit 3-operand multiplication in x86 mterp.

rPC was being unspilled a bit late.

Change-Id: Idf73b9eeeb972f3fb1861224397d0592c6d3bb2f

Conflicts:
	vm/mterp/out/InterpAsm-x86.S
Fix getExceptionMessage().

dvmAddTrackedAlloc() doesn't like NULL objects.

Bug 3023981.

Change-Id: I181e4dab841b063d9e2f450292732d808e70aaba
Fix x86 mterp "longjmp"

The recent x86 mterp update failed to properly restore callee save
registers when returning from the call to dvmMterpStdRun.

Change-Id: Ied73cc5fb380a6375d1f71ce679003fbc293d08d

Conflicts:
	vm/mterp/out/InterpAsm-x86.S
Fail early rather than crippling the GC if -Xms == -Xmx.

We should revert this when the bug is fixed.

Bug: 2714377
Change-Id: Ie3600ef60fea5e4e5988680042c7e2e595bdc622
Fix OP_USHR_LONG in x86 mterp (Issue 3038137)

Change https://android-git.corp.google.com/g/#change,67744 introduced
bad hand-scheduling in 64-bit unsigned 3-operand right shifts which
clobbered the result before storing it.

Change-Id: Ic862fa683092d09476510d78e5edd1735f09f8c2

Conflicts:
	vm/mterp/out/InterpAsm-x86.S
Be more explicit in our -Xms == -Xmx message, and stop pretending we'll fix it.

This is only going to be fixed by removing the notion of external allocations.
I'll add a note to that bug that we should remove this check entirely.

Bug: 2714377
Change-Id: If84bd98676fcc1e2d4f9f234d547553d256f5785
Use DMB ST for store fence.

Change-Id: I4bde544a7c66e30a1756425ec088e53baa2f11a1