* [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization
2012-07-14 10:23 [Qemu-devel] [RFC][PATCH v3 0/3] tcg: enhance code generation quality for qemu_ld/st IRs Yeongkyoon Lee
@ 2012-07-14 10:23 ` Yeongkyoon Lee
2012-07-14 13:13 ` Blue Swirl
0 siblings, 1 reply; 5+ messages in thread
From: Yeongkyoon Lee @ 2012-07-14 10:23 UTC (permalink / raw)
To: qemu-devel; +Cc: laurent.desnogues, peter.maydell, Yeongkyoon Lee
Enable CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization only when
a target uses softmmu and a host is i386 or x86_64.
---
configure | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/configure b/configure
index 500fe24..5b39c80 100755
--- a/configure
+++ b/configure
@@ -3700,6 +3700,14 @@ case "$target_arch2" in
;;
esac
+case "$cpu" in
+ i386|x86_64)
+ if [ "$target_softmmu" = "yes" ] ; then
+ 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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization
2012-07-14 10:23 ` [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization Yeongkyoon Lee
@ 2012-07-14 13:13 ` Blue Swirl
0 siblings, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2012-07-14 13:13 UTC (permalink / raw)
To: Yeongkyoon Lee; +Cc: laurent.desnogues, peter.maydell, qemu-devel
On Sat, Jul 14, 2012 at 10:23 AM, Yeongkyoon Lee
<yeongkyoon.lee@samsung.com> wrote:
> Enable CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization only when
> a target uses softmmu and a host is i386 or x86_64.
> ---
> configure | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/configure b/configure
> index 500fe24..5b39c80 100755
> --- a/configure
> +++ b/configure
> @@ -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.
> + 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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization
@ 2012-07-17 2:06 YeongKyoon Lee
2012-07-19 11:16 ` Yeongkyoon Lee
2012-07-23 16:53 ` Blue Swirl
0 siblings, 2 replies; 5+ messages in thread
From: YeongKyoon Lee @ 2012-07-17 2:06 UTC (permalink / raw)
To: Blue Swirl
Cc: laurent.desnogues@gmail.com, peter.maydell@linaro.org,
qemu-devel@nongnu.org
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<blauwirbel@gmail.com>
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
On Sat, Jul 14, 2012 at 10:23 AM, Yeongkyoon Lee
wrote:
> Enable CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization only when
> a target uses softmmu and a host is i386 or x86_64.
> ---
> configure | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/configure b/configure
> index 500fe24..5b39c80 100755
> --- a/configure
> +++ b/configure
> @@ -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.
> + 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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization
2012-07-17 2:06 [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization YeongKyoon Lee
@ 2012-07-19 11:16 ` Yeongkyoon Lee
2012-07-23 16:53 ` Blue Swirl
1 sibling, 0 replies; 5+ messages in thread
From: Yeongkyoon Lee @ 2012-07-19 11:16 UTC (permalink / raw)
To: yeongkyoon.lee
Cc: Blue Swirl, laurent.desnogues@gmail.com, qemu-devel@nongnu.org,
peter.maydell@linaro.org
Ping?
On 2012년 07월 17일 11:06, YeongKyoon Lee wrote:
> 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<blauwirbel@gmail.com>
> 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
>
> On Sat, Jul 14, 2012 at 10:23 AM, Yeongkyoon Lee
> wrote:
>> Enable CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization only when
>> a target uses softmmu and a host is i386 or x86_64.
>> ---
>> configure | 8 ++++++++
>> 1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 500fe24..5b39c80 100755
>> --- a/configure
>> +++ b/configure
>> @@ -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.
>
>> + 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
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization
2012-07-17 2:06 [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization YeongKyoon Lee
2012-07-19 11:16 ` Yeongkyoon Lee
@ 2012-07-23 16:53 ` Blue Swirl
1 sibling, 0 replies; 5+ messages in thread
From: Blue Swirl @ 2012-07-23 16:53 UTC (permalink / raw)
To: yeongkyoon.lee
Cc: laurent.desnogues@gmail.com, peter.maydell@linaro.org,
qemu-devel@nongnu.org
On Tue, Jul 17, 2012 at 2:06 AM, YeongKyoon Lee
<yeongkyoon.lee@samsung.com> wrote:
> 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?
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.
>
> ------- Original Message -------
> Sender : Blue Swirl<blauwirbel@gmail.com>
> 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
>
> On Sat, Jul 14, 2012 at 10:23 AM, Yeongkyoon Lee
> wrote:
>> Enable CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization only when
>> a target uses softmmu and a host is i386 or x86_64.
>> ---
>> configure | 8 ++++++++
>> 1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 500fe24..5b39c80 100755
>> --- a/configure
>> +++ b/configure
>> @@ -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.
>
>> + 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
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-23 16:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-17 2:06 [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization YeongKyoon Lee
2012-07-19 11:16 ` Yeongkyoon Lee
2012-07-23 16:53 ` Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2012-07-14 10:23 [Qemu-devel] [RFC][PATCH v3 0/3] tcg: enhance code generation quality for qemu_ld/st IRs Yeongkyoon Lee
2012-07-14 10:23 ` [Qemu-devel] [RFC][PATCH v3 1/3] configure: Add CONFIG_QEMU_LDST_OPTIMIZATION for TCG qemu_ld/st optimization Yeongkyoon Lee
2012-07-14 13:13 ` Blue Swirl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).