qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: riku.voipio@iki.fi
To: qemu-devel@nongnu.org
Cc: Riku Voipio <riku.voipio@iki.fi>
Subject: [Qemu-devel] RFC: target-arm: vld1.64 and vst1.64 support
Date: Tue, 21 Jul 2009 23:58:03 +0300	[thread overview]
Message-ID: <1248209884-10662-1-git-send-email-riku.voipio@iki.fi> (raw)

From: Riku Voipio <riku.voipio@iki.fi>

The 64bit form of vld1/vst1 was not supported. This has
been tested to be compatible with the memcpy_neon tests
and neon-optimized pixman code.

the current patch doesn't indent the rest of the code
to minimize the patch for RFC purposes. I'd certainly
like a prettier way for this.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 target-arm/translate.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/target-arm/translate.c b/target-arm/translate.c
index 4db8d0e..2012c23 100644
--- a/target-arm/translate.c
+++ b/target-arm/translate.c
@@ -854,6 +854,12 @@ static inline TCGv gen_ld32(TCGv addr, int index)
     tcg_gen_qemu_ld32u(tmp, addr, index);
     return tmp;
 }
+static inline TCGv_i64 gen_ld64(TCGv addr, int index)
+{
+    TCGv_i64 tmp = tcg_temp_new_i64();
+    tcg_gen_qemu_ld64(tmp, addr, index);
+    return tmp;
+}
 static inline void gen_st8(TCGv val, TCGv addr, int index)
 {
     tcg_gen_qemu_st8(val, addr, index);
@@ -869,6 +875,10 @@ static inline void gen_st32(TCGv val, TCGv addr, int index)
     tcg_gen_qemu_st32(val, addr, index);
     dead_tmp(val);
 }
+static inline void gen_st64(TCGv_i64 val, TCGv addr, int index)
+{
+    tcg_gen_qemu_st64(val, addr, index);
+}
 
 static inline void gen_movl_T0_reg(DisasContext *s, int reg)
 {
@@ -3705,7 +3715,7 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn)
         /* Load store all elements.  */
         op = (insn >> 8) & 0xf;
         size = (insn >> 6) & 3;
-        if (op > 10 || size == 3)
+        if (op > 10)
             return 1;
         nregs = neon_ls_element_type[op].nregs;
         interleave = neon_ls_element_type[op].interleave;
@@ -3719,6 +3729,18 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn)
                 gen_movl_T1_reg(s, rn);
                 gen_op_addl_T1_im(1 << size);
             }
+            if (size == 3) {
+                TCGv_i64 tmp64;
+                if (load) {
+                    tmp64 = gen_ld64(cpu_T[1], IS_USER(s));
+                    neon_store_reg64(tmp64, rd);
+                } else { /* bookmark */
+                    tmp64 = tcg_temp_new_i64();
+                    neon_load_reg64(tmp64, rd);
+                    gen_st64(tmp64, cpu_T[1], IS_USER(s));
+                }
+                gen_op_addl_T1_im(stride);
+            } else {
             for (pass = 0; pass < 2; pass++) {
                 if (size == 2) {
                     if (load) {
@@ -3776,7 +3798,7 @@ static int disas_neon_ls_insn(CPUState * env, DisasContext *s, uint32_t insn)
                         dead_tmp(tmp2);
                     }
                 }
-            }
+            } }
             rd += neon_ls_element_type[op].spacing;
         }
         stride = nregs * 8;
-- 
1.6.2.1

             reply	other threads:[~2009-07-21 20:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 20:58 riku.voipio [this message]
2009-07-21 20:58 ` [Qemu-devel] linux-user: add eventfd support riku.voipio

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=1248209884-10662-1-git-send-email-riku.voipio@iki.fi \
    --to=riku.voipio@iki.fi \
    --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).