qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: qemu-devel@nongnu.org
Cc: bobby.prani@gmail.com, Andrzej Zaborowski <balrogg@gmail.com>,
	Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PATCH v2 04/12] tcg/arm: Add support for fence
Date: Thu, 26 May 2016 18:00:07 -0700	[thread overview]
Message-ID: <1464310815-13554-5-git-send-email-rth@twiddle.net> (raw)
In-Reply-To: <1464310815-13554-1-git-send-email-rth@twiddle.net>

Cc: Andrzej Zaborowski <balrogg@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 tcg/arm/tcg-target.inc.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c
index f9f54c6..951d110 100644
--- a/tcg/arm/tcg-target.inc.c
+++ b/tcg/arm/tcg-target.inc.c
@@ -313,6 +313,10 @@ typedef enum {
     INSN_LDRD_REG  = 0x000000d0,
     INSN_STRD_IMM  = 0x004000f0,
     INSN_STRD_REG  = 0x000000f0,
+
+    INSN_DMB_ISH   = 0x5bf07ff5,
+    INSN_DMB_MCR   = 0xba0f07ee,
+
 } ARMInsn;
 
 #define SHIFT_IMM_LSL(im)	(((im) << 7) | 0x00)
@@ -1923,6 +1927,13 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode opc,
         tcg_out_udiv(s, COND_AL, args[0], args[1], args[2]);
         break;
 
+    case INDEX_op_fence:
+        if (use_armv7_instructions) {
+            tcg_out32(s, INSN_DMB_ISH);
+        } else if (use_armv6_instructions) {
+            tcg_out32(s, INSN_DMB_MCR);
+        }
+        break;
     case INDEX_op_mov_i32:  /* Always emitted via tcg_out_mov.  */
     case INDEX_op_movi_i32: /* Always emitted via tcg_out_movi.  */
     case INDEX_op_call:     /* Always emitted via tcg_out_call.  */
@@ -1997,6 +2008,7 @@ static const TCGTargetOpDef arm_op_defs[] = {
     { INDEX_op_div_i32, { "r", "r", "r" } },
     { INDEX_op_divu_i32, { "r", "r", "r" } },
 
+    { INDEX_op_fence, { } },
     { -1 },
 };
 
-- 
2.5.5

  parent reply	other threads:[~2016-05-27  1:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-27  1:00 [Qemu-devel] [PATCH v2 00/12] tcg: Add fence opcode Richard Henderson
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 01/12] Introduce TCGOpcode for fence instruction Richard Henderson
2016-05-27 10:08   ` Sergey Fedorov
2016-05-27 14:16     ` Pranith Kumar
2016-05-27 10:56   ` Lluís Vilanova
2016-05-27 11:05     ` Peter Maydell
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 02/12] tcg/i386: Add support for fence Richard Henderson
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 03/12] tcg/aarch64: " Richard Henderson
2016-05-27  5:58   ` Claudio Fontana
2016-05-27  1:00 ` Richard Henderson [this message]
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 05/12] tcg/ia64: " Richard Henderson
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 06/12] tcg/mips: " Richard Henderson
2016-05-30 16:47   ` Aurelien Jarno
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 07/12] tcg/ppc: " Richard Henderson
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 08/12] tcg/s390: " Richard Henderson
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 09/12] tcg/sparc: " Richard Henderson
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 10/12] tcg/tci: " Richard Henderson
2016-05-27 10:23   ` Sergey Fedorov
2016-05-27 14:17     ` Pranith Kumar
2016-05-27 14:20       ` Sergey Fedorov
2016-05-27 14:21         ` Pranith Kumar
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 11/12] target-arm: Add frontend support for fence gen in ARMv7 Richard Henderson
2016-05-27  1:00 ` [Qemu-devel] [PATCH v2 12/12] target-alpha: Generate fence opcodes Richard Henderson
2016-05-27  4:20 ` [Qemu-devel] [PATCH v2 00/12] tcg: Add fence opcode Pranith Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1464310815-13554-5-git-send-email-rth@twiddle.net \
    --to=rth@twiddle.net \
    --cc=balrogg@gmail.com \
    --cc=bobby.prani@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).