[PATCH] fix improper destination register in mpn/arm/invert_limb.asm

Kelly Anderson kelly at silka.with-linux.com
Wed Jul 6 03:52:17 CEST 2011


Hello,

A minor patch to fix a warning (gcc 4.6.1) about using r3 destination 
register when r3 is a source register.  Not sure how gcc handles it, but 
the arm spec states that it is not allowed.  This applies to libgmp 
5.0.2.  It passes all tests after patch is applied.

---------------------
--- ./mpn/arm/invert_limb.asm.orig    2011-05-08 03:49:29.000000000 -0600
+++ ./mpn/arm/invert_limb.asm    2011-07-04 23:57:22.000000000 -0600
@@ -27,7 +27,8 @@ L(2):    add    r2, pc, r2
      mov    r3, r3, asl #1
      ldrh    r3, [r3, r2]
      mov    r1, r3, asl #17
-    mul    r3, r3, r3
+    mul    r12, r3, r3
+    mov r3, r12
      umull    r12, r2, r3, r0
      sub    r1, r1, r2, asl #1
      umull    r12, r2, r1, r1
---------------------

Regards,

Kelly Anderson


More information about the gmp-bugs mailing list