Re: [Qemu-devel] [PATCH for-2.9 1/2] tcg/sparc: Zero extend data argument to store helpers

2017-03-28 Thread Peter Maydell
On 28 March 2017 at 16:52, Philippe Mathieu-Daudé wrote: > On 03/27/2017 01:04 PM, Peter Maydell wrote: > it seems to me easier to read masking op: > > switch (op & MO_SIZE) { > case MO_8: > tcg_out_arithi(s, r, r, 0xff, ARITH_AND); > break; > case MO_16: > tcg

Re: [Qemu-devel] [PATCH for-2.9 1/2] tcg/sparc: Zero extend data argument to store helpers

2017-03-28 Thread Philippe Mathieu-Daudé
Hi Peter, On 03/27/2017 01:04 PM, Peter Maydell wrote: The C store helper functions take the data argument as a uint8_t, uint16_t, etc depending on the store size. The SPARC calling convention requires that data types smaller than the register size must be extended by the caller. We weren't doin

[Qemu-devel] [PATCH for-2.9 1/2] tcg/sparc: Zero extend data argument to store helpers

2017-03-27 Thread Peter Maydell
The C store helper functions take the data argument as a uint8_t, uint16_t, etc depending on the store size. The SPARC calling convention requires that data types smaller than the register size must be extended by the caller. We weren't doing this, which meant that if QEMU was compiled with optimiz