Exception and suspend count polling on JNI bridge return.

Change-Id: I0e5597fcbdcdb88100b18d63323e7ba8d27f13fe
diff --git a/src/assembler_x86.h b/src/assembler_x86.h
index a32191f..e446c51 100644
--- a/src/assembler_x86.h
+++ b/src/assembler_x86.h
@@ -445,6 +445,8 @@
 
   void StoreStackOffsetToThread(ThreadOffset thr_offs, FrameOffset fr_offs,
                                 ManagedRegister scratch);
+  void StoreStackPointerToThread(ThreadOffset thr_offs);
+
   void Move(ManagedRegister dest, ManagedRegister src);
 
   void Copy(FrameOffset dest, FrameOffset src, ManagedRegister scratch,
@@ -463,6 +465,16 @@
 
   void Call(ManagedRegister base, Offset 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
+  // at the next instruction.
+  void SuspendPoll(ManagedRegister scratch, ManagedRegister return_reg,
+                   FrameOffset return_save_location, size_t return_size);
+
+  // Generate code to check if Thread::Current()->exception_ is non-null
+  // and branch to a ExceptionSlowPath if it is.
+  void ExceptionPoll(ManagedRegister scratch);
+
   void AddImmediate(Register reg, const Immediate& imm);
 
   void LoadDoubleConstant(XmmRegister dst, double value);
@@ -484,6 +496,8 @@
   void Align(int alignment, int offset);
   void Bind(Label* label);
 
+  void EmitSlowPaths() { buffer_.EmitSlowPaths(this); }
+
   size_t CodeSize() const { return buffer_.Size(); }
 
   void FinalizeInstructions(const MemoryRegion& region) {