Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Re: [MIPS] Use conditional traps for BUG_ON on MIPS II and better.
       [not found] <S20037651AbWK3BXW/20061130012322Z+10503@ftp.linux-mips.org>
@ 2006-12-03 16:53 ` Atsushi Nemoto
  2006-12-03 21:35   ` Ralf Baechle
  0 siblings, 1 reply; 4+ messages in thread
From: Atsushi Nemoto @ 2006-12-03 16:53 UTC (permalink / raw)
  To: linux-mips

On Thu, 30 Nov 2006 01:23:17 +0000, linux-mips@linux-mips.org wrote:
> Author: Ralf Baechle <ralf@linux-mips.org> Mon Oct 16 01:38:50 2006 +0100
> Commit: 17243c78ae5f25c8901da05ca4eab0968dddb16f
> Gitweb: http://www.linux-mips.org/g/linux/17243c78
> Branch: master
> 
> This shaves of around 4kB and a few cycles for the average kernel that
> has CONFIG_BUG enabled.
> 
> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

It seems this commit break QEMU kernel ...  or QEMU can not interpret
the TNE instruction correctly?

---
Atsushi Nemoto

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

* Re: [MIPS] Use conditional traps for BUG_ON on MIPS II and better.
  2006-12-03 16:53 ` [MIPS] Use conditional traps for BUG_ON on MIPS II and better Atsushi Nemoto
@ 2006-12-03 21:35   ` Ralf Baechle
  2006-12-15 16:26     ` Atsushi Nemoto
  0 siblings, 1 reply; 4+ messages in thread
From: Ralf Baechle @ 2006-12-03 21:35 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: linux-mips

On Mon, Dec 04, 2006 at 01:53:27AM +0900, Atsushi Nemoto wrote:

> > This shaves of around 4kB and a few cycles for the average kernel that
> > has CONFIG_BUG enabled.
> > 
> > Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
> 
> It seems this commit break QEMU kernel ...  or QEMU can not interpret
> the TNE instruction correctly?

Thiemo says that's indeed a possibility.  Probably that feature has not
been well tested in qemu.

  Ralf

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

* Re: [MIPS] Use conditional traps for BUG_ON on MIPS II and better.
  2006-12-03 21:35   ` Ralf Baechle
@ 2006-12-15 16:26     ` Atsushi Nemoto
  2006-12-16 17:11       ` Thiemo Seufer
  0 siblings, 1 reply; 4+ messages in thread
From: Atsushi Nemoto @ 2006-12-15 16:26 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, qemu-devel

On Sun, 3 Dec 2006 21:35:18 +0000, Ralf Baechle <ralf@linux-mips.org> wrote:
> > It seems this commit break QEMU kernel ...  or QEMU can not interpret
> > the TNE instruction correctly?
> 
> Thiemo says that's indeed a possibility.  Probably that feature has not
> been well tested in qemu.

I found the bug.  "Trap If XXX" instructions are translated as it was
"Trap If XXX Immediate".

Index: target-mips/translate.c
===================================================================
RCS file: /sources/qemu/qemu/target-mips/translate.c,v
retrieving revision 1.27
diff -u -r1.27 translate.c
--- target-mips/translate.c	10 Dec 2006 22:08:10 -0000	1.27
+++ target-mips/translate.c	15 Dec 2006 16:16:07 -0000
@@ -1276,6 +1276,7 @@
             GEN_LOAD_REG_TN(T1, rt);
             cond = 1;
         }
+        break;
     case OPC_TEQI:
     case OPC_TGEI:
     case OPC_TGEIU:

---
Atsushi Nemoto

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

* Re: [MIPS] Use conditional traps for BUG_ON on MIPS II and better.
  2006-12-15 16:26     ` Atsushi Nemoto
@ 2006-12-16 17:11       ` Thiemo Seufer
  0 siblings, 0 replies; 4+ messages in thread
From: Thiemo Seufer @ 2006-12-16 17:11 UTC (permalink / raw)
  To: Atsushi Nemoto; +Cc: ralf, linux-mips, qemu-devel

Atsushi Nemoto wrote:
> On Sun, 3 Dec 2006 21:35:18 +0000, Ralf Baechle <ralf@linux-mips.org> wrote:
> > > It seems this commit break QEMU kernel ...  or QEMU can not interpret
> > > the TNE instruction correctly?
> > 
> > Thiemo says that's indeed a possibility.  Probably that feature has not
> > been well tested in qemu.
> 
> I found the bug.  "Trap If XXX" instructions are translated as it was
> "Trap If XXX Immediate".
> 
> Index: target-mips/translate.c
> ===================================================================
> RCS file: /sources/qemu/qemu/target-mips/translate.c,v
> retrieving revision 1.27
> diff -u -r1.27 translate.c
> --- target-mips/translate.c	10 Dec 2006 22:08:10 -0000	1.27
> +++ target-mips/translate.c	15 Dec 2006 16:16:07 -0000
> @@ -1276,6 +1276,7 @@
>              GEN_LOAD_REG_TN(T1, rt);
>              cond = 1;
>          }
> +        break;
>      case OPC_TEQI:
>      case OPC_TGEI:
>      case OPC_TGEIU:

Thanks, committed.


Thiemo

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

end of thread, other threads:[~2006-12-16 17:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <S20037651AbWK3BXW/20061130012322Z+10503@ftp.linux-mips.org>
2006-12-03 16:53 ` [MIPS] Use conditional traps for BUG_ON on MIPS II and better Atsushi Nemoto
2006-12-03 21:35   ` Ralf Baechle
2006-12-15 16:26     ` Atsushi Nemoto
2006-12-16 17:11       ` Thiemo Seufer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox