From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JsZML-0005DW-SJ for qemu-devel@nongnu.org; Sun, 04 May 2008 04:14:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JsZMJ-0005BJ-6x for qemu-devel@nongnu.org; Sun, 04 May 2008 04:14:12 -0400 Received: from [199.232.76.173] (port=50837 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JsZMJ-0005B5-3X for qemu-devel@nongnu.org; Sun, 04 May 2008 04:14:11 -0400 Received: from savannah.gnu.org ([199.232.41.3] 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 1JsZMI-0005cW-Lv for qemu-devel@nongnu.org; Sun, 04 May 2008 04:14:10 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1JsZMH-0007lR-Iw for qemu-devel@nongnu.org; Sun, 04 May 2008 08:14:09 +0000 Received: from ths by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1JsZMH-0007lN-7S for qemu-devel@nongnu.org; Sun, 04 May 2008 08:14:09 +0000 MIME-Version: 1.0 Errors-To: ths Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Thiemo Seufer Message-Id: Date: Sun, 04 May 2008 08:14:09 +0000 Subject: [Qemu-devel] [4319] Add helpers and shorthands for mul and muli operations. 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: 4319 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4319 Author: ths Date: 2008-05-04 08:14:08 +0000 (Sun, 04 May 2008) Log Message: ----------- Add helpers and shorthands for mul and muli operations. Modified Paths: -------------- trunk/tcg/tcg-op.h Modified: trunk/tcg/tcg-op.h =================================================================== --- trunk/tcg/tcg-op.h 2008-05-04 08:06:33 UTC (rev 4318) +++ trunk/tcg/tcg-op.h 2008-05-04 08:14:08 UTC (rev 4319) @@ -438,6 +438,11 @@ tcg_gen_op3(INDEX_op_mul_i32, ret, arg1, arg2); } +static inline void tcg_gen_muli_i32(TCGv ret, TCGv arg1, int32_t arg2) +{ + tcg_gen_mul_i32(ret, arg1, tcg_const_i32(arg2)); +} + #ifdef TCG_TARGET_HAS_div_i32 static inline void tcg_gen_div_i32(TCGv ret, TCGv arg1, TCGv arg2) { @@ -698,6 +703,11 @@ tcg_gen_mov_i64(ret, t0); } +static inline void tcg_gen_muli_i64(TCGv ret, TCGv arg1, int64_t arg2) +{ + tcg_gen_mul_i64(ret, arg1, tcg_const_i64(arg2)); +} + static inline void tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2) { tcg_gen_helper_1_2(tcg_helper_div_i64, ret, arg1, arg2); @@ -886,6 +896,11 @@ tcg_gen_op3(INDEX_op_mul_i64, ret, arg1, arg2); } +static inline void tcg_gen_muli_i64(TCGv ret, TCGv arg1, int64_t arg2) +{ + tcg_gen_mul_i64(ret, arg1, tcg_const_i64(arg2)); +} + #ifdef TCG_TARGET_HAS_div_i64 static inline void tcg_gen_div_i64(TCGv ret, TCGv arg1, TCGv arg2) { @@ -1395,6 +1410,8 @@ #define tcg_gen_sar_tl tcg_gen_sar_i64 #define tcg_gen_sari_tl tcg_gen_sari_i64 #define tcg_gen_brcond_tl tcg_gen_brcond_i64 +#define tcg_gen_mul_tl tcg_gen_mul_i64 +#define tcg_gen_muli_tl tcg_gen_muli_i64 #define tcg_gen_discard_tl tcg_gen_discard_i64 #define tcg_gen_trunc_tl_i32 tcg_gen_trunc_i64_i32 #define tcg_gen_trunc_i64_tl tcg_gen_mov_i64 @@ -1435,6 +1452,8 @@ #define tcg_gen_sar_tl tcg_gen_sar_i32 #define tcg_gen_sari_tl tcg_gen_sari_i32 #define tcg_gen_brcond_tl tcg_gen_brcond_i32 +#define tcg_gen_mul_tl tcg_gen_mul_i32 +#define tcg_gen_muli_tl tcg_gen_muli_i32 #define tcg_gen_discard_tl tcg_gen_discard_i32 #define tcg_gen_trunc_tl_i32 tcg_gen_mov_i32 #define tcg_gen_trunc_i64_tl tcg_gen_trunc_i64_i32