--- a/libffi/src/mips/o32.S
+++ b/libffi/src/mips/o32.S
@@ -367,6 +367,7 @@ $do_closure:
 	li	$9, FFI_TYPE_VOID
 	beq	$8, $9, closure_done
 
+#ifndef __mips_soft_float
 	li	$13, 1		# FFI_O32
 	bne	$16, $13, 1f	# Skip fp restore if FFI_O32_SOFT_FLOAT
 
@@ -380,6 +381,7 @@ $do_closure:
 	beq	$8, $9, closure_done
 #endif
 1:	
+#endif
 	REG_L	$3, V1_OFF2($fp)
 	REG_L	$2, V0_OFF2($fp)
 
