Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-09 Thread Stefan Weil
Am 09.02.21 um 22:15 schrieb Stefan Weil: Thanks for solving this. The patch works for me. BIOS boot time with qemu-system-i386 is about 41 s (with my code which lacks thread support and ffi it was 40 s). With qemu-system-x86_64 it is twice as fast, so it looks like in my last report where

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-09 Thread Stefan Weil
Am 09.02.21 um 21:46 schrieb Richard Henderson: On 2/8/21 2:55 PM, Richard Henderson wrote: Ok, I've reproduced something on a T3 (gcc102.fsffrance.org). Running the same code side-by-side vs the T5, I get different results. Brown paper bag time: the T5 build dir lost the --enable-tcg-interpre

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-09 Thread Richard Henderson
On 2/8/21 2:55 PM, Richard Henderson wrote: > Ok, I've reproduced something on a T3 (gcc102.fsffrance.org). > Running the same code side-by-side vs the T5, I get different results. Brown paper bag time: the T5 build dir lost the --enable-tcg-interpreter flag, so was testing tcg native. Big-endian

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-08 Thread Richard Henderson
On 2/8/21 11:04 AM, Stefan Weil wrote: > > Am 08.02.21 um 18:39 schrieb Richard Henderson: >> On 2/8/21 5:07 AM, Stefan Weil wrote: >>> Richard, this commit is also the one which breaks qemu-system-i386 on >>> sparc64 >>> for me: >> You'll have to give me more details than that, because qemu-syst

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-08 Thread Stefan Weil
Am 08.02.21 um 18:39 schrieb Richard Henderson: On 2/8/21 5:07 AM, Stefan Weil wrote: Richard, this commit is also the one which breaks qemu-system-i386 on sparc64 for me: You'll have to give me more details than that, because qemu-system-i386 works for me on a niagara5 w/ debian sid. I am

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-08 Thread Richard Henderson
On 2/8/21 5:07 AM, Stefan Weil wrote: > Richard, this commit is also the one which breaks qemu-system-i386 on sparc64 > for me: You'll have to give me more details than that, because qemu-system-i386 works for me on a niagara5 w/ debian sid. r~

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-08 Thread Stefan Weil
Am 08.02.21 um 10:35 schrieb Paolo Bonzini: On 08/02/21 10:20, Peter Maydell wrote: + +if get_option('tcg_interpreter') +  libffi = dependency('libffi', version: '>=3.0', +  static: enable_static, method: 'pkg-config', +  required: true) +  specific_ss.ad

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-08 Thread Paolo Bonzini
On 08/02/21 10:20, Peter Maydell wrote: + +if get_option('tcg_interpreter') + libffi = dependency('libffi', version: '>=3.0', + static: enable_static, method: 'pkg-config', + required: true) + specific_ss.add(libffi) + specific_ss.add(files('tcg/tci.c'

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-08 Thread Peter Maydell
On Sun, 7 Feb 2021 at 20:12, Richard Henderson wrote: > > On 2/7/21 11:52 AM, Peter Maydell wrote: > > On Sun, 7 Feb 2021 at 17:41, Richard Henderson > > wrote: > >> > >> On 2/7/21 8:25 AM, Stefan Weil wrote: > +#include "qemu-common.h" > +#include "tcg/tcg.h" /* MAX_OPC_PARAM

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-07 Thread Stefan Weil
On 07.02.21 21:12, Richard Henderson wrote: > On 2/7/21 11:52 AM, Peter Maydell wrote: >> On Sun, 7 Feb 2021 at 17:41, Richard Henderson >> wrote: >>> >>> On 2/7/21 8:25 AM, Stefan Weil wrote: > +#include "qemu-common.h" > +#include "tcg/tcg.h" /* MAX_OPC_PARAM_IARGS */ > +#i

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-07 Thread Richard Henderson
On 2/7/21 11:52 AM, Peter Maydell wrote: > On Sun, 7 Feb 2021 at 17:41, Richard Henderson > wrote: >> >> On 2/7/21 8:25 AM, Stefan Weil wrote: +#include "qemu-common.h" +#include "tcg/tcg.h" /* MAX_OPC_PARAM_IARGS */ +#include "exec/cpu_ldst.h" +#include "tcg/tcg-op.h

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-07 Thread Peter Maydell
On Sun, 7 Feb 2021 at 17:41, Richard Henderson wrote: > > On 2/7/21 8:25 AM, Stefan Weil wrote: > >> +#include "qemu-common.h" > >> +#include "tcg/tcg.h" /* MAX_OPC_PARAM_IARGS */ > >> +#include "exec/cpu_ldst.h" > >> +#include "tcg/tcg-op.h" > >> +#include "qemu/compiler.h" > >> +#inclu

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-07 Thread Richard Henderson
On 2/7/21 8:25 AM, Stefan Weil wrote: >> +#include "qemu-common.h" >> +#include "tcg/tcg.h"   /* MAX_OPC_PARAM_IARGS */ >> +#include "exec/cpu_ldst.h" >> +#include "tcg/tcg-op.h" >> +#include "qemu/compiler.h" >> +#include >> + > > > ffi.h is not found on macOS with Homebrew. > > This c

Re: [PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-07 Thread Stefan Weil
Am 04.02.21 um 02:44 schrieb Richard Henderson: This requires adjusting where arguments are stored. Place them on the stack at left-aligned positions. Adjust the stack frame to be at entirely positive offsets. Signed-off-by: Richard Henderson --- [...] diff --git a/tcg/tci.c b/tcg/tci.c inde

[PATCH v2 63/93] tcg/tci: Use ffi for calls

2021-02-03 Thread Richard Henderson
This requires adjusting where arguments are stored. Place them on the stack at left-aligned positions. Adjust the stack frame to be at entirely positive offsets. Signed-off-by: Richard Henderson --- include/tcg/tcg.h| 1 + tcg/tci/tcg-target.h | 2 +- tcg/tcg.c|