Re: [Qemu-devel] [PATCH] linux-user: Fix trampoline code for CRIS

2014-02-01 Thread Peter Maydell
On 2 February 2014 00:42, Edgar E. Iglesias wrote: > On Sat, Feb 01, 2014 at 12:09:06PM +, Peter Maydell wrote: >> Since CRIS looks (from a scan through its translate.c) like >> a variable-width instruction set (in the sense that insns can >> have immediate operands which might be 1/2/4 bytes

Re: [Qemu-devel] [PATCH] linux-user: Fix trampoline code for CRIS

2014-02-01 Thread Edgar E. Iglesias
On Sat, Feb 01, 2014 at 12:09:06PM +, Peter Maydell wrote: > On 1 February 2014 08:41, Stefan Weil wrote: > > __put_user can write bytes, words (2 bytes) or longwords (4 bytes). > > Here obviously words should have been written, but bytes were written, > > so values like 0x9c5f were truncated

Re: [Qemu-devel] [PATCH] linux-user: Fix trampoline code for CRIS

2014-02-01 Thread Peter Maydell
On 1 February 2014 08:41, Stefan Weil wrote: > __put_user can write bytes, words (2 bytes) or longwords (4 bytes). > Here obviously words should have been written, but bytes were written, > so values like 0x9c5f were truncated to 0x5f. > > Fix this by changing retcode from uint8_t to to uint16_t i

[Qemu-devel] [PATCH] linux-user: Fix trampoline code for CRIS

2014-02-01 Thread Stefan Weil
__put_user can write bytes, words (2 bytes) or longwords (4 bytes). Here obviously words should have been written, but bytes were written, so values like 0x9c5f were truncated to 0x5f. Fix this by changing retcode from uint8_t to to uint16_t in target_signal_frame and also in the unused rt_signal_