Re: [Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant

2015-10-23 Thread Richard Henderson
On 10/23/2015 05:07 AM, Eduardo Habkost wrote: On Thu, Oct 01, 2015 at 02:06:36PM -0300, Eduardo Habkost wrote: On Thu, Oct 01, 2015 at 11:35:52AM +1000, Richard Henderson wrote: On 09/30/2015 06:34 AM, Eduardo Habkost wrote: Left shift of negative values is undefined behavior. Detected by cla

Re: [Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant

2015-10-23 Thread Eduardo Habkost
On Thu, Oct 01, 2015 at 02:06:36PM -0300, Eduardo Habkost wrote: > On Thu, Oct 01, 2015 at 11:35:52AM +1000, Richard Henderson wrote: > > On 09/30/2015 06:34 AM, Eduardo Habkost wrote: > > >Left shift of negative values is undefined behavior. Detected by clang: > > > qemu/target-i386/translate.c:

Re: [Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant

2015-10-01 Thread Eduardo Habkost
On Thu, Oct 01, 2015 at 11:35:52AM +1000, Richard Henderson wrote: > On 09/30/2015 06:34 AM, Eduardo Habkost wrote: > >Left shift of negative values is undefined behavior. Detected by clang: > > qemu/target-i386/translate.c:2423:26: runtime error: > > left shift of negative value -8 > > > >Th

Re: [Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant

2015-10-01 Thread Richard Henderson
On 09/30/2015 06:34 AM, Eduardo Habkost wrote: Left shift of negative values is undefined behavior. Detected by clang: qemu/target-i386/translate.c:2423:26: runtime error: left shift of negative value -8 This changes the code to reverse the sign after the left shift. Signed-off-by: Edua

[Qemu-devel] [PATCH 2/2] target-i386: Don't left shift negative constant

2015-09-30 Thread Eduardo Habkost
Left shift of negative values is undefined behavior. Detected by clang: qemu/target-i386/translate.c:2423:26: runtime error: left shift of negative value -8 This changes the code to reverse the sign after the left shift. Signed-off-by: Eduardo Habkost --- target-i386/translate.c | 2 +- 1