Re: [Qemu-devel] [PATCH v2 3/4] tcg: Mask shift counts to avoid undefined behavior

2014-03-19 Thread Peter Maydell
On 19 March 2014 15:25, Richard Henderson wrote: > On 03/18/2014 11:21 PM, Stefan Weil wrote: >> Are there test cases which fail with the old code? > > Only when running under analysis tools looking for technical violations of the > standard. Under normal circumstances it would never crash since,

Re: [Qemu-devel] [PATCH v2 3/4] tcg: Mask shift counts to avoid undefined behavior

2014-03-19 Thread Richard Henderson
On 03/18/2014 11:21 PM, Stefan Weil wrote: > Are there test cases which fail with the old code? Only when running under analysis tools looking for technical violations of the standard. Under normal circumstances it would never crash since, as with the native backends, the underlying cpu is going

Re: [Qemu-devel] [PATCH v2 3/4] tcg: Mask shift counts to avoid undefined behavior

2014-03-19 Thread Peter Maydell
On 19 March 2014 06:21, Stefan Weil wrote: > Am 18.03.2014 22:30, schrieb Richard Henderson: >> TCG now requires unspecified behavior rather than a potential crash, >> bring the C shift within the letter of the law. > > I know that C does not define the result of some shift / rotate > operations,

Re: [Qemu-devel] [PATCH v2 3/4] tcg: Mask shift counts to avoid undefined behavior

2014-03-18 Thread Stefan Weil
Am 18.03.2014 22:30, schrieb Richard Henderson: > TCG now requires unspecified behavior rather than a potential crash, > bring the C shift within the letter of the law. I know that C does not define the result of some shift / rotate operations, but I don't understand the sentence above. Why does T

Re: [Qemu-devel] [PATCH v2 3/4] tcg: Mask shift counts to avoid undefined behavior

2014-03-18 Thread Richard Henderson
Gah. Description should have been "tci" and cc'd the maintainer. r~ On 03/18/2014 02:30 PM, Richard Henderson wrote: > TCG now requires unspecified behavior rather than a potential crash, > bring the C shift within the letter of the law. > > Signed-off-by: Richard Henderson > --- > tci.c | 2

[Qemu-devel] [PATCH v2 3/4] tcg: Mask shift counts to avoid undefined behavior

2014-03-18 Thread Richard Henderson
TCG now requires unspecified behavior rather than a potential crash, bring the C shift within the letter of the law. Signed-off-by: Richard Henderson --- tci.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tci.c b/tci.c index 0202ed9..6523ab8 100644 -