Exception and suspend count polling on JNI bridge return.
Change-Id: I0e5597fcbdcdb88100b18d63323e7ba8d27f13fe
diff --git a/src/calling_convention_x86.cc b/src/calling_convention_x86.cc
index a72f361..f1b96a6 100644
--- a/src/calling_convention_x86.cc
+++ b/src/calling_convention_x86.cc
@@ -16,10 +16,13 @@
}
ManagedRegister CallingConvention::ReturnRegister() {
- if (GetMethod()->IsReturnAFloatOrDouble()) {
+ const Method *method = GetMethod();
+ if (method->IsReturnAFloatOrDouble()) {
return ManagedRegister::FromX87Register(ST0);
- } else if (GetMethod()->IsReturnALong()) {
+ } else if (method->IsReturnALong()) {
return ManagedRegister::FromRegisterPair(EAX_EDX);
+ } else if (method->IsReturnVoid()) {
+ return ManagedRegister::NoRegister();
} else {
return ManagedRegister::FromCpuRegister(EAX);
}