Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Alistair Francis
On Fri, Aug 11, 2017 at 1:39 PM, Alistair Francis wrote: > On Fri, Aug 11, 2017 at 1:38 PM, Richard Henderson > wrote: >> On 08/11/2017 01:29 PM, Alistair Francis wrote: >>> On Fri, Aug 11, 2017 at 1:24 PM, Richard Henderson >>>

Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Alistair Francis
On Fri, Aug 11, 2017 at 1:38 PM, Richard Henderson wrote: > On 08/11/2017 01:29 PM, Alistair Francis wrote: >> On Fri, Aug 11, 2017 at 1:24 PM, Richard Henderson >> wrote: >>> On 08/11/2017 01:13 PM, Alistair Francis wrote: >> +

Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Richard Henderson
On 08/11/2017 01:29 PM, Alistair Francis wrote: > On Fri, Aug 11, 2017 at 1:24 PM, Richard Henderson > wrote: >> On 08/11/2017 01:13 PM, Alistair Francis wrote: > +tcg_gen_ext_i64(val, val, memop); What is this addition intended to

Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Alistair Francis
On Fri, Aug 11, 2017 at 1:24 PM, Richard Henderson wrote: > On 08/11/2017 01:13 PM, Alistair Francis wrote: +tcg_gen_ext_i64(val, val, memop); >>> >>> What is this addition intended to accomplish? Because of the position >>> within >>> the code,

Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Richard Henderson
On 08/11/2017 01:13 PM, Alistair Francis wrote: >>> +tcg_gen_ext_i64(val, val, memop); >> >> What is this addition intended to accomplish? Because of the position within >> the code, you know that memop contains MO_64, so that this is a no-op. > > This is when size == 2 so it's a

Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Alistair Francis
On Fri, Aug 11, 2017 at 12:46 PM, Richard Henderson wrote: > On 08/11/2017 11:19 AM, Alistair Francis wrote: >> The exclusive store operation should return 0 if the operation updates >> memory and 1 if it doesn't. This means that storing tmp in the rd >> register is

Re: [Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Richard Henderson
On 08/11/2017 11:19 AM, Alistair Francis wrote: > The exclusive store operation should return 0 if the operation updates > memory and 1 if it doesn't. This means that storing tmp in the rd > register is incorrect. I'm confused as to what you believe is wrong. >

[Qemu-devel] [RFC v1 3/3] target/arm: Correct exclusive store return value

2017-08-11 Thread Alistair Francis
The exclusive store operation should return 0 if the operation updates memory and 1 if it doesn't. This means that storing tmp in the rd register is incorrect. This patch updates the succesful opertion to store 0 into the rd register instead of tmp. It also adds a branch to fail if the memory