Peter Osterlund wrote:
>> mov <mem1>,eax
>> mov eax,<mem2>
>> mov <mem1>,eax ; eax already contains mem1 you stupid compiler
>> ret
>
> Not necessarily if mem2 == mem1 + 2. Consider this code:
I realized after sending that last that I should have added that there
were no volatiles and no aliasing possible. This was the kernel code:
return conf->last_used = new_disk;
(new_disk is a local variable, conf is a function arg.)
------
Chuck
On Fri, 2003-05-02 at 03:04, Chuck Ebbert wrote:
> I realized after sending that last that I should have added that there
> were no volatiles and no aliasing possible. This was the kernel code:
>
> return conf->last_used = new_disk;
>
> (new_disk is a local variable, conf is a function arg.)
Since new_disk is on the stack, is there something about 'conf'
that guarenetes it is not on the stack too? F.e. what if
&conf->last_used were one byte into 'new_disk' or something
like that.
Probably this is all illegal...
--
David S. Miller <[email protected]>