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

Kelly Anderson kelly at silka.with-linux.com
Wed Jul 6 10:26:05 CEST 2011



-------- Original Message --------
Subject: 	Re: [PATCH] fix improper destination register in 
mpn/arm/invert_limb.asm
Date: 	Wed, 06 Jul 2011 00:18:20 -0600
From: 	Kelly Anderson <kelly at silka.with-linux.com>
To: 	Torbjorn Granlund <tg at gmplib.org>



On 07/05/11 23:57, Torbjorn Granlund wrote:
> Kelly Anderson<kelly at silka.with-linux.com>  writes:
>
>    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.
>
> I don't think any ARM implementations`actually have problems with reuse
> of a source register as destination.  At any rate, if we worry about it,
> we should not put in an additional mov instruction, but instead somehow
> remap subsequent register usage.
I wanted a patch that was easily understood as a first go, that's why I 
didn't shuffle register usage around.  Shouldn't be too hard to change 
the register usage in the line or two following the change.
> (It is surely the assembler, from the binutils package, that emits those
> warnings.  Gcc does not inspect assembly code.)
>


More information about the gmp-bugs mailing list