*
* Copyright (C) 2000 Intel Corporation. All rights reserved.
* Copyright (C) 2001, 2002 Ximian, Inc.
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#ifndef X86_H
#endif /* __native_client_codegen__ */
+#define x86_mfence(inst) \
+ do { \
+ x86_codegen_pre(&(inst), 3); \
+ *(inst)++ = 0x0f; \
+ *(inst)++ = 0xae; \
+ *(inst)++ = 0xf0; \
+ } while (0)
+
#define x86_rdtsc(inst) \
do { \
x86_codegen_pre(&(inst), 2); \
} else { \
x86_codegen_pre(&(inst), 6); \
*(inst)++ = (unsigned char)0x69; \
- x86_reg_emit ((inst), (reg), (mem)); \
+ x86_mem_emit ((inst), (reg), (mem)); \
x86_imm_emit32 ((inst), (imm)); \
} \
} while (0)