* src/vm/jit/x86_64/codegen.h: Generate mfence instruction.
authorStefan Ring <stefan@complang.tuwien.ac.at>
Tue, 22 Sep 2009 15:42:08 +0000 (17:42 +0200)
committerStefan Ring <stefan@complang.tuwien.ac.at>
Tue, 22 Sep 2009 15:42:08 +0000 (17:42 +0200)
* src/vm/jit/x86_64/emit.c, src/vm/jit/x86_64/emit.h: Likewise.
(transplanted from 864ea9d2c217)

src/vm/jit/x86_64/codegen.h
src/vm/jit/x86_64/emit.c
src/vm/jit/x86_64/emit.h

index ce8576e3d9bb421ef6e4e3ca246d2bad44bff592..d5b1367df78b718b3c234efb49de5e9658238b56 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/jit/x86_64/codegen.h - code generation macros for x86_64
 
-   Copyright (C) 1996-2005, 2006, 2007, 2008
+   Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
    CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
 /* system instructions ********************************************************/
 
+#define M_MFENCE                emit_mfence(cd)
 #define M_RDTSC                 emit_rdtsc(cd)
 
 #define M_IINC_MEMBASE(a,b)     emit_incl_membase(cd, (a), (b))
  * c-basic-offset: 4
  * tab-width: 4
  * End:
+ * vim:noexpandtab:sw=4:ts=4:
  */
index 9f1a35f957927e066c8dffc525698325ef438688..83dcdc4011a402309c2521b526df17de7232bc94 100644 (file)
@@ -2573,6 +2573,13 @@ void emit_rdtsc(codegendata *cd)
        *(cd->mcodeptr++) = 0x31;
 }
 
+void emit_mfence(codegendata *cd)
+{
+       *(cd->mcodeptr++) = 0x0f;
+       *(cd->mcodeptr++) = 0xae;
+       *(cd->mcodeptr++) = 0xf0;
+}
+
 
 /*
  * These are local overrides for various environment variables in Emacs.
@@ -2585,4 +2592,5 @@ void emit_rdtsc(codegendata *cd)
  * c-basic-offset: 4
  * tab-width: 4
  * End:
+ * vim:noexpandtab:sw=4:ts=4:
  */
index 790f659a9aa1b6e8889519066c64f63e1470a208..be63a50347511089e6bdfa5b3cdb20bc4341418b 100644 (file)
@@ -1,9 +1,7 @@
 /* src/vm/jit/x86_64/emit.h - machine dependent emit function prototypes
 
-   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006, 2007, 2008, 2009
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
@@ -366,6 +364,7 @@ void emit_xorpd_membase_reg(codegendata *cd, s8 basereg, s8 disp, s8 dreg);
 /* system instructions ********************************************************/
 
 void emit_rdtsc(codegendata *cd);
+void emit_mfence(codegendata *cd);
 
 
 /**
@@ -393,4 +392,5 @@ static inline void emit_recompute_pv(codegendata* cd) {}
  * c-basic-offset: 4
  * tab-width: 4
  * End:
+ * vim:noexpandtab:sw=4:ts=4:
  */