$NetBSD$

--- asmrun/arm.S.orig	2009-05-04 13:46:46.000000000 +0000
+++ asmrun/arm.S
@@ -38,7 +38,7 @@ caml_call_gc:
 	ldr	r12, .Lcaml_requested_size
 	ldr	r12, [r12, #0]
 	sub	alloc_ptr, alloc_ptr, r12
-        bx      lr
+        mov	pc,lr
 
         .globl caml_alloc1
 caml_alloc1:
@@ -128,7 +128,7 @@ caml_allocN:
         ldr     alloc_limit, [r12, #0]
     /* Return to caller */
         ldr     r12, [sp], #4
-        bx      r12
+        mov     pc,r12		/* optimize! */
 
 /* Call a C function from Caml */
 /* Function to call is in r12 */
@@ -149,13 +149,13 @@ caml_c_call:
         str     trap_ptr, [r7, #0]
     /* Call the function */
         mov     lr, pc
-        bx      r12
+        mov	pc,r12
     /* Reload alloc ptr and alloc limit */
         ldr     r5, .Lcaml_young_limit
         ldr     alloc_ptr, [r6, #0]    /* r6 still points to caml_young_ptr */
         ldr     alloc_limit, [r5, #0]
     /* Return */
-        bx      r4
+        mov	pc,r4
 
 /* Start the Caml program */
 
@@ -196,7 +196,7 @@ caml_start_program:
         ldr     alloc_limit, [r4, #0]
     /* Call the Caml code */
         mov     lr, pc
-        bx      r12
+        mov	pc,r12
 .Lcaml_retaddr:
     /* Pop the trap frame, restoring caml_exception_pointer */
         ldr     r4, .Lcaml_exception_pointer
@@ -220,7 +220,7 @@ caml_start_program:
         str     alloc_ptr, [r4, #0]
     /* Reload callee-save registers and return */
         ldmfd   sp!, {r4,r5,r6,r7,r8,r10,r11,lr}
-	bx	lr
+	mov	pc,lr
 
     /* The trap handler */
 .Ltrap_handler:
