Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-18 Thread Richard Henderson
On 12/18/2009 07:40 AM, malc wrote: After fixing a bug (crop was done after reading the cr) i run some openssl speed benchmarks, and, at least here on an MPC7447A, got a speed degradation, tiny but consistent. Well, you could try rendering the setcond with branches instead of logical operation

Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-18 Thread malc
On Thu, 17 Dec 2009, Richard Henderson wrote: > On 12/17/2009 07:32 AM, malc wrote: > > > These new opcodes are considered "required" by the backend, > > > because expanding them at the tcg level breaks the basic block. > > > There might be some way to emulate within tcg internals, but > > > that

Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-17 Thread Richard Henderson
On 12/17/2009 09:47 AM, malc wrote: Urgh.. I really hate implementing those 2 ops. See for example this lovely thread: http://www.archivum.info/qemu-devel@nongnu.org/2008-06/00306/%5BQemu-devel%5D_%5B4705%5D_Fix_div%5Bu%5D2. Heh, that one's pretty nasty. But fwiw, you can just call into y

Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-17 Thread Richard Henderson
On 12/17/2009 09:07 AM, Richard Henderson wrote: + case TCG_COND_NE: + if (const_arg2) { + if ((uint16_t) arg2 == arg2) { + tcg_out32 (s, XORI | RS (arg1) | RA (0) | arg2); + } + else { + tcg_out_movi (s, TCG_TYPE_I32, 0, arg2); + tcg_out32 (s, XOR | SAB (arg1, 0, 0)); + } + } + else { + tcg_out3

Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-17 Thread malc
On Thu, 17 Dec 2009, Richard Henderson wrote: > On 12/17/2009 07:32 AM, malc wrote: > > > These new opcodes are considered "required" by the backend, > > > because expanding them at the tcg level breaks the basic block. > > > There might be some way to emulate within tcg internals, but > > > that

Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-17 Thread Richard Henderson
On 12/17/2009 07:32 AM, malc wrote: These new opcodes are considered "required" by the backend, because expanding them at the tcg level breaks the basic block. There might be some way to emulate within tcg internals, but that doesn't seem worthwhile, as essentially all hosts have some form of sup

Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-17 Thread Laurent Desnogues
On Thu, Dec 17, 2009 at 4:32 PM, malc wrote: [...] > > Some: >  a. It breaks tcg on PPC[1]: > >    ...qemu/tcg/tcg.c:1378: tcg fatal error What a surprise :-) I can provide a similar patch for ARM (I already have one for my own implementation of setcond), but I'll wait for this patch series to s

Re: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-17 Thread malc
On Wed, 16 Dec 2009, Richard Henderson wrote: > This patch series adds support for setcond (aka setcc) and > movcond (aka cmov) opcodes to TCG. > > These new opcodes are considered "required" by the backend, > because expanding them at the tcg level breaks the basic block. > There might be some w

[Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes

2009-12-16 Thread Richard Henderson
This patch series adds support for setcond (aka setcc) and movcond (aka cmov) opcodes to TCG. These new opcodes are considered "required" by the backend, because expanding them at the tcg level breaks the basic block. There might be some way to emulate within tcg internals, but that doesn't seem w