[Top][All Lists]

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

Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192

From: Wouter van Gulik
Subject: Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192
Date: Thu, 17 Apr 2008 09:57:01 +0200
User-agent: Thunderbird (Windows/20080213)

Andy H schreef:
> I think I have found a simple fix.
> I changed gcc so that offsets added to assembler symbols are doubled. So
> in c when we use &foo+2 this gets send to assembler/linker as gs(foo+4).
> This has the effect that offsets or arithmetic are consistently in words
> - on a word pointer. (which makes more sense)
> Now it does not matter if optimisation  creates  p=&foo+2  OR p=&foo,
> p=p+2 as the result will be the same.
> I attach test program I used to check several variant and it worked.
> Apart from normal warning messages about linker stubs. There also lst
> and lss files you can look at what gets send to assembler and code
> produced.

It looks ok to me (just looking at the lss, not rebuilding gcc)
but the code is not optimal. It is moving to r18 doing the operation and then moving it back to r24. Is this because of your patch? Or something else?



reply via email to

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