Remove instances of __i386__, except from tests and imported headers. Drop a block containing sanity check and fprintf error message for i386-on-i386 or x86_64-on-x86_64 emulation. If we really want something like this, we would do it via some form of compile-time check. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
26 lines
665 B
C
26 lines
665 B
C
/*
|
|
* Copyright (C) 2016, Emilio G. Cota <cota@braap.org>
|
|
*
|
|
* License: GNU GPL, version 2.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
#ifndef QEMU_PROCESSOR_H
|
|
#define QEMU_PROCESSOR_H
|
|
|
|
#if defined(__x86_64__)
|
|
# define cpu_relax() asm volatile("rep; nop" ::: "memory")
|
|
|
|
#elif defined(__aarch64__)
|
|
# define cpu_relax() asm volatile("yield" ::: "memory")
|
|
|
|
#elif defined(__powerpc64__)
|
|
/* set Hardware Multi-Threading (HMT) priority to low; then back to medium */
|
|
# define cpu_relax() asm volatile("or 1, 1, 1;" \
|
|
"or 2, 2, 2;" ::: "memory")
|
|
|
|
#else
|
|
# define cpu_relax() barrier()
|
|
#endif
|
|
|
|
#endif /* QEMU_PROCESSOR_H */
|