avr-chat
[Top][All Lists]
Advanced

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

RE: [avr-chat] Missed Optimisation ?


From: Boyapati, Anitha
Subject: RE: [avr-chat] Missed Optimisation ?
Date: Wed, 2 Mar 2011 13:27:43 +0800


>
>       result |= 0x80000000;
> 626:  80 91 5a 02     lds     r24, 0x025A
> 62a:  90 91 5b 02     lds     r25, 0x025B
> 62e:  a0 91 5c 02     lds     r26, 0x025C
> 632:  b0 91 5d 02     lds     r27, 0x025D
> 636:  b0 68           ori     r27, 0x80       ; 128
> 638:  80 93 5a 02     sts     0x025A, r24
> 63c:  90 93 5b 02     sts     0x025B, r25
> 640:  a0 93 5c 02     sts     0x025C, r26
> 644:  b0 93 5d 02     sts     0x025D, r27
>
>The compiler has loaded all 4 bytes of the uint32_t, but only operated
>on one of them, so it seems 'clever' enough to see that the immediate
>value is full of '0' and not bother to OR the lower bytes but still
>loads and saves them.

OK. I now get it. The question is why store the 'other' bytes when it is not 
modified. Please ignore the other post where I thought why only 1 byte is being 
'OR' ed. 


Anitha



reply via email to

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