Re: Help with SH2E -O2 instruction ordering with volatile

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/12/15 10:33, Andrew Haley wrote:
> On 20/12/15 07:14, Alex Brown wrote:
>> I know the code is somewhat weird ;-)
>>
>> Basically peripheral.e wants the address of a null terminated string
>> (not the char value).
>>
>> My "platform/emulator" will use DMA to extract the string from RAM
>> before the next instruction is executed.
>>
>> The issue is that at the time the address is assigned to peripheral.e
>> is seems the values of the text array have not yet been written to the
>> stack (or that's what I thing I am seeing).
>>
>> Making "text" volatile makes it output code that makes sense to me.

Ah, I just looked at the code again.  For this to be really correct,
there has to be some sort of barrier after text is written.  Sorry.

Andrew.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux