From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KLkWe-0004OD-3q for qemu-devel@nongnu.org; Wed, 23 Jul 2008 16:01:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KLkWc-0004N2-Fa for qemu-devel@nongnu.org; Wed, 23 Jul 2008 16:01:26 -0400 Received: from [199.232.76.173] (port=59281 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KLkWb-0004Ms-SE for qemu-devel@nongnu.org; Wed, 23 Jul 2008 16:01:25 -0400 Received: from savannah.gnu.org ([199.232.41.3]:47383 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 1KLkWb-0006Du-EU for qemu-devel@nongnu.org; Wed, 23 Jul 2008 16:01:25 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KLkWa-0002GV-Pf for qemu-devel@nongnu.org; Wed, 23 Jul 2008 20:01:24 +0000 Received: from malc by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KLkWa-0002GP-DW for qemu-devel@nongnu.org; Wed, 23 Jul 2008 20:01:24 +0000 MIME-Version: 1.0 Errors-To: malc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: malc Message-Id: Date: Wed, 23 Jul 2008 20:01:24 +0000 Subject: [Qemu-devel] [4934] Provide extNs_M instructions 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: 4934 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4934 Author: malc Date: 2008-07-23 20:01:23 +0000 (Wed, 23 Jul 2008) Log Message: ----------- Provide extNs_M instructions Modified Paths: -------------- trunk/tcg/ppc/tcg-target.c trunk/tcg/ppc/tcg-target.h trunk/tcg/ppc64/tcg-target.c trunk/tcg/ppc64/tcg-target.h Modified: trunk/tcg/ppc/tcg-target.c =================================================================== --- trunk/tcg/ppc/tcg-target.c 2008-07-23 20:01:19 UTC (rev 4933) +++ trunk/tcg/ppc/tcg-target.c 2008-07-23 20:01:23 UTC (rev 4934) @@ -1339,6 +1339,13 @@ tcg_out_qemu_st(s, args, 3); break; + case INDEX_op_ext8s_i32: + tcg_out32 (s, EXTSB | RS (args[1]) | RA (args[0])); + break; + case INDEX_op_ext16s_i32: + tcg_out32 (s, EXTSH | RS (args[1]) | RA (args[0])); + break; + default: tcg_dump_ops (s, stderr); tcg_abort (); @@ -1415,6 +1422,9 @@ { INDEX_op_qemu_st64, { "M", "M", "M", "M" } }, #endif + { INDEX_op_ext8s_i32, { "r", "r" } }, + { INDEX_op_ext16s_i32, { "r", "r" } }, + { -1 }, }; Modified: trunk/tcg/ppc/tcg-target.h =================================================================== --- trunk/tcg/ppc/tcg-target.h 2008-07-23 20:01:19 UTC (rev 4933) +++ trunk/tcg/ppc/tcg-target.h 2008-07-23 20:01:23 UTC (rev 4934) @@ -71,6 +71,8 @@ /* optional instructions */ #define TCG_TARGET_HAS_neg_i32 #define TCG_TARGET_HAS_div_i32 +#define TCG_TARGET_HAS_ext8s_i32 +#define TCG_TARGET_HAS_ext16s_i32 #define TCG_AREG0 TCG_REG_R27 #define TCG_AREG1 TCG_REG_R24 Modified: trunk/tcg/ppc64/tcg-target.c =================================================================== --- trunk/tcg/ppc64/tcg-target.c 2008-07-23 20:01:19 UTC (rev 4933) +++ trunk/tcg/ppc64/tcg-target.c 2008-07-23 20:01:23 UTC (rev 4934) @@ -969,6 +969,8 @@ static void tcg_out_op (TCGContext *s, int opc, const TCGArg *args, const int *const_args) { + int c; + switch (opc) { case INDEX_op_exit_tb: tcg_out_movi (s, TCG_TYPE_I64, TCG_REG_R3, args[0]); @@ -1313,6 +1315,21 @@ tcg_out_qemu_st (s, args, 3); break; + case INDEX_op_ext8s_i32: + case INDEX_op_ext8s_i64: + c = EXTSB; + goto gen_ext; + case INDEX_op_ext16s_i32: + case INDEX_op_ext16s_i64: + c = EXTSH; + goto gen_ext; + case INDEX_op_ext32s_i64: + c = EXTSW; + goto gen_ext; + gen_ext: + tcg_out32 (s, c | RS (args[1]) | RA (args[0])); + break; + default: tcg_dump_ops (s, stderr); tcg_abort (); @@ -1404,6 +1421,12 @@ { INDEX_op_qemu_st32, { "K", "K" } }, { INDEX_op_qemu_st64, { "M", "M", "M" } }, + { INDEX_op_ext8s_i32, { "r", "r" } }, + { INDEX_op_ext16s_i32, { "r", "r" } }, + { INDEX_op_ext8s_i64, { "r", "r" } }, + { INDEX_op_ext16s_i64, { "r", "r" } }, + { INDEX_op_ext32s_i64, { "r", "r" } }, + { -1 }, }; Modified: trunk/tcg/ppc64/tcg-target.h =================================================================== --- trunk/tcg/ppc64/tcg-target.h 2008-07-23 20:01:19 UTC (rev 4933) +++ trunk/tcg/ppc64/tcg-target.h 2008-07-23 20:01:23 UTC (rev 4934) @@ -72,6 +72,11 @@ #define TCG_TARGET_HAS_div_i32 #define TCG_TARGET_HAS_neg_i64 #define TCG_TARGET_HAS_div_i64 +#define TCG_TARGET_HAS_ext8s_i32 +#define TCG_TARGET_HAS_ext16s_i32 +#define TCG_TARGET_HAS_ext8s_i64 +#define TCG_TARGET_HAS_ext16s_i64 +#define TCG_TARGET_HAS_ext32s_i64 #define TCG_AREG0 TCG_REG_R27 #define TCG_AREG1 TCG_REG_R24