diff --git a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
index e2c71a5..df78163 100644
--- a/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
+++ b/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
@@ -205,16 +205,25 @@ NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
     "ldr	r1, [%1, #12]	\n\t"	/* prepare to call invoke_count_words	*/
     "ldr	ip, [%1, #16]	\n\t"	/* r0=paramCount, r1=params		*/
     "ldr	r0, [%1,  #8]	\n\t"
+#ifdef __thumb__
+    "blx	ip		\n\t"	/* call it... */
+#else
     "mov	lr, pc		\n\t"	/* call it...				*/
     "mov	pc, ip		\n\t"
+#endif
     "mov	r4, r0, lsl #2	\n\t"	/* This is the amount of bytes needed.	*/
     "sub	sp, sp, r4	\n\t"	/* use stack space for the args...	*/
     "mov	r0, sp		\n\t"	/* prepare a pointer an the stack	*/
     "ldr	r1, [%1,  #8]	\n\t"	/* =paramCount				*/
     "ldr	r2, [%1, #12]	\n\t"	/* =params				*/
     "ldr	ip, [%1, #20]	\n\t"	/* =invoke_copy_to_stack		*/
+#ifdef __thumb__
+    "blx	ip		\n\t"   /* copy args to the stack like the
+                                         * compiler would */
+#else
     "mov	lr, pc		\n\t"	/* copy args to the stack like the	*/
     "mov	pc, ip		\n\t"	/* compiler would.			*/
+#endif
     "ldr	r0, [%1]	\n\t"	/* =that				*/
     "ldr	r1, [r0, #0]	\n\t"	/* get that->vtable offset		*/
     "ldr	r2, [%1, #4]	\n\t"
@@ -238,8 +247,12 @@ NS_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
     "addle	sp, sp, r4	\n\t"	/*      and restore stack pointer	*/
     "movle	r4, #0		\n\t"	/*	a mark for restoring sp		*/
     "ldr	r0, [%1, #0]	\n\t"	/* get (self)				*/
-    "mov	lr, pc		\n\t"	/* call mathod				*/
+#ifdef __thumb__
+    "blx	ip		\n\t"	/* call method */
+#else
+    "mov	lr, pc		\n\t"	/* call method				*/
     "mov	pc, ip		\n\t"
+#endif
     "add	sp, sp, r4	\n\t"	/* restore stack pointer		*/
     "mov	%0, r0		\n\t"	/* the result...			*/
     : "=r" (result)
