All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Lucien Anti-Spam <lucienmp_antispam@yahoo.com>,
	Richard Henderson <richard.henderson@linaro.org>,
	Laurent Vivier <laurent@vivier.eu>
Subject: Re: [Qemu-devel] RFC: Why does target/m68k RTE insn. use gen_exception
Date: Wed, 10 Jul 2019 19:15:50 +0100	[thread overview]
Message-ID: <87ims9eox5.fsf@zen.linaroharston> (raw)
In-Reply-To: <CALvKS=EbuQOvRx+bmRnqCD6JuHK87dnkx00EiH--aXYWuNF0VQ@mail.gmail.com>


Lucien Murray-Pitts <lucienmp.qemu@gmail.com> writes:

>> On Wed, Jul 10, 2019 at 4:04 AM Richard Henderson <
> richard.henderson@linaro.org> wrote:
>
>> > I did have a suggestion.  It was fairly detailed.
>> > https://lists.gnu.org/archive/html/qemu-devel/2019-06/msg06522.html
>>
>> Your solution is elegant at about 10 lines that return getl_ilen(pc), but
> it seems the s390 has a far simpler
> instruction word format than the m68k.
>
> However then that got me to thinking, it seems that we can call a portion
> of the TCG system to disassemble a single instruction.
>     TranslationBlock tb;
>     tb.pc = env->pc;
>     gen_intermediate_code(cs, &tb, /* max isn */ 1);
>     int ilen = tb.size;
>     printf( "PC: %08x sz:%08x\n", env->pc, tb, ilen ) ;
>
> I am very new to TCG, so it does seem there is a lot of code in the
> translator_loop that appears to be interacting with the CPU model/state.
> Should I be worried about this, or is this a safe function to call outside
> of the translator core proper?

I would recommend against it - the time to do stuff like this would be
during translation phase where you can save the data. Don't re-invoke the
translator while trying to process an exception.

Is the instruction format that irregular that you can't do a simple
disassembly in a helper?

> (if everyone is too busy I can dig by myself but I think its going to take
> some time)
>
> Cheers,
> Luc


--
Alex Bennée


  reply	other threads:[~2019-07-10 18:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <2136180936.260219.1561641583358.ref@mail.yahoo.com>
2019-06-27 13:19 ` [Qemu-devel] RFC: Why does target/m68k RTE insn. use gen_exception Lucien Anti-Spam via Qemu-devel
2019-06-27 13:22   ` Lucien Anti-Spam via Qemu-devel
2019-06-27 17:09     ` Richard Henderson
2019-06-28  0:27       ` Lucien Murray-Pitts
2019-06-28  9:35         ` Richard Henderson
2019-06-28 15:50           ` Lucien Murray-Pitts
2019-06-29 10:15             ` Richard Henderson
2019-06-29 16:36               ` Lucien Murray-Pitts
2019-06-30  8:20                 ` Richard Henderson
2019-07-01  9:10                 ` Peter Maydell
2019-07-01 12:04                   ` Lucien Anti-Spam via Qemu-devel
2019-07-01 12:11                     ` Peter Maydell
2019-07-09 16:58                       ` Lucien Murray-Pitts
2019-07-09 17:06                         ` Peter Maydell
2019-07-09 19:04                         ` Richard Henderson
2019-07-10 13:35                           ` Lucien Murray-Pitts
2019-07-10 17:50                           ` Lucien Murray-Pitts
2019-07-10 18:15                             ` Alex Bennée [this message]
2019-07-11  9:00                               ` Peter Maydell
2019-07-11  9:18                             ` Richard Henderson
2019-07-12 20:55                           ` Lucien Murray-Pitts

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=87ims9eox5.fsf@zen.linaroharston \
    --to=alex.bennee@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=lucienmp_antispam@yahoo.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.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 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.