First set of licensing changes
[mono.git] / mono / arch / x86 / x86-codegen.h
index ced466eaf1407c509f05e76eca52389a7a38d575..6c9d63f37e991fc8cbaeedf8ce4fd635695253c3 100644 (file)
@@ -10,6 +10,7 @@
  * 
  * 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
@@ -522,6 +523,14 @@ typedef union {
 
 #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); \
@@ -1039,7 +1048,7 @@ typedef union {
                } 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)