From: Stefan Weil <sw@weilnetz.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Stefan Weil <sw@weilnetz.de>, Alexander Graf <agraf@suse.de>,
qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: [Qemu-devel] [PATCH 3/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs
Date: Thu, 13 Sep 2012 19:37:45 +0200 [thread overview]
Message-ID: <1347557866-7256-4-git-send-email-sw@weilnetz.de> (raw)
In-Reply-To: <1347557866-7256-1-git-send-email-sw@weilnetz.de>
32 bit x86 hosts don't need registers for helper function arguments
because they use the default stack based calling convention.
Removing the registers allows simpler code for function
tcg_target_get_call_iarg_regs_count.
Signed-off-by: Stefan Weil <sw@weilnetz.de>
---
tcg/i386/tcg-target.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index ef63967..375d87d 100644
--- a/tcg/i386/tcg-target.c
+++ b/tcg/i386/tcg-target.c
@@ -75,9 +75,7 @@ static const int tcg_target_call_iarg_regs[] = {
TCG_REG_R8,
TCG_REG_R9,
#else
- TCG_REG_EAX,
- TCG_REG_EDX,
- TCG_REG_ECX
+ /* 32 bit mode uses stack based calling convention (GCC default). */
#endif
};
@@ -127,11 +125,7 @@ static void patch_reloc(uint8_t *code_ptr, int type,
/* maximum number of register used for input function arguments */
static inline int tcg_target_get_call_iarg_regs_count(int flags)
{
- if (TCG_TARGET_REG_BITS == 64) {
- return ARRAY_SIZE(tcg_target_call_iarg_regs);
- }
-
- return 0;
+ return ARRAY_SIZE(tcg_target_call_iarg_regs);
}
/* parse target specific constraints */
--
1.7.10
next prev parent reply other threads:[~2012-09-13 17:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 17:37 [Qemu-devel] [PATCH v2 0/4] Fix and clean tcg_target_get_call_iarg_regs_count Stefan Weil
2012-09-13 17:37 ` [Qemu-devel] [PATCH 1/4] w64: Fix TCG helper functions with 5 arguments Stefan Weil
2012-09-13 21:22 ` Aurelien Jarno
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:37 ` [Qemu-devel] [PATCH 2/4] tcg/i386: Add shortcuts for registers used in L constraint Stefan Weil
2012-09-13 21:21 ` Aurelien Jarno
2012-09-13 21:30 ` Richard Henderson
2012-09-13 21:47 ` Aurelien Jarno
2012-09-13 22:03 ` Peter Maydell
2012-09-13 22:20 ` Richard Henderson
2012-09-14 5:18 ` Stefan Weil
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:37 ` Stefan Weil [this message]
2012-09-13 21:22 ` [Qemu-devel] [PATCH 3/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs Aurelien Jarno
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:37 ` [Qemu-devel] [PATCH 4/4] tcg: Remove tcg_target_get_call_iarg_regs_count Stefan Weil
2012-09-13 21:22 ` Aurelien Jarno
2012-09-22 14:55 ` Aurelien Jarno
2012-09-13 17:52 ` [Qemu-devel] [PATCH v2 0/4] Fix and clean tcg_target_get_call_iarg_regs_count Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1347557866-7256-4-git-send-email-sw@weilnetz.de \
--to=sw@weilnetz.de \
--cc=agraf@suse.de \
--cc=aurelien@aurel32.net \
--cc=blauwirbel@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).