qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Remove unused registers from tcg_


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH 2/4] tcg/i386: Remove unused registers from tcg_target_call_iarg_regs
Date: Thu, 13 Sep 2012 07:50:57 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120827 Thunderbird/15.0

Am 12.09.2012 23:18, schrieb Peter Maydell:
On 12 September 2012 21:44, Stefan Weil <address@hidden> wrote:
--- 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
  };
This makes the array zero-length for 32 bit targets, but functions
like tcg_out_tlb_load() and tcg_out_qemu_ld() still unconditionally
access elements in it...

-- PMM

Thanks for the hint. I'm afraid there are a lot more functions
of that kind in i386/tcg-target.c.

I could use conditional compilation for those accesses,
but first I'd like to understand why this works at all.

- sw




reply via email to

[Prev in Thread] Current Thread [Next in Thread]