Just checked.
do not use volatile.
If you compile the code w/o volatile modifier, you'll see why higher
optimization option forces some 'extra' reload (you'll see that is saves at
least 4 cycles).
For more info - doc.txt (#line 1541)
~d
On Saturday 04 January 2003 01:09, Mark Stokes wrote:
> However the second "if" test _Doesn't_ do what I want. I want to
> remove the extra R15 loads that are not even being used.
> Example:
> int16 = (unsigned int)int32;
> 1184: 1e 42 04 02 mov &0x0204,r14
> 1188: 1f 42 06 02 mov &0x0206,r15 <<-- not
> needed!!
> 118c: 82 4e 02 02 mov r14, &0x0202
>
> I also want the assignments and compares to perform on the RAM directly,
> since it can. This would save the register loads. Example:
>
> 1184: 92 42 04 02 02 02 mov &0x0204,&0x0202 ;src
> addr 0x0204
--
*********************************************************************
("`-''-/").___..--''"`-._ (\ Dimmy the Wild UA1ACZ
`6_ 6 ) `-. ( ).`-.__.`) Enterprise Information Sys
(_Y_.)' ._ ) `._ `. ``-..-' Nevsky prospekt, 20 / 44
_..`--'_..-_/ /--'_.' ,' Saint Petersburg, Russia
(il),-'' (li),' ((!.-' +7 (812) 314-8860, 5585314
*********************************************************************