aboutsummaryrefslogtreecommitdiff
path: root/tcg
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2012-09-13 19:37:45 +0200
committerAurelien Jarno <aurelien@aurel32.net>2012-09-22 16:52:37 +0200
commitd73685e3c3936fd7851a32eff5443405cb5368be (patch)
tree498d837fd59471c535d58f2ed39b383f688c0dc8 /tcg
parentb18212c66870f119111e0777fcc19462ae07eb70 (diff)
downloadqemu-d73685e3c3936fd7851a32eff5443405cb5368be.zip
qemu-d73685e3c3936fd7851a32eff5443405cb5368be.tar.gz
qemu-d73685e3c3936fd7851a32eff5443405cb5368be.tar.bz2
tcg/i386: Remove unused registers from tcg_target_call_iarg_regs
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> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Diffstat (limited to 'tcg')
-rw-r--r--tcg/i386/tcg-target.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c
index a87c8ba..43c9719 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
};
@@ -129,11 +127,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 */