qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [RFC PATCH 0/6] Convert softmmu-template into normal code


From: Alex Bennée
Subject: [Qemu-devel] [RFC PATCH 0/6] Convert softmmu-template into normal code
Date: Fri, 20 Apr 2018 16:50:39 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]