Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KwYEl-0007ln-Rl for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KwYEk-0007lQ-Ub for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:07 -0500 Received: from [199.232.76.173] (port=44936 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KwYEk-0007lI-LT for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:06 -0500 Received: from savannah.gnu.org ([199.232.41.3]:52653 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KwYEk-0003a9-5z for qemu-devel@nongnu.org; Sun, 02 Nov 2008 03:23:06 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KwYEj-00072p-GO for qemu-devel@nongnu.org; Sun, 02 Nov 2008 08:23:05 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KwYEi-00072O-WF for qemu-devel@nongnu.org; Sun, 02 Nov 2008 08:23:05 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Sun, 02 Nov 2008 08:23:04 +0000 Subject: [Qemu-devel] [5599] tcg-ops.h: add a subfi wrapper Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5599 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5599 Author: aurel32 Date: 2008-11-02 08:23:04 +0000 (Sun, 02 Nov 2008) Log Message: ----------- tcg-ops.h: add a subfi wrapper Add a subfi (subtract from immediate) wrapper, useful for the PPC target. Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/tcg/tcg-op.h Modified: trunk/tcg/tcg-op.h =================================================================== --- trunk/tcg/tcg-op.h 2008-11-02 08:22:54 UTC (rev 5598) +++ trunk/tcg/tcg-op.h 2008-11-02 08:23:04 UTC (rev 5599) @@ -377,6 +377,13 @@ tcg_gen_op3(INDEX_op_sub_i32, ret, arg1, arg2); } +static inline void tcg_gen_subfi_i32(TCGv ret, int32_t arg1, TCGv arg2) +{ + TCGv t0 = tcg_const_i32(arg1); + tcg_gen_sub_i32(ret, t0, arg2); + tcg_temp_free(t0); +} + static inline void tcg_gen_subi_i32(TCGv ret, TCGv arg1, int32_t arg2) { /* some cases can be optimized here */ @@ -1063,6 +1070,13 @@ tcg_temp_free(t0); } +static inline void tcg_gen_subfi_i64(TCGv ret, int64_t arg1, TCGv arg2) +{ + TCGv t0 = tcg_const_i64(arg1); + tcg_gen_sub_i64(ret, t0, arg2); + tcg_temp_free(t0); +} + static inline void tcg_gen_subi_i64(TCGv ret, TCGv arg1, int64_t arg2) { /* some cases can be optimized here */ @@ -1725,6 +1739,7 @@ #define tcg_gen_addi_tl tcg_gen_addi_i64 #define tcg_gen_sub_tl tcg_gen_sub_i64 #define tcg_gen_neg_tl tcg_gen_neg_i64 +#define tcg_gen_subfi_tl tcg_gen_subi_i64 #define tcg_gen_subi_tl tcg_gen_subi_i64 #define tcg_gen_and_tl tcg_gen_and_i64 #define tcg_gen_andi_tl tcg_gen_andi_i64 @@ -1783,6 +1798,7 @@ #define tcg_gen_addi_tl tcg_gen_addi_i32 #define tcg_gen_sub_tl tcg_gen_sub_i32 #define tcg_gen_neg_tl tcg_gen_neg_i32 +#define tcg_gen_subfi_tl tcg_gen_subfi_i32 #define tcg_gen_subi_tl tcg_gen_subi_i32 #define tcg_gen_and_tl tcg_gen_and_i32 #define tcg_gen_andi_tl tcg_gen_andi_i32