* [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts
@ 2011-09-05 9:06 Stefan Weil
2011-09-05 9:06 ` [Qemu-devel] [PATCH 1/5] tcg/i386: " Stefan Weil
` (5 more replies)
0 siblings, 6 replies; 11+ messages in thread
From: Stefan Weil @ 2011-09-05 9:06 UTC (permalink / raw)
To: QEMU Developers
The number of registers needed for the return value of TCG opcode
INDEX_op_call is calculated in function tcg_gen_callN (nb_rets).
It can be 0 or 1, for 32 bit hosts also 2 (return 64 bit value in
two 32 bit registers).
Some TCG implementations reserve 2 registers although only 1 is used.
The following patches fix this.
[PATCH 1/5] tcg/i386: Only one call output register needed for 64 bit hosts
[PATCH 2/5] tcg/ia64: Only one call output register needed for 64 bit hosts
[PATCH 3/5] tcg/s390: Only one call output register needed for 64 bit hosts
[PATCH 4/5] tcg/sparc: Only one call output register needed for 64 bit hosts
[PATCH 5/5] tcg/ppc64: Only one call output register needed for 64 bit hosts
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Qemu-devel] [PATCH 1/5] tcg/i386: Only one call output register needed for 64 bit hosts
2011-09-05 9:06 [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts Stefan Weil
@ 2011-09-05 9:06 ` Stefan Weil
2011-09-05 9:06 ` [Qemu-devel] [PATCH 2/5] tcg/ia64: " Stefan Weil
` (4 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Stefan Weil @ 2011-09-05 9:06 UTC (permalink / raw)
To: QEMU Developers
The second register is only needed for 32 bit hosts.
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
tcg/i386/tcg-target.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index 7529677..281f87d 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -76,9 +76,11 @@ static const int tcg_target_call_iarg_regs[] = {
#endif
};
-static const int tcg_target_call_oarg_regs[2] = {
+static const int tcg_target_call_oarg_regs[] = {
TCG_REG_EAX,
+#if TCG_TARGET_REG_BITS == 32
TCG_REG_EDX
+#endif
};
static uint8_t *tb_ret_addr;
--
1.7.0.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Qemu-devel] [PATCH 2/5] tcg/ia64: Only one call output register needed for 64 bit hosts
2011-09-05 9:06 [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts Stefan Weil
2011-09-05 9:06 ` [Qemu-devel] [PATCH 1/5] tcg/i386: " Stefan Weil
@ 2011-09-05 9:06 ` Stefan Weil
2011-09-05 9:07 ` [Qemu-devel] [PATCH 3/5] tcg/s390: " Stefan Weil
` (3 subsequent siblings)
5 siblings, 0 replies; 11+ messages in thread
From: Stefan Weil @ 2011-09-05 9:06 UTC (permalink / raw)
To: QEMU Developers; +Cc: Aurelien Jarno
The second register is never used for ia64 hosts.
Cc: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
tcg/ia64/tcg-target.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c
index 9db205d..3803ab6 100644
--- a/tcg/ia64/tcg-target.c
+++ b/tcg/ia64/tcg-target.c
@@ -172,9 +172,8 @@ static const int tcg_target_call_iarg_regs[8] = {
TCG_REG_R63,
};
-static const int tcg_target_call_oarg_regs[2] = {
- TCG_REG_R8,
- TCG_REG_R9
+static const int tcg_target_call_oarg_regs[] = {
+ TCG_REG_R8
};
/* maximum number of register used for input function arguments */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Qemu-devel] [PATCH 3/5] tcg/s390: Only one call output register needed for 64 bit hosts
2011-09-05 9:06 [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts Stefan Weil
2011-09-05 9:06 ` [Qemu-devel] [PATCH 1/5] tcg/i386: " Stefan Weil
2011-09-05 9:06 ` [Qemu-devel] [PATCH 2/5] tcg/ia64: " Stefan Weil
@ 2011-09-05 9:07 ` Stefan Weil
2011-09-07 11:32 ` Alexander Graf
2011-09-05 9:07 ` [Qemu-devel] [PATCH 4/5] tcg/sparc: " Stefan Weil
` (2 subsequent siblings)
5 siblings, 1 reply; 11+ messages in thread
From: Stefan Weil @ 2011-09-05 9:07 UTC (permalink / raw)
To: QEMU Developers; +Cc: Alexander Graf
The second register is only needed for 32 bit hosts.
Cc: Alexander Graf <agraf@suse.de>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
tcg/s390/tcg-target.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c
index 2fc5646..b58df71 100644
--- a/tcg/s390/tcg-target.c
+++ b/tcg/s390/tcg-target.c
@@ -252,7 +252,9 @@ static const int tcg_target_call_iarg_regs[] = {
static const int tcg_target_call_oarg_regs[] = {
TCG_REG_R2,
- TCG_REG_R3,
+#if TCG_TARGET_REG_BITS == 32
+ TCG_REG_R3
+#endif
};
#define S390_CC_EQ 8
--
1.7.0.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Qemu-devel] [PATCH 4/5] tcg/sparc: Only one call output register needed for 64 bit hosts
2011-09-05 9:06 [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts Stefan Weil
` (2 preceding siblings ...)
2011-09-05 9:07 ` [Qemu-devel] [PATCH 3/5] tcg/s390: " Stefan Weil
@ 2011-09-05 9:07 ` Stefan Weil
2011-09-05 9:07 ` [Qemu-devel] [PATCH 5/5] tcg/ppc64: " Stefan Weil
2011-09-17 14:01 ` [Qemu-devel] [PATCH 0/5] " Stefan Weil
5 siblings, 0 replies; 11+ messages in thread
From: Stefan Weil @ 2011-09-05 9:07 UTC (permalink / raw)
To: QEMU Developers; +Cc: Blue Swirl
The second register is only needed for 32 bit hosts.
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
tcg/sparc/tcg-target.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tcg/sparc/tcg-target.c b/tcg/sparc/tcg-target.c
index ac76e11..fc3fd7f 100644
--- a/tcg/sparc/tcg-target.c
+++ b/tcg/sparc/tcg-target.c
@@ -84,9 +84,11 @@ static const int tcg_target_call_iarg_regs[6] = {
TCG_REG_O5,
};
-static const int tcg_target_call_oarg_regs[2] = {
+static const int tcg_target_call_oarg_regs[] = {
TCG_REG_O0,
- TCG_REG_O1,
+#if TCG_TARGET_REG_BITS == 32
+ TCG_REG_O1
+#endif
};
static inline int check_fit_tl(tcg_target_long val, unsigned int bits)
--
1.7.0.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Qemu-devel] [PATCH 5/5] tcg/ppc64: Only one call output register needed for 64 bit hosts
2011-09-05 9:06 [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts Stefan Weil
` (3 preceding siblings ...)
2011-09-05 9:07 ` [Qemu-devel] [PATCH 4/5] tcg/sparc: " Stefan Weil
@ 2011-09-05 9:07 ` Stefan Weil
2011-09-05 15:25 ` malc
2011-09-17 14:01 ` [Qemu-devel] [PATCH 0/5] " Stefan Weil
5 siblings, 1 reply; 11+ messages in thread
From: Stefan Weil @ 2011-09-05 9:07 UTC (permalink / raw)
To: QEMU Developers
The second register is only needed for 32 bit hosts.
Cc: Vassili Karpov <av1474@comtv.ru>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
tcg/ppc64/tcg-target.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
index d831684..bef7aac 100644
--- a/tcg/ppc64/tcg-target.c
+++ b/tcg/ppc64/tcg-target.c
@@ -130,7 +130,7 @@ static const int tcg_target_call_iarg_regs[] = {
TCG_REG_R10
};
-static const int tcg_target_call_oarg_regs[2] = {
+static const int tcg_target_call_oarg_regs[] = {
TCG_REG_R3
};
--
1.7.0.4
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH 5/5] tcg/ppc64: Only one call output register needed for 64 bit hosts
2011-09-05 9:07 ` [Qemu-devel] [PATCH 5/5] tcg/ppc64: " Stefan Weil
@ 2011-09-05 15:25 ` malc
0 siblings, 0 replies; 11+ messages in thread
From: malc @ 2011-09-05 15:25 UTC (permalink / raw)
To: Stefan Weil; +Cc: QEMU Developers
On Mon, 5 Sep 2011, Stefan Weil wrote:
> The second register is only needed for 32 bit hosts.
>
> Cc: Vassili Karpov <av1474@comtv.ru>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> tcg/ppc64/tcg-target.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tcg/ppc64/tcg-target.c b/tcg/ppc64/tcg-target.c
> index d831684..bef7aac 100644
> --- a/tcg/ppc64/tcg-target.c
> +++ b/tcg/ppc64/tcg-target.c
> @@ -130,7 +130,7 @@ static const int tcg_target_call_iarg_regs[] = {
> TCG_REG_R10
> };
>
> -static const int tcg_target_call_oarg_regs[2] = {
> +static const int tcg_target_call_oarg_regs[] = {
> TCG_REG_R3
> };
>
Fine with me.
--
mailto:av1474@comtv.ru
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH 3/5] tcg/s390: Only one call output register needed for 64 bit hosts
2011-09-05 9:07 ` [Qemu-devel] [PATCH 3/5] tcg/s390: " Stefan Weil
@ 2011-09-07 11:32 ` Alexander Graf
2011-09-08 8:12 ` Richard Henderson
0 siblings, 1 reply; 11+ messages in thread
From: Alexander Graf @ 2011-09-07 11:32 UTC (permalink / raw)
To: Stefan Weil; +Cc: QEMU Developers, Richard Henderson
On 05.09.2011, at 11:07, Stefan Weil wrote:
> The second register is only needed for 32 bit hosts.
Looks sane to me. Richard, mind to ack?
Alex
>
> Cc: Alexander Graf <agraf@suse.de>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> tcg/s390/tcg-target.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/tcg/s390/tcg-target.c b/tcg/s390/tcg-target.c
> index 2fc5646..b58df71 100644
> --- a/tcg/s390/tcg-target.c
> +++ b/tcg/s390/tcg-target.c
> @@ -252,7 +252,9 @@ static const int tcg_target_call_iarg_regs[] = {
>
> static const int tcg_target_call_oarg_regs[] = {
> TCG_REG_R2,
> - TCG_REG_R3,
> +#if TCG_TARGET_REG_BITS == 32
> + TCG_REG_R3
> +#endif
> };
>
> #define S390_CC_EQ 8
> --
> 1.7.0.4
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH 3/5] tcg/s390: Only one call output register needed for 64 bit hosts
2011-09-07 11:32 ` Alexander Graf
@ 2011-09-08 8:12 ` Richard Henderson
0 siblings, 0 replies; 11+ messages in thread
From: Richard Henderson @ 2011-09-08 8:12 UTC (permalink / raw)
To: Alexander Graf; +Cc: QEMU Developers
On 09/07/2011 12:32 PM, Alexander Graf wrote:
>
> On 05.09.2011, at 11:07, Stefan Weil wrote:
>
>> The second register is only needed for 32 bit hosts.
>
> Looks sane to me. Richard, mind to ack?
>
>
> Alex
>
>>
>> Cc: Alexander Graf <agraf@suse.de>
>> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Acked-by: Richard Henderson <rth@twiddle.net>
r~
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts
2011-09-05 9:06 [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts Stefan Weil
` (4 preceding siblings ...)
2011-09-05 9:07 ` [Qemu-devel] [PATCH 5/5] tcg/ppc64: " Stefan Weil
@ 2011-09-17 14:01 ` Stefan Weil
2011-09-17 18:51 ` Blue Swirl
5 siblings, 1 reply; 11+ messages in thread
From: Stefan Weil @ 2011-09-17 14:01 UTC (permalink / raw)
To: QEMU Developers; +Cc: Blue Swirl, Anthony Liguori, Aurelien Jarno
Am 05.09.2011 11:06, schrieb Stefan Weil:
> The number of registers needed for the return value of TCG opcode
> INDEX_op_call is calculated in function tcg_gen_callN (nb_rets).
>
> It can be 0 or 1, for 32 bit hosts also 2 (return 64 bit value in
> two 32 bit registers).
>
> Some TCG implementations reserve 2 registers although only 1 is used.
> The following patches fix this.
>
> [PATCH 1/5] tcg/i386: Only one call output register needed for 64 bit
> hosts
> [PATCH 2/5] tcg/ia64: Only one call output register needed for 64 bit
> hosts
> [PATCH 3/5] tcg/s390: Only one call output register needed for 64 bit
> hosts
> [PATCH 4/5] tcg/sparc: Only one call output register needed for 64 bit
> hosts
> [PATCH 5/5] tcg/ppc64: Only one call output register needed for 64 bit
> hosts
Patch 3 was acked by Richard Henderson, so was patch 5 by Malc.
What about the other three patches (i386 / ia64, sparc)? They are all
similar,
so I think they could also be committed without more reviews.
Thanks,
Stefan Weil
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts
2011-09-17 14:01 ` [Qemu-devel] [PATCH 0/5] " Stefan Weil
@ 2011-09-17 18:51 ` Blue Swirl
0 siblings, 0 replies; 11+ messages in thread
From: Blue Swirl @ 2011-09-17 18:51 UTC (permalink / raw)
To: Stefan Weil; +Cc: Anthony Liguori, QEMU Developers, Aurelien Jarno
Thanks, applied all.
On Sat, Sep 17, 2011 at 2:01 PM, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 05.09.2011 11:06, schrieb Stefan Weil:
>>
>> The number of registers needed for the return value of TCG opcode
>> INDEX_op_call is calculated in function tcg_gen_callN (nb_rets).
>>
>> It can be 0 or 1, for 32 bit hosts also 2 (return 64 bit value in
>> two 32 bit registers).
>>
>> Some TCG implementations reserve 2 registers although only 1 is used.
>> The following patches fix this.
>>
>> [PATCH 1/5] tcg/i386: Only one call output register needed for 64 bit
>> hosts
>> [PATCH 2/5] tcg/ia64: Only one call output register needed for 64 bit
>> hosts
>> [PATCH 3/5] tcg/s390: Only one call output register needed for 64 bit
>> hosts
>> [PATCH 4/5] tcg/sparc: Only one call output register needed for 64 bit
>> hosts
>> [PATCH 5/5] tcg/ppc64: Only one call output register needed for 64 bit
>> hosts
>
> Patch 3 was acked by Richard Henderson, so was patch 5 by Malc.
>
> What about the other three patches (i386 / ia64, sparc)? They are all
> similar,
> so I think they could also be committed without more reviews.
>
> Thanks,
> Stefan Weil
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-09-17 18:51 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-05 9:06 [Qemu-devel] [PATCH 0/5] Only one call output register needed for 64 bit hosts Stefan Weil
2011-09-05 9:06 ` [Qemu-devel] [PATCH 1/5] tcg/i386: " Stefan Weil
2011-09-05 9:06 ` [Qemu-devel] [PATCH 2/5] tcg/ia64: " Stefan Weil
2011-09-05 9:07 ` [Qemu-devel] [PATCH 3/5] tcg/s390: " Stefan Weil
2011-09-07 11:32 ` Alexander Graf
2011-09-08 8:12 ` Richard Henderson
2011-09-05 9:07 ` [Qemu-devel] [PATCH 4/5] tcg/sparc: " Stefan Weil
2011-09-05 9:07 ` [Qemu-devel] [PATCH 5/5] tcg/ppc64: " Stefan Weil
2011-09-05 15:25 ` malc
2011-09-17 14:01 ` [Qemu-devel] [PATCH 0/5] " Stefan Weil
2011-09-17 18:51 ` 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).