On Tue, Mar 20, 2012 at 2:27 PM, Stefan Kristiansson <
[email protected]> wrote:

> On 03/20/2012 09:10 PM, Matthew Hicks wrote:
>
>>
>> It doesn't as r0 will not be set to 0 in some environments.  In some
>> cases 32'hXXXXXXXX AND 32'h0 != 32'h0, but l.movhi r0, 0 always sets r0 =
>> 32'h0.  Note that r0 starts in ModelSim with the value 32'hXXXXXXXX.
>>
>>
>>
> in what cases?
> 32'hxxxxxxxx & 32'h0 _should_ be 32'h0
>
> Stefan
>

I did some reading through my old patch and it appears that the change made
in Jan. 2010 is fine, but the code that was still in the kernel in Dec.
2011 was erroneous as it used OR instead of AND.  It is clear that OR'ing
an uninitialized value with anything will result in an uninitialized value.


---Matthew Hicks
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to