Skip to contentSkip to conversation

[4594] CRIS: Restructure the translator to allow for better code generation .

Qemu-devel Edgar E. Iglesias 1 participant 1 message May 27, 2008

lore
Share & tools
lore
#0 lore raw

Revision: 4594

          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4594
Author:   edgar_igl
Date:     2008-05-27 21:10:56 +0000 (Tue, 27 May 2008)

Log Message:
-----------
CRIS: Restructure the translator to allow for better code generation.

Modified Paths:
--------------
trunk/target-cris/cpu.h
trunk/target-cris/helper.c
trunk/target-cris/helper.h
trunk/target-cris/op_helper.c
trunk/target-cris/translate.c

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

target-cris/cpu.h +1 -38
@@ -120,8 +120,7 @@
 	uint32_t cc_result;
 	/* size of the operation, 1 = byte, 2 = word, 4 = dword.  */
 	int cc_size;
-	/* Extended arithmetics.  */
-	int cc_x_live;
+	/* X flag at the time of cc snapshot.  */
 	int cc_x;
 
 	int exception_index;
@@ -130,10 +129,6 @@
 	int fault_vector;
 	int trap_vector;
 
-	uint32_t debug1;
-	uint32_t debug2;
-	uint32_t debug3;
-
 	/* FIXME: add a check in the translator to avoid writing to support
 	   register sets beyond the 4th. The ISA allows up to 256! but in
 	   practice there is no core that implements more than 4.
@@ -177,20 +172,14 @@
    is returned if the signal was handled by the virtual CPU.  */
 int cpu_cris_signal_handler(int host_signum, void *pinfo,
                            void *puc);
-void cpu_cris_flush_flags(CPUCRISState *, int);
-
-
 void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
                           int is_asi);
 
 enum {
     CC_OP_DYNAMIC, /* Use env->cc_op  */
     CC_OP_FLAGS,
-    CC_OP_LOGIC,
     CC_OP_CMP,
     CC_OP_MOVE,
-    CC_OP_MOVE_PD,
-    CC_OP_MOVE_SD,
     CC_OP_ADD,
     CC_OP_ADDC,
     CC_OP_MCP,
@@ -213,32 +202,6 @@
     CC_OP_LZ
 };
 
-#define CCF_C 0x01
-#define CCF_V 0x02
-#define CCF_Z 0x04
-#define CCF_N 0x08
-#define CCF_X 0x10
-
-#define CRIS_SSP    0
-#define CRIS_USP    1
-
-void cris_set_irq_level(CPUCRISState *env, int level, uint8_t vector);
-void cris_set_macsr(CPUCRISState *env, uint32_t val);
-void cris_switch_sp(CPUCRISState *env);
-
-void do_cris_semihosting(CPUCRISState *env, int nr);
-
-enum cris_features {
-    CRIS_FEATURE_CF_ISA_MUL,
-};
-
-static inline int cris_feature(CPUCRISState *env, int feature)
-{
-    return (env->features & (1u << feature)) != 0;
-}
-
-void register_cris_insns (CPUCRISState *env);
-
 /* CRIS uses 8k pages.  */
 #define TARGET_PAGE_BITS 13
 #define MMAP_SHIFT TARGET_PAGE_BITS

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

target-cris/helper.c +1 -2
@@ -42,9 +42,8 @@
                              int mmu_idx, int is_softmmu)
 {
 	env->exception_index = 0xaa;
-	env->debug1 = address;
+	env->pregs[PR_EDA] = address;
 	cpu_dump_state(env, stderr, fprintf, 0);
-	env->pregs[PR_ERP] = env->pc;
 	return 1;
 }
 

Modified: trunk/target-cris/helper.h
===================================================================

target-cris/helper.h +1 -1
@@ -2,7 +2,6 @@
 
 void TCG_HELPER_PROTO helper_raise_exception(uint32_t index);
 void TCG_HELPER_PROTO helper_tlb_flush_pid(uint32_t pid);
-void TCG_HELPER_PROTO helper_tlb_flush(void);
 void TCG_HELPER_PROTO helper_dump(uint32_t a0, uint32_t a1, uint32_t a2);
 void TCG_HELPER_PROTO helper_dummy(void);
 void TCG_HELPER_PROTO helper_rfe(void);
@@ -18,3 +17,4 @@
 void TCG_HELPER_PROTO helper_evaluate_flags_move_4 (void);
 void TCG_HELPER_PROTO helper_evaluate_flags_move_2 (void);
 void TCG_HELPER_PROTO helper_evaluate_flags (void);
+void TCG_HELPER_PROTO helper_top_evaluate_flags(void);

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

target-cris/op_helper.c +77 -16

143 lines not on this page · raw message

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

target-cris/translate.c +464 -329

1,629 lines not on this page · raw message