[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 2.0.0.12 (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?
HTH,
Wouter
- Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192, (continued)
- Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192, Dave N6NZ, 2008/04/16
- Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192, Dmitry K., 2008/04/16
- [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Weddington, Eric, 2008/04/16
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Andy H, 2008/04/16
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Dave N6NZ, 2008/04/16
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Andy H, 2008/04/18
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Dave N6NZ, 2008/04/19
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192, Andy H, 2008/04/19
- Re: [avr-gcc-list] RE: Patch Fix PR35013, PR27192,
Wouter van Gulik <=
Re: [avr-gcc-list] Re: Patch Fix PR35013, PR27192, Wouter van Gulik, 2008/04/16