qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [4503] Implement neg_i32, clean-up.


From: Andrzej Zaborowski
Subject: [Qemu-devel] [4503] Implement neg_i32, clean-up.
Date: Tue, 20 May 2008 11:26:41 +0000

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 via email to

[Prev in Thread] Current Thread [Next in Thread]