From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Schwab To: "Philippe De Muyter" Cc: jvickers@dial.pipex.com (John Vickers), smurf@noris.de, egcs@cygnus.com Subject: Re: Incrementing volatiles? Date: Mon, 13 Jul 1998 02:40:00 -0000 Message-id: References: <199807130936.LAA03530@mail.macqel.be> X-SW-Source: 1998-07/msg00443.html "Philippe De Muyter" writes: |> Sorry to be slightly off-topic, but this discussion reminds me a problem |> I encountered some months ago when writing a driver for a VME board in |> an AIX powerpc environment. Although I had declared all the registers |> of the chips on the board as volatile, and compiled my driver with gcc, |> I saw with a logic analyser on the VME bus that the accesses to the |> register on the board were not done in the order I had written them. |> To solve that problem, I had to manually add asm("eieio") after each |> access to a volatile register. Should gcc not do that for me ? I don't think so. It's the responsibility of the system software to make sure that accesses to hardware registers are uncached and serialized. -- Andreas Schwab "And now for something schwab@issan.informatik.uni-dortmund.de completely different" schwab@gnu.org