Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@transmeta.com>
To: Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
Cc: Andrew Cagney <ac131313@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] fix trap in parallel for m32r-sim
Date: Fri, 16 Jan 2004 21:11:00 -0000	[thread overview]
Message-ID: <16392.21351.39235.645495@claire.transmeta.com> (raw)
In-Reply-To: <006d01c3dbf6$5edebfc0$2569910a@tool.maec.co.jp>

Kazuhiro Inaoka writes:
 > > i.e. _why_ is "trap || insn" being treated as "insn -> trap".
 >
 > If insn changes SM, IE or C flag, trap will be store wrong value. (rare
 > case?)

I'm not sure I understand.
On h/w the particular case of `trap || insn' doesn't really have
parallel semantics?  In general, if two insns execute in parallel
and write the same resource, the result is undefined.
Or does the m32r spec actually specify a well-defined answer here?

 > When you use "trap || insn", m32r_trap() is executed before executed insn.
 > A m32r_trap() uses a result of insn.

Clearly for the normal case it's a bug if two insns are executing
in parallel and one is able to see the result of the other.
One expects all inputs to be consumed before any results are written
(in general, one might certainly have special cases though).

I can see that m32r_trap violates the semantics for the particular
case of TRAP_SYSCALL but I'm guessing that's not at issue here.

 > ex) trap #2 || ldi r7,#1
 > What want to do is to execute m32r_trap() after second insn.

This example involves insns without overlapping resources,
the insns could be executed serially in either order and the
result will be the same (right?).
Do you have an example where the current simulator implementation
gives a different answer than h/w?

 > > Also, if things are indeed kosher, why the added FIXMEs?
 > It's meaning this patch is not enough to fix it.
 > I think it is a first step.

What's the next step then?  The FIXMEs aren't specific.


  reply	other threads:[~2004-01-16 21:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-16  3:26 Kazuhiro Inaoka
2004-01-16  3:43 ` Doug Evans
2004-01-16  5:56   ` Kazuhiro Inaoka
2004-01-16 21:11     ` Doug Evans [this message]
2004-01-19  6:29       ` Kazuhiro Inaoka
2004-01-19 23:05         ` Doug Evans
2004-01-20  4:57           ` Kazuhiro Inaoka
2004-01-27  3:53         ` Andrew Cagney

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=16392.21351.39235.645495@claire.transmeta.com \
    --to=dje@transmeta.com \
    --cc=ac131313@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=inaoka.kazuhiro@renesas.com \
    /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