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/assembler_x86.h b/src/assembler_x86.h
index c893633..86069be 100644
--- a/src/assembler_x86.h
+++ b/src/assembler_x86.h
@@ -221,6 +221,7 @@
   void movl(Register dst, const Address& src);
   void movl(const Address& dst, Register src);
   void movl(const Address& dst, const Immediate& imm);
+  void movl(const Address& dst, Label* lbl);
 
   void movzxb(Register dst, ByteRegister src);
   void movzxb(Register dst, const Address& src);
@@ -444,15 +445,11 @@
 
   // Emit code that will create an activation on the stack
   virtual void BuildFrame(size_t frame_size, ManagedRegister method_reg,
-                          const std::vector<ManagedRegister>& spill_regs);
+                          const std::vector<ManagedRegister>& callee_save_regs);
 
   // Emit code that will remove an activation from the stack
   virtual void RemoveFrame(size_t frame_size,
-                           const std::vector<ManagedRegister>& spill_regs);
-
-  // Fill list of registers from spill area
-  virtual void FillFromSpillArea(const std::vector<ManagedRegister>& spill_regs,
-                                 size_t displacement);
+                           const std::vector<ManagedRegister>& callee_save_regs);
 
   virtual void IncreaseFrameSize(size_t adjust);
   virtual void DecreaseFrameSize(size_t adjust);
@@ -474,6 +471,8 @@
 
   virtual void StoreStackPointerToThread(ThreadOffset thr_offs);
 
+  void StoreLabelToThread(ThreadOffset thr_offs, Label* lbl);
+
   virtual void StoreSpanning(FrameOffset dest, ManagedRegister src,
                              FrameOffset in_off, ManagedRegister scratch);
 
@@ -537,7 +536,7 @@
                     ManagedRegister scratch);
   virtual void Call(FrameOffset base, Offset offset,
                     ManagedRegister scratch);
-  virtual void Call(uintptr_t addr, ManagedRegister scratch);
+  virtual void Call(ThreadOffset offset, ManagedRegister scratch);
 
   // Generate code to check if Thread::Current()->suspend_count_ is non-zero
   // and branch to a SuspendSlowPath if it is. The SuspendSlowPath will continue