Have you tried looking at the assembly code that your compiler is
outputting for this section of code? Could it be sticking some kind of
extra instructions that are causing this behavior?


On Thu, Aug 29, 2013 at 11:58 AM, Hamid Mushtaq - EWI
<[email protected]>wrote:

>  Hi,****
>
> ** **
>
> I have noticed that when I use a volatile variable in a loop, I get an L1
> cache miss each time I access that volatile variable. So I guess this is a
> bug in the simulator. For example, for this code.****
>
> ** **
>
> x = volatile_variable;****
>
> y = volatile_variable; ****
>
> z = volatile_variable;****
>
> ** **
>
> Here, I will have 3 cache misses, even when the volatile variable is
> accesses immediately three times, that is, the first time it should be
> loaded into the cache and thereafter accessed from there. But that doesn’t
> happen. ****
>
> ** **
>
> Regards,****
>
> Hamid.****
>
> _______________________________________________
> http://www.marss86.org
> Marss86-Devel mailing list
> [email protected]
> https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
>
>
_______________________________________________
http://www.marss86.org
Marss86-Devel mailing list
[email protected]
https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel

Reply via email to