Re: [Qemu-devel] Possible ppc comparision optimisation

2013-05-08 Thread Paolo Bonzini
Il 08/05/2013 17:44, Torbjorn Granlund ha scritto: > Paolo Bonzini writes: > > I think that would be faster on 32-bit hosts, truncs are cheap. > > And slower perhaps on 64-bit hosts, at least for operations where > additional explicit trunctation will be needed (such as before > comparisions

Re: [Qemu-devel] Possible ppc comparision optimisation

2013-05-08 Thread Torbjorn Granlund
Paolo Bonzini writes: I think that would be faster on 32-bit hosts, truncs are cheap. And slower perhaps on 64-bit hosts, at least for operations where additional explicit trunctation will be needed (such as before comparisions and after right shifts). > There could be a disadvantage of t

Re: [Qemu-devel] Possible ppc comparision optimisation

2013-05-08 Thread Paolo Bonzini
Il 08/05/2013 00:56, Torbjorn Granlund ha scritto: > The current ppc gen_op_cmp generates a long sequence of instructions, > using a plain series of three disjoint compares. > > It is possible to compute the 3 result bits more cleverly. Below is a > possible replacement gen_op_cmp. (It is tested

[Qemu-devel] Possible ppc comparision optimisation

2013-05-07 Thread Torbjorn Granlund
The current ppc gen_op_cmp generates a long sequence of instructions, using a plain series of three disjoint compares. It is possible to compute the 3 result bits more cleverly. Below is a possible replacement gen_op_cmp. (It is tested by booting GNU/Linux ppx64, but not much more than that.) S