On 2 February 2014 00:42, Edgar E. Iglesias <edgar.igles...@gmail.com> wrote: > On Sat, Feb 01, 2014 at 12:09:06PM +0000, 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 long) >> I think there's an argument here for following the kernel and >> keeping retcode[] a byte array, for the implausible case where >> we want to change the trampoline sequence to include an >> insn with a 1 byte immediate value or something. >> >> Either way I believe the endianness handling should be correct >> since __put_user does host-to-target swapping for us. >> >> It might be possible to test this by extracting some of the >> userspace binaries from the cris system emulation test image >> on the QEMU wiki (or it might not).
> I've tested the patch, it works. CRIS insn stream is always 16bit > aligned, I think Stefans patch is OK. OK, if you're happy with this version I don't object to it (it's just one of those 50/50 cases where my personal taste would have tipped the other way). Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> thanks -- PMM