From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NL5Mh-0006DJ-2D for qemu-devel@nongnu.org; Wed, 16 Dec 2009 20:41:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NL5Mf-0006AY-MP for qemu-devel@nongnu.org; Wed, 16 Dec 2009 20:41:14 -0500 Received: from [199.232.76.173] (port=53943 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NL5Mf-0006AG-KF for qemu-devel@nongnu.org; Wed, 16 Dec 2009 20:41:13 -0500 Received: from are.twiddle.net ([75.149.56.221]:37538) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NL5Mf-0001t3-0r for qemu-devel@nongnu.org; Wed, 16 Dec 2009 20:41:13 -0500 Message-Id: From: Richard Henderson Date: Wed, 16 Dec 2009 17:19:58 -0800 Subject: [Qemu-devel] [PATCH 0/7] tcg: conditional set and move opcodes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This patch series adds support for setcond (aka setcc) and movcond (aka cmov) opcodes to TCG. These new opcodes are considered "required" by the backend, because expanding them at the tcg level breaks the basic block. There might be some way to emulate within tcg internals, but that doesn't seem worthwhile, as essentially all hosts have some form of support for these. I've implemented support for the new opcodes within the x86_64, i386, and sparc tcg backends. The later is untested due to lack of hardware and failure of the build system to cross-compile. However, it should be a decent starting point for whoever can. I've implementing support for the new opcodes within the alpha, i386 and mips translators. The translations work, as far as I can tell from linux-user-test. Comments? r~ Richard Henderson (7): tcg: Generic support for conditional set and conditional move. tcg-amd64: Implement setcond and movcond. target-alpha: Use setcond/movcond in integer compares and cmoves. tcg-i386: Implement setcond, movcond, setcond2. tcg-sparc: Implement setcond, movcond, setcond2, brcond2. target-i386: Use setcond and movcond. target-mips: Use setcond and movcond. elf.h | 2 + target-alpha/translate.c | 66 ++++---- target-i386/translate.c | 192 ++++++++++------------ target-mips/translate.c | 124 ++++++++------- tcg/README | 16 ++- tcg/i386/tcg-target.c | 280 ++++++++++++++++++++++++++------ tcg/sparc/tcg-target.c | 415 ++++++++++++++++++++++++++++++++++++++++------ tcg/tcg-op.h | 91 ++++++++++ tcg/tcg-opc.h | 5 + tcg/tcg.c | 23 ++- tcg/tcg.h | 5 + tcg/x86_64/tcg-target.c | 65 +++++++- 12 files changed, 973 insertions(+), 311 deletions(-)