Re: [Qemu-devel] [PATCH v9 07/15] target-or32: Add instruction translation

2012-07-13 Thread Jia Liu
Hi Peter, On Fri, Jul 13, 2012 at 4:09 PM, Peter Maydell wrote: > On 13 July 2012 05:35, Jia Liu wrote: >> +static inline uint32_t field(uint32_t val, int start, int length) >> +{ >> +val >>= start; >> +val &= ~(~0 << length); >> +return val; >> +} > > extract32() is in bitops.h now,

Re: [Qemu-devel] [PATCH v9 07/15] target-or32: Add instruction translation

2012-07-13 Thread Peter Maydell
On 13 July 2012 05:35, Jia Liu wrote: > +static inline uint32_t field(uint32_t val, int start, int length) > +{ > +val >>= start; > +val &= ~(~0 << length); > +return val; > +} extract32() is in bitops.h now, so it would be better to use that instead. Thanks for prodding us to actuall

[Qemu-devel] [PATCH v9 07/15] target-or32: Add instruction translation

2012-07-12 Thread Jia Liu
Add OpenRISC instruction tanslation routines. Signed-off-by: Jia Liu --- target-openrisc/translate.c | 1700 +++ 1 file changed, 1700 insertions(+) diff --git a/target-openrisc/translate.c b/target-openrisc/translate.c index a2b9b4f..ed25604 100644 --- a/