All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2 0/2] misc MIPS improvments
@ 2012-03-30 17:16 Richard Henderson
  2012-03-30 17:16 ` [Qemu-devel] [PATCH 1/2] target-mips: Streamline indexed cp1 memory addressing Richard Henderson
  2012-03-30 17:16 ` [Qemu-devel] [PATCH 2/2] mips-linux-user: Always support rdhwr Richard Henderson
  0 siblings, 2 replies; 5+ messages in thread
From: Richard Henderson @ 2012-03-30 17:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

Extracted and rebased from a larger patch set from December.

Available as 

   git://repo.or.cz/qemu/rth.git rth/mips/next


r~


Richard Henderson (2):
  target-mips: Streamline indexed cp1 memory addressing.
  mips-linux-user: Always support rdhwr.

 target-mips/translate.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

-- 
1.7.7.6

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 1/2] target-mips: Streamline indexed cp1 memory addressing.
  2012-03-30 17:16 [Qemu-devel] [PATCH v2 0/2] misc MIPS improvments Richard Henderson
@ 2012-03-30 17:16 ` Richard Henderson
  2012-08-27 10:19   ` Aurelien Jarno
  2012-03-30 17:16 ` [Qemu-devel] [PATCH 2/2] mips-linux-user: Always support rdhwr Richard Henderson
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2012-03-30 17:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: aurelien

We've already eliminated both base and index being zero.
---
 target-mips/translate.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/target-mips/translate.c b/target-mips/translate.c
index a663b74..300d95e 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -7742,8 +7742,7 @@ static void gen_flt3_ldst (DisasContext *ctx, uint32_t opc,
     } else if (index == 0) {
         gen_load_gpr(t0, base);
     } else {
-        gen_load_gpr(t0, index);
-        gen_op_addr_add(ctx, t0, cpu_gpr[base], t0);
+        gen_op_addr_add(ctx, t0, cpu_gpr[base], cpu_gpr[index]);
     }
     /* Don't do NOP if destination is zero: we must perform the actual
        memory access. */
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Qemu-devel] [PATCH 2/2] mips-linux-user: Always support rdhwr.
  2012-03-30 17:16 [Qemu-devel] [PATCH v2 0/2] misc MIPS improvments Richard Henderson
  2012-03-30 17:16 ` [Qemu-devel] [PATCH 1/2] target-mips: Streamline indexed cp1 memory addressing Richard Henderson
@ 2012-03-30 17:16 ` Richard Henderson
  2012-08-27 10:20   ` Aurelien Jarno
  1 sibling, 1 reply; 5+ messages in thread
From: Richard Henderson @ 2012-03-30 17:16 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, aurelien

The kernel will emulate this instruction if it's not supported
natively.  This insn is used for TLS, among other things, and
so is required by modern glibc.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Cc: Riku Voipio <riku.voipio@iki.fi>
---
 target-mips/translate.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/target-mips/translate.c b/target-mips/translate.c
index 300d95e..ed28ca8 100644
--- a/target-mips/translate.c
+++ b/target-mips/translate.c
@@ -8111,7 +8111,11 @@ gen_rdhwr (CPUMIPSState *env, DisasContext *ctx, int rt, int rd)
 {
     TCGv t0;
 
+#if !defined(CONFIG_USER_ONLY)
+    /* The Linux kernel will emulate rdhwr if it's not supported natively.
+       Therefore only check the ISA in system mode.  */
     check_insn(env, ctx, ISA_MIPS32R2);
+#endif
     t0 = tcg_temp_new();
 
     switch (rd) {
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] target-mips: Streamline indexed cp1 memory addressing.
  2012-03-30 17:16 ` [Qemu-devel] [PATCH 1/2] target-mips: Streamline indexed cp1 memory addressing Richard Henderson
@ 2012-08-27 10:19   ` Aurelien Jarno
  0 siblings, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2012-08-27 10:19 UTC (permalink / raw)
  To: Richard Henderson; +Cc: qemu-devel

On Fri, Mar 30, 2012 at 01:16:36PM -0400, Richard Henderson wrote:
> We've already eliminated both base and index being zero.
> ---
>  target-mips/translate.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index a663b74..300d95e 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -7742,8 +7742,7 @@ static void gen_flt3_ldst (DisasContext *ctx, uint32_t opc,
>      } else if (index == 0) {
>          gen_load_gpr(t0, base);
>      } else {
> -        gen_load_gpr(t0, index);
> -        gen_op_addr_add(ctx, t0, cpu_gpr[base], t0);
> +        gen_op_addr_add(ctx, t0, cpu_gpr[base], cpu_gpr[index]);
>      }
>      /* Don't do NOP if destination is zero: we must perform the actual
>         memory access. */

Thanks, applied.


-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] mips-linux-user: Always support rdhwr.
  2012-03-30 17:16 ` [Qemu-devel] [PATCH 2/2] mips-linux-user: Always support rdhwr Richard Henderson
@ 2012-08-27 10:20   ` Aurelien Jarno
  0 siblings, 0 replies; 5+ messages in thread
From: Aurelien Jarno @ 2012-08-27 10:20 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Riku Voipio, qemu-devel

On Fri, Mar 30, 2012 at 01:16:37PM -0400, Richard Henderson wrote:
> The kernel will emulate this instruction if it's not supported
> natively.  This insn is used for TLS, among other things, and
> so is required by modern glibc.
> 
> Signed-off-by: Richard Henderson <rth@twiddle.net>
> Cc: Riku Voipio <riku.voipio@iki.fi>
> ---
>  target-mips/translate.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/target-mips/translate.c b/target-mips/translate.c
> index 300d95e..ed28ca8 100644
> --- a/target-mips/translate.c
> +++ b/target-mips/translate.c
> @@ -8111,7 +8111,11 @@ gen_rdhwr (CPUMIPSState *env, DisasContext *ctx, int rt, int rd)
>  {
>      TCGv t0;
>  
> +#if !defined(CONFIG_USER_ONLY)
> +    /* The Linux kernel will emulate rdhwr if it's not supported natively.
> +       Therefore only check the ISA in system mode.  */
>      check_insn(env, ctx, ISA_MIPS32R2);
> +#endif
>      t0 = tcg_temp_new();
>  
>      switch (rd) {

Thanks, applied.
 
-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-08-27 10:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-30 17:16 [Qemu-devel] [PATCH v2 0/2] misc MIPS improvments Richard Henderson
2012-03-30 17:16 ` [Qemu-devel] [PATCH 1/2] target-mips: Streamline indexed cp1 memory addressing Richard Henderson
2012-08-27 10:19   ` Aurelien Jarno
2012-03-30 17:16 ` [Qemu-devel] [PATCH 2/2] mips-linux-user: Always support rdhwr Richard Henderson
2012-08-27 10:20   ` Aurelien Jarno

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.