Patchwork arm/lib1funcs.as: fix mismatch between conditions of an IT block

login
register
mail settings
Submitter Yvan ROUX
Date Nov. 19, 2010, 3:18 p.m.
Message ID <20101119151815.GB31199@gnx2494>
Download mbox | patch
Permalink /patch/72260/
State New
Headers show

Comments

Yvan ROUX - Nov. 19, 2010, 3:18 p.m.
Hi,

this patch fixes a build error that appears when compiling in thumb
and optimize for size mode (occurs in multibuild with configure 
--enable-target-optspace). It is OK ?

Cheers,
Yvan

2010-11-19  Yvan Roux  <yvan.roux@st.com>

	* config/arm/lib1funcs.asm (ARM_DIV_BODY): Fix mismatch between
	IT block instruction condition and the syntax of the instructions
	in its IT block.

---
Yvan ROUX - Dec. 17, 2010, 9:31 a.m.
Ping

	Yvan

On Fri, Nov 19, 2010 at 04:18:15PM +0100, Yvan ROUX wrote:
> Hi,
> 
> this patch fixes a build error that appears when compiling in thumb
> and optimize for size mode (occurs in multibuild with configure 
> --enable-target-optspace). Is it OK ?
> 
> Cheers,
> Yvan
> 
> 2010-11-19  Yvan Roux  <yvan.roux@st.com>
> 
> 	* config/arm/lib1funcs.asm (ARM_DIV_BODY): Fix mismatch between
> 	IT block instruction condition and the syntax of the instructions
> 	in its IT block.
> 
> ---
> 
> diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm
> index 085e690..2e76c01 100644
> --- a/gcc/config/arm/lib1funcs.asm
> +++ b/gcc/config/arm/lib1funcs.asm
> @@ -641,7 +641,7 @@ pc		.req	r15
>  	subhs	\dividend, \dividend, \divisor, lsr #3
>  	orrhs	\result,   \result,   \curbit,  lsr #3
>  	cmp	\dividend, #0			@ Early termination?
> -	do_it	hs, t
> +	do_it	ne, t
>  	movnes	\curbit,   \curbit,  lsr #4	@ No, any more bits to do?
>  	movne	\divisor,  \divisor, lsr #4
>  	bne	1b
>
Richard Earnshaw - Dec. 20, 2010, 5:17 p.m.
On Fri, 2010-12-17 at 10:31 +0100, Yvan ROUX wrote:
> Ping
> 
> 	Yvan
> 
> On Fri, Nov 19, 2010 at 04:18:15PM +0100, Yvan ROUX wrote:
> > Hi,
> > 
> > this patch fixes a build error that appears when compiling in thumb
> > and optimize for size mode (occurs in multibuild with configure 
> > --enable-target-optspace). Is it OK ?
> > 
> > Cheers,
> > Yvan
> > 
> > 2010-11-19  Yvan Roux  <yvan.roux@st.com>
> > 
> > 	* config/arm/lib1funcs.asm (ARM_DIV_BODY): Fix mismatch between
> > 	IT block instruction condition and the syntax of the instructions
> > 	in its IT block.
> > 

Thanks, I've put this in.  Sorry about the delay.

R.

Patch

diff --git a/gcc/config/arm/lib1funcs.asm b/gcc/config/arm/lib1funcs.asm
index 085e690..2e76c01 100644
--- a/gcc/config/arm/lib1funcs.asm
+++ b/gcc/config/arm/lib1funcs.asm
@@ -641,7 +641,7 @@  pc		.req	r15
 	subhs	\dividend, \dividend, \divisor, lsr #3
 	orrhs	\result,   \result,   \curbit,  lsr #3
 	cmp	\dividend, #0			@ Early termination?
-	do_it	hs, t
+	do_it	ne, t
 	movnes	\curbit,   \curbit,  lsr #4	@ No, any more bits to do?
 	movne	\divisor,  \divisor, lsr #4
 	bne	1b