[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/8] tcg: tidy the type of code_ptr
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 0/8] tcg: tidy the type of code_ptr |
Date: |
Sat, 29 Mar 2014 20:26:57 +0000 |
On 29 March 2014 00:27, Richard Henderson <address@hidden> wrote:
> Here's where I think we should go with the cleanup that Peter started.
>
> I've only converted a couple of the backends as examples. It's not 100%
> mechanical, since one has to be aware of the change in the semantics of
> pointer arithmetic (e.g. s->code_ptr - s->code_buf).
>
> Taking Sparc as an example, the before code size of tcg.o is 0xad60, and
> the after code size is 0xa200. A savings of a bit less than 3k.
>
> Thoughts?
Looks good to me -- I like the way a lot of the casts go away.
It seems like it might be worth abstracting out "give me the byte
difference between these two code pointers" rather than having
inline (uintptr_t)codeptr1 - (uintptr_t)codeptr2, but I dunno.
Is there a better name than 'tcg_itype' ? Putting 'type' in the
name of a type is a bit redundant, and suggests it contains
a type rather than an insn.
thanks
-- PMM
- [Qemu-devel] [PATCH 0/8] tcg: tidy the type of code_ptr, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 1/8] exec-all.h: Use stl_p to avoid undefined behaviour patching x86 jumps, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 2/8] tcg: Avoid stores to unaligned addresses, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 3/8] tcg: Avoid undefined behaviour patching code at unaligned addresses, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 4/8] tcg: Define tcg_itype for code pointers, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 5/8] tcg-ppc64: Define TCG_TARGET_ITYPE_SIZE, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 6/8] tcg-ppc: Define TCG_TARGET_ITYPE_SIZE, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 7/8] tcg-aarch64: Define TCG_TARGET_ITYPE_SIZE, Richard Henderson, 2014/03/28
- [Qemu-devel] [PATCH 8/8] tcg-sparc: Define TCG_TARGET_ITYPE_SIZE, Richard Henderson, 2014/03/28
- Re: [Qemu-devel] [PATCH 0/8] tcg: tidy the type of code_ptr,
Peter Maydell <=