qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [6837] tcg/x86: add bswap16_i32 ops
Date: Fri, 13 Mar 2009 09:35:49 +0000	[thread overview]
Message-ID: <E1Li3nx-00074n-C3@cvs.savannah.gnu.org> (raw)

Revision: 6837
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6837
Author:   aurel32
Date:     2009-03-13 09:35:49 +0000 (Fri, 13 Mar 2009)
Log Message:
-----------
tcg/x86: add bswap16_i32 ops

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Modified Paths:
--------------
    trunk/tcg/i386/tcg-target.c
    trunk/tcg/i386/tcg-target.h

Modified: trunk/tcg/i386/tcg-target.c
===================================================================
--- trunk/tcg/i386/tcg-target.c	2009-03-13 09:35:41 UTC (rev 6836)
+++ trunk/tcg/i386/tcg-target.c	2009-03-13 09:35:49 UTC (rev 6837)
@@ -1034,6 +1034,11 @@
         tcg_out_brcond2(s, args, const_args);
         break;
 
+    case INDEX_op_bswap16_i32:
+        tcg_out8(s, 0x66);
+        tcg_out_modrm(s, 0xc1, SHIFT_ROL, args[0]);
+        tcg_out8(s, 8);
+        break;
     case INDEX_op_bswap32_i32:
         tcg_out_opc(s, (0xc8 + args[0]) | P_EXT);
         break;
@@ -1130,6 +1135,7 @@
     { INDEX_op_sub2_i32, { "r", "r", "0", "1", "ri", "ri" } },
     { INDEX_op_brcond2_i32, { "r", "r", "ri", "ri" } },
 
+    { INDEX_op_bswap16_i32, { "r", "0" } },
     { INDEX_op_bswap32_i32, { "r", "0" } },
 
     { INDEX_op_neg_i32, { "r", "0" } },

Modified: trunk/tcg/i386/tcg-target.h
===================================================================
--- trunk/tcg/i386/tcg-target.h	2009-03-13 09:35:41 UTC (rev 6836)
+++ trunk/tcg/i386/tcg-target.h	2009-03-13 09:35:49 UTC (rev 6837)
@@ -45,6 +45,7 @@
 #define TCG_TARGET_CALL_STACK_OFFSET 0
 
 /* optional instructions */
+#define TCG_TARGET_HAS_bswap16_i32
 #define TCG_TARGET_HAS_bswap32_i32
 #define TCG_TARGET_HAS_neg_i32
 #define TCG_TARGET_HAS_not_i32

                 reply	other threads:[~2009-03-13  9:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E1Li3nx-00074n-C3@cvs.savannah.gnu.org \
    --to=aurelien@aurel32.net \
    --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).