qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC PATCH 0/6] Convert softmmu-template into normal code
@ 2018-04-20 15:50 Alex Bennée
  2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 1/6] accel/tcg: export some cputlb functions Alex Bennée
                   ` (11 more replies)
  0 siblings, 12 replies; 19+ messages in thread
From: Alex Bennée @ 2018-04-20 15:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, peter.maydell, pbonzini, Alex Bennée

Hi,

This is very much a Friday RFC patch but was born out of a chat I had
with Richard at Connect about our experience in the re-factoring of
softfloat.

The basic premise is we shouldn't need to jump through macro/glue
abuse for stuff a decent compiler should be able to dead code away at
compile time. Instead we can write common functions and use
__flatten__ to force the compiler to evaluate the result of merging
the inlined code as one complete blob. So far I haven't been able to
measure any difference in performance on my system compile benchmark.

Why go through all of this hassle? Some justifications:

  - no more "where is helper_le_stw_mmu defined?"
  - easier debugging in gdb
  - no duplicate code for be/le cases
  - more accessible code

I think there is also scope for more re-factoring and clean-up in the
code generally. I considered looking at the atomic and ldst templates
as well but decided to see what reaction the softmmu conversion got
first.

So far this has had very light testing for aarch64 guests on x86_64
hosts but it seems stable enough.

Any questions/thoughts/comments?

Alex Bennée (6):
  accel/tcg: export some cputlb functions
  accel/tcg: new softmmu.c with DATA_SIZE=1
  accel/tcg: add DATA_SIZE = 2 to softmmu
  accel/tcg: create load_helper
  accel/tcg: create store_helper
  accel/tcg: convert 4/8 byte access and remove softmmu_template

 accel/tcg/Makefile.objs      |   1 +
 accel/tcg/cputlb.c           |  61 +----
 accel/tcg/cputlb.h           |  20 ++
 accel/tcg/softmmu.c          | 497 +++++++++++++++++++++++++++++++++++
 accel/tcg/softmmu_template.h | 435 ------------------------------
 5 files changed, 528 insertions(+), 486 deletions(-)
 create mode 100644 accel/tcg/cputlb.h
 create mode 100644 accel/tcg/softmmu.c
 delete mode 100644 accel/tcg/softmmu_template.h

-- 
2.17.0

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

end of thread, other threads:[~2018-04-23 10:35 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-20 15:50 [Qemu-devel] [RFC PATCH 0/6] Convert softmmu-template into normal code Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 1/6] accel/tcg: export some cputlb functions Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 2/6] accel/tcg: new softmmu.c with DATA_SIZE=1 Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 3/6] accel/tcg: add DATA_SIZE = 2 to softmmu Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 4/6] accel/tcg: create load_helper Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 5/6] accel/tcg: create store_helper Alex Bennée
2018-04-20 15:50 ` [Qemu-devel] [RFC PATCH 6/6] accel/tcg: convert 4/8 byte access and remove softmmu_template Alex Bennée
2018-04-20 21:36   ` Richard Henderson
2018-04-20 16:01 ` [Qemu-devel] [RFC PATCH 0/6] Convert softmmu-template into normal code no-reply
2018-04-20 16:05 ` no-reply
2018-04-20 16:16 ` Paolo Bonzini
2018-04-20 16:22 ` Peter Maydell
2018-04-20 16:26 ` no-reply
2018-04-20 18:35 ` Emilio G. Cota
2018-04-20 18:43   ` Alex Bennée
2018-04-20 19:11   ` Philippe Mathieu-Daudé
2018-04-20 20:02     ` Emilio G. Cota
2018-04-20 19:17   ` Alex Bennée
2018-04-23 10:35   ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).