On 29 March 2014 00:27, Richard Henderson <r...@twiddle.net> 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