avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avr-gcc-list] Bug in *rotlsi3 insns?


From: Weddington, Eric
Subject: RE: [avr-gcc-list] Bug in *rotlsi3 insns?
Date: Mon, 23 Mar 2009 12:55:57 -0600

 

> -----Original Message-----
> From: 
> address@hidden 
> [mailto:address@hidden
> org] On Behalf Of Georg-Johann Lay
> Sent: Monday, March 23, 2009 1:49 PM
> To: address@hidden
> Subject: Re: [avr-gcc-list] Bug in *rotlsi3 insns?
> 
> Georg-Johann Lay schrieb:
> > Hi, im just browsing avr.md in trunk and stumbled over some 
> new patterns 
> > that implement rotlsi3.
> > 
> > IMHO, they are buggy. But I have no testcase to make it explicit.
> 
> Consider this test case:
> 
> unsigned long rotl (int dummy, unsigned long x)
> {
>      return (x << 8) | (x >> 24);
> }
> 
> Compile with, e.g.
>     avr-gcc -mmcu=atmega8 -S -Os -fno-split-wide-types
> to get
> 
> rotl:
> /* prologue: function */
> /* frame size = 0 */
>       mov r22,r23
>       mov r23,r20
>       mov r24,r21
>       mov r25,r22
> /* epilogue start */
>       ret
> 
> This will map 0x33221100 to 0x33110033 instead of to 0x22110033

What do you get if you drop -fno-split-wide-types?

And what version is this on?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]