Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Richard Henderson
On 2/4/21 6:29 AM, David Hildenbrand wrote: > On 04.02.21 17:04, Philippe Mathieu-Daudé wrote: >> On 2/4/21 10:37 AM, David Hildenbrand wrote: >>> On 04.02.21 10:29, Richard W.M. Jones wrote: >> commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 >> Author: Richard Henderson >> Date:   Mon

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Eric Blake
On 2/4/21 10:29 AM, David Hildenbrand wrote: >> +++ b/tcg/s390/tcg-target.c.inc >> @@ -1094,10 +1094,16 @@ static int tgen_cmp(TCGContext *s, TCGType type, >> TCGCond c, TCGReg r1, >>   op = (is_unsigned ? RIL_CLFI : RIL_CFI); >>   tcg_out_insn_RIL(s, op, r1, c2); >

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Richard W.M. Jones
On Thu, Feb 04, 2021 at 05:04:22PM +0100, Philippe Mathieu-Daudé wrote: > On 2/4/21 10:37 AM, David Hildenbrand wrote: > > On 04.02.21 10:29, Richard W.M. Jones wrote: > commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 > Author: Richard Henderson > Date:   Mon Mar 30 19:52:02 2020 -0

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Eric Blake
On 2/4/21 10:04 AM, Philippe Mathieu-Daudé wrote: >>> Isn't it kind of weird that this would only affect an s390 host?  I >>> don't understand why the host would make a difference if we're doing >>> TCG. >> >> I assume an existing BUG in the s390x TCG backend ... which makes it >> harder to debug

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread David Hildenbrand
On 04.02.21 17:04, Philippe Mathieu-Daudé wrote: On 2/4/21 10:37 AM, David Hildenbrand wrote: On 04.02.21 10:29, Richard W.M. Jones wrote: commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 Author: Richard Henderson Date:   Mon Mar 30 19:52:02 2020 -0700 tcg/optimize: Adjust TempOptInfo al

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Philippe Mathieu-Daudé
On Thu, Feb 4, 2021 at 5:04 PM Philippe Mathieu-Daudé wrote: > On 2/4/21 10:37 AM, David Hildenbrand wrote: > > On 04.02.21 10:29, Richard W.M. Jones wrote: > commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 > Author: Richard Henderson > Date: Mon Mar 30 19:52:02 2020 -0700 >

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread David Hildenbrand
On 04.02.21 17:04, Philippe Mathieu-Daudé wrote: On 2/4/21 10:37 AM, David Hildenbrand wrote: On 04.02.21 10:29, Richard W.M. Jones wrote: commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 Author: Richard Henderson Date:   Mon Mar 30 19:52:02 2020 -0700 tcg/optimize: Adjust TempOptInfo al

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Philippe Mathieu-Daudé
On 2/4/21 10:37 AM, David Hildenbrand wrote: > On 04.02.21 10:29, Richard W.M. Jones wrote: commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 Author: Richard Henderson Date:   Mon Mar 30 19:52:02 2020 -0700 tcg/optimize: Adjust TempOptInfo allocation The image

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread David Hildenbrand
On 04.02.21 10:29, Richard W.M. Jones wrote: commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 Author: Richard Henderson Date: Mon Mar 30 19:52:02 2020 -0700 tcg/optimize: Adjust TempOptInfo allocation The image boots just fine on s390x/TCG as well. Let me try this in a minute on my ori

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Richard W.M. Jones
I have this s390 machine for another 99 hours now, so if you want me to test patches then send them my way. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit vir

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Richard W.M. Jones
> > commit 8f17a975e60b773d7c366a81c0d9bbe304f30859 > > Author: Richard Henderson > > Date: Mon Mar 30 19:52:02 2020 -0700 > > > > tcg/optimize: Adjust TempOptInfo allocation > > > > The image boots just fine on s390x/TCG as well. > > Let me try this in a minute on my original test machin

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread David Hildenbrand
On 04.02.21 10:03, Richard W.M. Jones wrote: On Thu, Feb 04, 2021 at 09:38:45AM +0100, David Hildenbrand wrote: On 04.02.21 08:55, David Hildenbrand wrote: On 04.02.21 07:41, David Hildenbrand wrote: Am 04.02.2021 um 03:22 schrieb Richard Henderson : On 2/1/21 10:45 AM, Richard W.M. Jones

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread Richard W.M. Jones
On Thu, Feb 04, 2021 at 09:38:45AM +0100, David Hildenbrand wrote: > On 04.02.21 08:55, David Hildenbrand wrote: > >On 04.02.21 07:41, David Hildenbrand wrote: > >> > >>>Am 04.02.2021 um 03:22 schrieb Richard Henderson > >>>: > >>> > >>>On 2/1/21 10:45 AM, Richard W.M. Jones wrote: > This com

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-04 Thread David Hildenbrand
On 04.02.21 08:55, David Hildenbrand wrote: On 04.02.21 07:41, David Hildenbrand wrote: Am 04.02.2021 um 03:22 schrieb Richard Henderson : On 2/1/21 10:45 AM, Richard W.M. Jones wrote: This commit breaks running certain s390x binaries, at least the "mount" command (or a library it uses) bre

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-03 Thread David Hildenbrand
On 04.02.21 07:41, David Hildenbrand wrote: Am 04.02.2021 um 03:22 schrieb Richard Henderson : On 2/1/21 10:45 AM, Richard W.M. Jones wrote: This commit breaks running certain s390x binaries, at least the "mount" command (or a library it uses) breaks. More details in this BZ: https://bugzi

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-03 Thread David Hildenbrand
> Am 04.02.2021 um 03:22 schrieb Richard Henderson > : > > On 2/1/21 10:45 AM, Richard W.M. Jones wrote: >> This commit breaks running certain s390x binaries, at least >> the "mount" command (or a library it uses) breaks. >> >> More details in this BZ: >> >> https://bugzilla.redhat.com/show_

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-03 Thread Richard Henderson
On 2/1/21 10:45 AM, Richard W.M. Jones wrote: > This commit breaks running certain s390x binaries, at least > the "mount" command (or a library it uses) breaks. > > More details in this BZ: > > https://bugzilla.redhat.com/show_bug.cgi?id=1922248 > > Could we revert this change since it seems to

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-01 Thread Richard W.M. Jones
On Mon, Feb 01, 2021 at 08:45:47PM +, Richard W.M. Jones wrote: > This commit breaks running certain s390x binaries, at least > the "mount" command (or a library it uses) breaks. > > More details in this BZ: > > https://bugzilla.redhat.com/show_bug.cgi?id=1922248 > > Could we revert this cha

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-02-01 Thread Richard W.M. Jones
This commit breaks running certain s390x binaries, at least the "mount" command (or a library it uses) breaks. More details in this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1922248 Could we revert this change since it seems to have caused other problems as well? Rich. -- Richard Jones,

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-01-18 Thread Richard Henderson
On 1/18/21 10:17 AM, Laurent Vivier wrote: > This commit breaks the build of my hello world test program with > mips64el/stretch guest > (and I guess some others too). > > cat > $CHROOT/tmp/hello.c < #include > int main(void) > { > printf("Hello World!\n"); > return 0; > } > EOF > > uns

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-01-18 Thread Laurent Vivier
On 16/01/2021 18:24, Richard Henderson wrote: > On 1/15/21 1:03 PM, Alistair Francis wrote: >> I run QEMU with these arguments: >> >> ./build/riscv32-softmmu/qemu-system-riscv32 \ >> -machine virt -serial mon:stdio -serial null -nographic \ >> -append "root=/dev/vda rw highres=off console=

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-01-16 Thread Richard Henderson
On 1/15/21 1:03 PM, Alistair Francis wrote: > I run QEMU with these arguments: > > ./build/riscv32-softmmu/qemu-system-riscv32 \ > -machine virt -serial mon:stdio -serial null -nographic \ > -append "root=/dev/vda rw highres=off console=ttyS0 ip=dhcp > earlycon=sbi" \ > -device virti

Re: [PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-01-15 Thread Alistair Francis
On Wed, Jan 13, 2021 at 6:32 PM Richard Henderson wrote: > > Signed-off-by: Richard Henderson This patch results in a QEMU seg fault when starting userspace on RISC-V 32-bit. This is the full backtrace: ``` #0 0x55a67c4d in ts_are_copies (ts2=0x7fffa8008008, ts1=0x7fffa8001e40) at ../

[PULL 11/24] tcg/optimize: Use tcg_constant_internal with constant folding

2021-01-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/optimize.c | 108 ++--- 1 file changed, 49 insertions(+), 59 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index 49bf1386c7..bda727d5ed 100644 --- a/tcg/optimize.c +++ b/tcg/optimize.c @@ -178,37 +17