Skip to contentSkip to conversation

[4565] Convert m68k target to TCG.

Qemu-devel Paul Brook 1 participant 1 message May 24, 2008

lore
Share & tools
lore

Paul Brook

author
#0 lore raw

Revision: 4565

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4565
Author:   pbrook
Date:     2008-05-24 22:29:16 +0000 (Sat, 24 May 2008)

Log Message:
-----------
Convert m68k target to TCG.

Modified Paths:
--------------

    trunk/configure
    trunk/target-m68k/cpu.h
    trunk/target-m68k/exec.h
    trunk/target-m68k/helper.c
    trunk/target-m68k/op_helper.c
    trunk/target-m68k/qregs.def
    trunk/target-m68k/translate.c

Added Paths:
-----------
trunk/target-m68k/helpers.h

Removed Paths:
-------------

    trunk/target-m68k/op-hacks.h
    trunk/target-m68k/op.c
    trunk/target-m68k/op_mem.h

Modified: trunk/configure
===================================================================

configure +0 -2
@@ -1237,10 +1237,8 @@
   ;;
   m68k)
     echo "TARGET_ARCH=m68k" >> $config_mak
-    echo "CONFIG_DYNGEN_OP=yes" >> $config_mak
     echo "#define TARGET_ARCH \"m68k\"" >> $config_h
     echo "#define TARGET_M68K 1" >> $config_h
-    echo "#define CONFIG_DYNGEN_OP 1" >> $config_h
     bflt="yes"
   ;;
   mips|mipsel)

Modified: trunk/target-m68k/cpu.h
===================================================================

target-m68k/cpu.h +3 -4
@@ -108,7 +108,7 @@
     int exception_index;
     int interrupt_request;
     int user_mode_only;
-    int halted;
+    uint32_t halted;
 
     int pending_vector;
     int pending_level;
@@ -120,6 +120,7 @@
     uint32_t features;
 } CPUM68KState;
 
+void m68k_tcg_init(void);
 CPUM68KState *cpu_m68k_init(const char *cpu_model);
 int cpu_m68k_exec(CPUM68KState *s);
 void cpu_m68k_close(CPUM68KState *s);
@@ -141,9 +142,7 @@
     CC_OP_CMPW,  /* CC_DEST = result, CC_SRC = source */
     CC_OP_ADDX,  /* CC_DEST = result, CC_SRC = source */
     CC_OP_SUBX,  /* CC_DEST = result, CC_SRC = source */
-    CC_OP_SHL,   /* CC_DEST = source, CC_SRC = shift */
-    CC_OP_SHR,   /* CC_DEST = source, CC_SRC = shift */
-    CC_OP_SAR,   /* CC_DEST = source, CC_SRC = shift */
+    CC_OP_SHIFT, /* CC_DEST = result, CC_SRC = carry */
 };
 
 #define CCF_C 0x01

Modified: trunk/target-m68k/exec.h
===================================================================

target-m68k/exec.h +0 -2
@@ -45,8 +45,6 @@
 #endif
 
 void cpu_m68k_flush_flags(CPUM68KState *env, int cc_op);
-float64 helper_sub_cmpf64(CPUM68KState *env, float64 src0, float64 src1);
-void helper_movec(CPUM68KState *env, int reg, uint32_t val);
 
 void cpu_loop_exit(void);
 

Modified: trunk/target-m68k/helper.c
===================================================================

target-m68k/helper.c +552 -48

641 lines not on this page · raw message

Added: trunk/target-m68k/helpers.h
===================================================================

target-m68k/helpers.h +138 -0

138 lines not on this page · raw message

Deleted: trunk/target-m68k/op-hacks.h
===================================================================

target-m68k/op-hacks.h +0 -130

130 lines not on this page · raw message

Deleted: trunk/target-m68k/op.c
===================================================================

target-m68k/op.c +0 -1059

1,059 lines not on this page · raw message

Modified: trunk/target-m68k/op_helper.c
===================================================================

target-m68k/op_helper.c +69 -0

78 lines not on this page · raw message

Deleted: trunk/target-m68k/op_mem.h
===================================================================

target-m68k/op_mem.h +0 -46

46 lines not on this page · raw message

Modified: trunk/target-m68k/qregs.def
===================================================================

target-m68k/qregs.def +1 -25
@@ -1,37 +1,13 @@
-DEFO32(D0, dregs[0])
-DEFO32(D1, dregs[1])
-DEFO32(D2, dregs[2])
-DEFO32(D3, dregs[3])
-DEFO32(D4, dregs[4])
-DEFO32(D5, dregs[5])
-DEFO32(D6, dregs[6])
-DEFO32(D7, dregs[7])
-DEFO32(A0, aregs[0])
-DEFO32(A1, aregs[1])
-DEFO32(A2, aregs[2])
-DEFO32(A3, aregs[3])
-DEFO32(A4, aregs[4])
-DEFO32(A5, aregs[5])
-DEFO32(A6, aregs[6])
-DEFO32(SP, aregs[7]) /* A7 */
-DEFF64(F0, fregs[0])
-DEFF64(F1, fregs[1])
-DEFF64(F2, fregs[2])
-DEFF64(F3, fregs[3])
-DEFF64(F4, fregs[4])
-DEFF64(F5, fregs[5])
-DEFF64(F6, fregs[6])
-DEFF64(F7, fregs[7])
 DEFF64(FP_RESULT, fp_result)
 DEFO32(PC, pc)
 DEFO32(SR, sr)
 DEFO32(CC_OP, cc_op)
-DEFR(T0, AREG1, QMODE_I32)
 DEFO32(CC_DEST, cc_dest)
 DEFO32(CC_SRC, cc_src)
 DEFO32(CC_X, cc_x)
 DEFO32(DIV1, div1)
 DEFO32(DIV2, div2)
 DEFO32(EXCEPTION, exception_index)
+DEFO32(HALTED, halted)
 DEFO32(MACSR, macsr)
 DEFO32(MAC_MASK, mac_mask)

Modified: trunk/target-m68k/translate.c
===================================================================

target-m68k/translate.c +810 -1035

827 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.