All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] RFC: QEMU RISC-V modular ISA decoding
@ 2017-07-25 13:04 Bastian Koppelmann
  2017-07-25 14:31 ` [Qemu-devel] [sw-dev] " Samuel Falvo II
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Bastian Koppelmann @ 2017-07-25 13:04 UTC (permalink / raw)
  To: RISC-V SW Dev, QEMU Developers

Hi QEMU devs, hi risc-v-sw devs,

I'm posting this cross mailing list since I'd like to get feedback from
the both sides.

Right now the RISC-V port for QEMU uses the classic decoding scheme of
one function decoding the first opcode (and prefixes) and then branches
to different functions for decoding the rest (as in target/arm or most
of the other targets). This is all done using switch, case statements.

This is a little bit tricky to extend, especially for third parties. I
don't think it's too bad, but it can definitely be improved and I really
like the way target/s390x does it, but I'm not sure about it's drawbacks.

I see three options to proceed from here:

    1) Completely move to a decoding scheme similar to target/s390x in
       QEMU. On the plus side it make it super easy to add new
       instructions and/or new instruction formats, and reduces decoding
       errors. I don't know the major drawbacks to this approach, maybe
       performance. Does anyone know? Other than that it needs a major
       rewrite of the decoder, which will take some time and thus delay
       the development of RISC-V QEMU upstream. (I think RV32/64I can
       be left as is, since everybody has to implement it anyways)

    2) The compromise: Leave the core as is, i.e. RV32GC, and provide a
       nice interface for any other extension similar to target/s390.
       The big plus here is that no code needs to be changed and only
       the interface needs to be added. We don't add any performance
       overhead (if s390x-style decoding adds any), but this might
       result in nobody using it, since they don't know about the
       interface and they just hack their stuff in. Then it was a waste
       of our time to implement the interface.

    3) The status quo. Just leave it as is.

Any comments?

Cheers,
Bastian

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

end of thread, other threads:[~2017-07-27  7:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 13:04 [Qemu-devel] RFC: QEMU RISC-V modular ISA decoding Bastian Koppelmann
2017-07-25 14:31 ` [Qemu-devel] [sw-dev] " Samuel Falvo II
2017-07-26 12:00   ` Bastian Koppelmann
2017-07-26 17:36     ` Richard W.M. Jones
2017-07-26 20:58       ` krste
2017-07-26 21:25         ` Michael Clark
2017-07-25 16:37 ` Bruce Hoult
2017-07-26  6:56   ` Stefan O'Rear
2017-07-26 11:45   ` Bastian Koppelmann
2017-07-27  7:32     ` Markus Armbruster
2017-07-26 16:33 ` [Qemu-devel] " Peter Maydell

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.