Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 08:42, Richard Henderson wrote: > On 05/18/2017 06:20 AM, Aurelien Jarno wrote: > > > +DEF_HELPER_FLAGS_2(testblock, TCG_CALL_NO_WG, i32, env, i64) > > As the helper does not read any values from the global, you can even use > > TCG_CALL_NO_RWG. > > > > By throwing an exception, we

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Richard Henderson
On 05/18/2017 06:20 AM, Aurelien Jarno wrote: +DEF_HELPER_FLAGS_2(testblock, TCG_CALL_NO_WG, i32, env, i64) As the helper does not read any values from the global, you can even use TCG_CALL_NO_RWG. By throwing an exception, we imply a read of all values along the exception path. r~

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Thomas Huth
On 18.05.2017 15:20, Aurelien Jarno wrote: > On 2017-05-18 13:39, Thomas Huth wrote: >> TEST BLOCK was likely once used to execute basic memory >> tests, but nowadays it's just a (slow) way to clear a page. >> >> Signed-off-by: Thomas Huth >> --- >> v2: >> - Use DEF_HELPER_FLAGS_2 instead for DE

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Thomas Huth
On 18.05.2017 15:20, Aurelien Jarno wrote: > On 2017-05-18 14:59, Thomas Huth wrote: >> On 18.05.2017 14:23, David Hildenbrand wrote: >>> diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index f6e5bce..de0ecd4 100644 --- a/target/s390x/mem_helper.c +++ b/target

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 14:59, Thomas Huth wrote: > On 18.05.2017 14:23, David Hildenbrand wrote: > > > >> diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c > >> index f6e5bce..de0ecd4 100644 > >> --- a/target/s390x/mem_helper.c > >> +++ b/target/s390x/mem_helper.c > >> @@ -20,6 +20,7 @@ >

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 13:39, Thomas Huth wrote: > TEST BLOCK was likely once used to execute basic memory > tests, but nowadays it's just a (slow) way to clear a page. > > Signed-off-by: Thomas Huth > --- > v2: > - Use DEF_HELPER_FLAGS_2 instead for DEF_HELPER_2 for returning CC value > - Convert real

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread David Hildenbrand
On 18.05.2017 14:59, Thomas Huth wrote: > On 18.05.2017 14:23, David Hildenbrand wrote: >> >>> diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c >>> index f6e5bce..de0ecd4 100644 >>> --- a/target/s390x/mem_helper.c >>> +++ b/target/s390x/mem_helper.c >>> @@ -20,6 +20,7 @@ >>> >>>

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Thomas Huth
On 18.05.2017 14:23, David Hildenbrand wrote: > >> diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c >> index f6e5bce..de0ecd4 100644 >> --- a/target/s390x/mem_helper.c >> +++ b/target/s390x/mem_helper.c >> @@ -20,6 +20,7 @@ >> >> #include "qemu/osdep.h" >> #include "cpu.h" >>

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread David Hildenbrand
> diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c > index f6e5bce..de0ecd4 100644 > --- a/target/s390x/mem_helper.c > +++ b/target/s390x/mem_helper.c > @@ -20,6 +20,7 @@ > > #include "qemu/osdep.h" > #include "cpu.h" > +#include "exec/address-spaces.h" > #include "exec/help