
ken.werner at linaro
Dec 21, 2011, 9:18 AM
Views: 503
Permalink
|
|
[PATCH] Small fix for umul_ppmm on ARM
|
|
Hi There, Currently the definition of umul_ppmm (longlong.h) looks like this: #define umul_ppmm(xh, xl, a, b) \ __asm__ ("%@ Inlined umul_ppmm\n" \ "umull %r1, %r0, %r2, %r3" \ : "=&r" ((USItype)(xh)), \ "=r" ((USItype)(xl)) \ : "r" ((USItype)(a)), \ "r" ((USItype)(b)) \ : "r0", "r1") This code generates the following assembler error message when compiling for -march=armv5te: Error: selected processor does not support Thumb mode `umull r5,ip,r5,r3' In ARM mode the input register of the umull must be different from the output register. This limitation does not exists for the Thumb mode but in my case the compiler was restricted to ARMv5 that doesn't support Thumb. One way to fix this would be to mark "xl" as early clobbered. The code was introduced by this patch: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commitdiff;h=487fe72494051de4a7e513c15b6a895dcd0164ce#patch9 Ken Werner (1): Mark 'xl' as early clobbered mpi/longlong.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) Best Regards, Ken -- 1.7.5.4 _______________________________________________ Gcrypt-devel mailing list Gcrypt-devel [at] gnupg http://lists.gnupg.org/mailman/listinfo/gcrypt-devel
|