List Info

Thread: Strange shifting variables




Strange shifting variables
country flaguser name
United States
2008-03-28 12:30:18



Thank you!

I wasn't using the -mcpu=arm9 option, but now I am. But
unfortunately, I'm still getting this shift ... but only on arm .. my
code doesn't do this on my x86 board. So, the data is written to a
register after the case statement, ... what happens to it next? Why
the shift? Seems like a compiler optimization problem.

Thank you for any help!
Eric

__._,_.___
.

__,_._,___
Re: Strange shifting variables
country flaguser name
United States
2008-03-28 12:38:43

Insure that your pointers to registers are declared with "volatile".

Frequently programmers, including me (only sometimes), think there's a
compiler bug but it turns out it's poor programming. Remember, there's
a good chance that the compiler version you're using has been used to
build the Linux kernel and the compiler was probably also used to
build itself (or the next version of the compiler). Usually, if that
kind of compilation is done it will show compiler bugs. Your code is
still pretty simple in comparison (and most of mine is too).

----
Andy

--- In ts-7000%40yahoogroups.com">ts-7000yahoogroups.com, "berryma4" <berryma4...> wrote:
&gt;
>
>
> Thank you!
>;
> I wasn't using the -mcpu=arm9 option, but now I am. But
> unfortunately, I'm still getting this shift ... but only on arm .. my
> code doesn't do this on my x86 board. So, the data is written to a
> register after the case statement, ... what happens to it next? Why
> the shift? Seems like a compiler optimization problem.
>
> Thank you for any help!
&gt; Eric
>;

__._,_.___
.

__,_._,___
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )