configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization
The reason why softmmu condition in configure is that softmmu is thought to be a logical prerequisite of ldst optimization.
Current patch causes compilation error if removed the condition above.
To avoid compilation error, it needs more macros in other sources, such as, tcg.c and/or tcg-target.c, because those files are used both by softmmu and by non-softmmu targets.
For example, tcg_out_qemu_ldst_slow_path() call site in tcg.c is wrapped only by CONFIG_QEMU_LDST_OPTIMIZATION, while it calls ldst specific function wrapped by CONFIG_SOFTMMU in tcg/i386/tcg-target.c. I'm not sure which one is better, CONFIG_SOFTMMU pre-condition in configure or more those macros in tcg sources.
How do you think about it?
------- Original Message -------
Sender : Blue Swirl<[email protected]>
Date : 2012-07-14 22:13 (GMT+09:00)
Title : Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization
Quoted 11 lines · Yeongkyoon Lee
Enable
CONFIG_QEMU_LDST_OPTIMIZATIONfor TCG qemu_ld/st optimization only when a target uses softmmu and a host is i386 orx86_64.--- configure | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)configure +0
-0
configure case "$target_arch2" in · line 3705
Quoted 6 lines
configure +3
-0@@ -3700,6 +3700,14 @@ case "$target_arch2" in ;; esac +case "$cpu" in + i386|x86_64) + if [ "$target_softmmu" = "yes" ] ; then
I suppose this check is not needed, user emulators will not use the memory access helpers or TLB.
Quoted 11 lines
configure +5
-1+ echo "CONFIG_QEMU_LDST_OPTIMIZATION=y" >> $config_target_mak + fi + ;; +esac + echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak --1.7.4.1
Ping?
Quoted 47 lines · YeongKyoon Lee
The reason why softmmu condition in configure is that softmmu is thought to be a logical prerequisite of ldst optimization.
Current patch causes compilation error if removed the condition above.
To avoid compilation error, it needs more macros in other sources, such as,tcg.cand/ortcg-target.c, because those files are used both by softmmu and by non-softmmu targets.For example,
tcg_out_qemu_ldst_slow_path()call site intcg.cis wrapped only byCONFIG_QEMU_LDST_OPTIMIZATION, while it calls ldst specific function wrapped byCONFIG_SOFTMMUintcg/i386/tcg-target.c. I'm not sure which one is better,CONFIG_SOFTMMUpre-condition in configure or more those macros in tcg sources.How do you think about it?
------- Original Message -------
Sender : Blue Swirl<[email protected]>
Date : 2012-07-14 22:13 (GMT+09:00)
Title : Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: AddCONFIG_QEMU_LDST_OPTIMIZATIONfor TCG qemu_ld/st optimizationQuoted 11 lines · Yeongkyoon Lee
Enable
CONFIG_QEMU_LDST_OPTIMIZATIONfor TCG qemu_ld/st optimization only when a target uses softmmu and a host is i386 orx86_64.--- configure | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)configure +0
-0configure case "$target_arch2" in · line 3705
Quoted 6 lines
configure +3
-0@@ -3700,6 +3700,14 @@ case "$target_arch2" in ;; esac +case "$cpu" in + i386|x86_64) + if [ "$target_softmmu" = "yes" ] ; thenI suppose this check is not needed, user emulators will not use the memory access helpers or TLB.
Quoted 11 lines
configure +5
-1+ echo "CONFIG_QEMU_LDST_OPTIMIZATION=y" >> $config_target_mak + fi + ;; +esac + echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak --1.7.4.1
Quoted 8 lines · YeongKyoon Lee
The reason why softmmu condition in configure is that softmmu is thought to be a logical prerequisite of ldst optimization.
Current patch causes compilation error if removed the condition above.
To avoid compilation error, it needs more macros in other sources, such as,tcg.cand/ortcg-target.c, because those files are used both by softmmu and by non-softmmu targets.For example,
tcg_out_qemu_ldst_slow_path()call site intcg.cis wrapped only byCONFIG_QEMU_LDST_OPTIMIZATION, while it calls ldst specific function wrapped byCONFIG_SOFTMMUintcg/i386/tcg-target.c. I'm not sure which one is better,CONFIG_SOFTMMUpre-condition in configure or more those macros in tcg sources.How do you think about it?
I'd rather remove the configure check and add #ifdeffery to tcg-target.c. This is how user mode vs. softmmu is handled now wrt. loads and stores.
Quoted 40 lines
------- Original Message -------
Sender : Blue Swirl<[email protected]>
Date : 2012-07-14 22:13 (GMT+09:00)
Title : Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: AddCONFIG_QEMU_LDST_OPTIMIZATIONfor TCG qemu_ld/st optimizationQuoted 11 lines · Yeongkyoon Lee
Enable
CONFIG_QEMU_LDST_OPTIMIZATIONfor TCG qemu_ld/st optimization only when a target uses softmmu and a host is i386 orx86_64.--- configure | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)configure +0
-0configure case "$target_arch2" in · line 3705
Quoted 6 lines
configure +3
-0@@ -3700,6 +3700,14 @@ case "$target_arch2" in ;; esac +case "$cpu" in + i386|x86_64) + if [ "$target_softmmu" = "yes" ] ; thenI suppose this check is not needed, user emulators will not use the memory access helpers or TLB.
Quoted 11 lines
configure +5
-1+ echo "CONFIG_QEMU_LDST_OPTIMIZATION=y" >> $config_target_mak + fi + ;; +esac + echo "TARGET_SHORT_ALIGNMENT=$target_short_alignment" >> $config_target_mak echo "TARGET_INT_ALIGNMENT=$target_int_alignment" >> $config_target_mak echo "TARGET_LONG_ALIGNMENT=$target_long_alignment" >> $config_target_mak --1.7.4.1