From: Andrzej Zaborowski <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [4503] Implement neg_i32, clean-up.
Date: Tue, 20 May 2008 11:26:41 +0000 [thread overview]
Message-ID: <E1JyPzN-0002LO-34@cvs.savannah.gnu.org> (raw)
Revision: 4503
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4503
Author: balrog
Date: 2008-05-20 11:26:40 +0000 (Tue, 20 May 2008)
Log Message:
-----------
Implement neg_i32, clean-up.
Modified Paths:
--------------
trunk/tcg/arm/tcg-target.c
trunk/tcg/arm/tcg-target.h
Modified: trunk/tcg/arm/tcg-target.c
===================================================================
--- trunk/tcg/arm/tcg-target.c 2008-05-20 00:07:58 UTC (rev 4502)
+++ trunk/tcg/arm/tcg-target.c 2008-05-20 11:26:40 UTC (rev 4503)
@@ -64,7 +64,7 @@
TCG_REG_R0, TCG_REG_R1
};
-static void patch_reloc(uint8_t *code_ptr, int type,
+static void patch_reloc(uint8_t *code_ptr, int type,
tcg_target_long value, tcg_target_long addend)
{
switch (type) {
@@ -913,7 +913,7 @@
1, 0, addr_reg2, SHIFT_IMM_LSL(0));
tcg_out_dat_imm(s, cond, ARITH_MOV, 2, 0, mem_index);
# endif
- tcg_out_bl(s, cond, (tcg_target_long) qemu_ld_helpers[s_bits] -
+ tcg_out_bl(s, cond, (tcg_target_long) qemu_ld_helpers[s_bits] -
(tcg_target_long) s->code_ptr);
switch (opc) {
@@ -1178,10 +1178,9 @@
#endif
}
-extern void exec_loop;
static uint8_t *tb_ret_addr;
-static inline void tcg_out_op(TCGContext *s, int opc,
+static inline void tcg_out_op(TCGContext *s, int opc,
const TCGArg *args, const int *const_args)
{
int c;
@@ -1312,6 +1311,9 @@
args[0], args[1], args[2], args[3],
args[4], args[5], SHIFT_IMM_LSL(0));
break;
+ case INDEX_op_neg_i32:
+ tcg_out_dat_imm(s, COND_AL, ARITH_RSB, args[0], args[1], 0);
+ break;
case INDEX_op_mul_i32:
tcg_out_mul32(s, COND_AL, args[0], args[1], args[2]);
break;
@@ -1384,7 +1386,7 @@
case INDEX_op_qemu_ld64:
tcg_out_qemu_ld(s, COND_AL, args, 3);
break;
-
+
case INDEX_op_qemu_st8:
tcg_out_qemu_st(s, COND_AL, args, 0);
break;
@@ -1445,6 +1447,7 @@
{ INDEX_op_and_i32, { "r", "r", "r" } },
{ INDEX_op_or_i32, { "r", "r", "r" } },
{ INDEX_op_xor_i32, { "r", "r", "r" } },
+ { INDEX_op_neg_i32, { "r", "r" } },
{ INDEX_op_shl_i32, { "r", "r", "ri" } },
{ INDEX_op_shr_i32, { "r", "r", "ri" } },
Modified: trunk/tcg/arm/tcg-target.h
===================================================================
--- trunk/tcg/arm/tcg-target.h 2008-05-20 00:07:58 UTC (rev 4502)
+++ trunk/tcg/arm/tcg-target.h 2008-05-20 11:26:40 UTC (rev 4503)
@@ -31,6 +31,8 @@
#undef TCG_TARGET_HAS_bswap_i32
#define TCG_TARGET_HAS_ext8s_i32
#define TCG_TARGET_HAS_ext16s_i32
+#define TCG_TARGET_HAS_neg_i32
+#undef TCG_TARGET_HAS_neg_i64
#undef TCG_TARGET_STACK_GROWSUP
enum {
reply other threads:[~2008-05-20 11:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1JyPzN-0002LO-34@cvs.savannah.gnu.org \
--to=balrogg@gmail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).