Support for exception throwing.

These changes start to add support for a long jump style of exception throw.
A Context is added to build up the registers that will be loaded by the long
jump from callee saves that are on the stack. Throws are reworked slightly to
give the PC for the frame of the method being looked at, rather than the return
PC (that previously led the trace's PC to be off by a frame). Callee save
support is added to the JNI compiler which then no longer needs to spill
incoming argument registers as it may reuse the callee saves.

Currently the code is lightly tested on ARM and doesn't support
restoring floating point callee save registers.

Also clean up some PIC TODOs.

Change-Id: I9bcef4ab3bf4a9de57d7a5123fb3bb1707ca8921
diff --git a/src/stub_arm.cc b/src/stub_arm.cc
index 0711085..986d2b0 100644
--- a/src/stub_arm.cc
+++ b/src/stub_arm.cc
@@ -11,7 +11,7 @@
 
 typedef void (*ThrowAme)(Method*, Thread*);
 
-ByteArray* CreateAbstractMethodErrorStub(ThrowAme throw_ame) {
+ByteArray* CreateAbstractMethodErrorStub() {
   UniquePtr<ArmAssembler> assembler( static_cast<ArmAssembler*>(Assembler::Create(kArm)) );
 
   // R0 is the Method* already.
@@ -19,8 +19,8 @@
   // Pass Thread::Current() in R1
   __ mov(R1, ShifterOperand(R9));
 
-  // Call throw_ame to throw AbstractMethodError
-  __ LoadImmediate(R12, reinterpret_cast<int32_t>(throw_ame));
+  // Call to throw AbstractMethodError
+  __ LoadFromOffset(kLoadWord, R12, TR, OFFSETOF_MEMBER(Thread, pThrowAbstractMethodErrorFromCode));
   // Leaf call to routine that never returns
   __ mov(PC, ShifterOperand(R12));