Current-Users archive

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

Re: VirtualBox-6.0.6 fails build under 8.99.39

On Thu, May 30, 2019 at 09:32:24PM +0100, Chavdar Ivanov wrote:
> error: 'asm' undeclared (first use in this function)
>   asm volatile ("pause");
>   ^~~
> ...............
> (I had to revert to the original cpufunc.h as the cvs update was failing).
> What is the solution here - should I continue to locally modify
> cpufunc.h from the NetBSD src/sys/arch/x86/include/ ? What is the
> purpose of having 'asm volatile' if __asm__ does the job (and volatile
> is a NOP anyway, according to the gcc manual, it is considered
> volatile without the keyword)?

volatile is *not* a nop. It prevents the statement from being optimised
away as having no side effects.


Home | Main Index | Thread Index | Old Index