qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 1/8] tcg: Move some opcode generation functio


From: Bastian Koppelmann
Subject: Re: [Qemu-devel] [PATCH v3 1/8] tcg: Move some opcode generation functions out of line
Date: Wed, 04 Feb 2015 22:12:43 +0000
User-agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0


On 02/03/2015 03:35 PM, Richard Henderson wrote:
Some of these functions are really quite large.  We have a number of
things that ought to be circularly dependent, but we duplicated code
to break that chain for the inlines.

This saved 25% of the code size of one of the translators I examined.

Reviewed-by: Bastian Koppelmann<address@hidden>
Signed-off-by: Richard Henderson<address@hidden>
---
  Makefile.target |    2 +-
  tcg/tcg-op.c    | 1978 +++++++++++++++++++++++++++++++++++++++++++
  tcg/tcg-op.h    | 2488 ++++++++-----------------------------------------------
  tcg/tcg.c       |  137 ---
  tcg/tcg.h       |    3 -
  5 files changed, 2339 insertions(+), 2269 deletions(-)
  create mode 100644 tcg/tcg-op.c


+static inline TCGMemOp tcg_canonicalize_memop(TCGMemOp op, bool is64, bool st)
+{
+    switch (op & MO_SIZE) {
+    case MO_8:
+        op &= ~MO_BSWAP;
+        break;
+    case MO_16:
+        break;
+    case MO_32:
+        if (!is64) {
+            op &= ~MO_SIGN;
+        }
+        break;
+    case MO_64:
+        if (!is64) {
+            tcg_abort();
+        }
+        break;
+    }
+    if (st) {
+        op &= ~MO_SIGN;

+    }
I've got some weird trailing whitespace here, but maybe it's just my mail client.

Cheers,
Bastian



reply via email to

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