[4470] converted condition code supprot to TCG - converted shift ops to TCG
Revision: 4470
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=4470 Author: bellard Date: 2008-05-17 12:44:31 +0000 (Sat, 17 May 2008)
Log Message:
-----------
converted condition code supprot to TCG - converted shift ops to TCG
Modified Paths:
--------------
trunk/target-i386/cpu.h
trunk/target-i386/exec.h
trunk/target-i386/helper.c
trunk/target-i386/helper.h
trunk/target-i386/op.c
trunk/target-i386/ops_template.h
trunk/target-i386/ops_template_mem.h
trunk/target-i386/translate.cAdded Paths:
-----------
trunk/target-i386/helper_template.h
Modified: trunk/target-i386/cpu.h
===================================================================
target-i386/cpu.h +8 -0
@@ -476,6 +476,7 @@/* temporaries if we cannot store them in host registers */ target_ulong t0, t1, t2;#endif +target_ulong t3;/* standard registers */ target_ulong regs[CPU_NB_REGS ];
@@ -727,6 +728,13 @@return (env->hflags &HF_CPL_MASK ) ==3 ?1 :0 ; } +typedef struct CCTable { +int (*compute_all)(void );/* return all the flags */ +int (*compute_c)(void );/* return the C flag */ +}CCTable ; + +extern CCTable cc_table[]; +#include "cpu-all.h" #include "svm.h"
Modified: trunk/target-i386/exec.h
===================================================================
target-i386/exec.h +9 -7
@@ -98,13 +98,6 @@#include "cpu.h" #include "exec-all.h" -typedef struct CCTable { -int (*compute_all)(void );/* return all the flags */ -int (*compute_c)(void );/* return the C flag */ -}CCTable ; - -extern CCTable cc_table[]; -void cpu_x86_update_cr0 (CPUX86State *env,uint32_t new_cr0);void cpu_x86_update_cr3 (CPUX86State *env,target_ulong new_cr3);void cpu_x86_update_cr4 (CPUX86State *env,uint32_t new_cr4);
@@ -129,6 +122,15 @@ void OPPROTO op_movl_eflags_T0(void); void OPPROTO op_movl_T0_eflags(void); +/* n must be a constant to be efficient */ +static inline target_long lshift (target_long x,int n) +{ +if (n >=0 ) +return x << n; +else +return x >> (-n); +} +#include "helper.h" static inline void svm_check_intercept (uint32_t type)
Modified: trunk/target-i386/helper.c
===================================================================
target-i386/helper.c +19 -0
@@ -5220,3 +5220,22 @@#define SHIFT 1#include "ops_sse.h" +#define SHIFT 0 +#include "helper_template.h" +#undef SHIFT + +#define SHIFT 1 +#include "helper_template.h" +#undef SHIFT + +#define SHIFT 2 +#include "helper_template.h" +#undef SHIFT + +#ifdef TARGET_X86_64 + +#define SHIFT 3 +#include "helper_template.h" +#undef SHIFT + +#endif
Modified: trunk/target-i386/helper.h
===================================================================
target-i386/helper.h +11 -0
@@ -199,3 +199,14 @@#define SHIFT 1#include "ops_sse_header.h" +target_ulong helper_rclb (target_ulong t0,target_ulong t1); +target_ulong helper_rclw (target_ulong t0,target_ulong t1); +target_ulong helper_rcll (target_ulong t0,target_ulong t1); +target_ulong helper_rcrb (target_ulong t0,target_ulong t1); +target_ulong helper_rcrw (target_ulong t0,target_ulong t1); +target_ulong helper_rcrl (target_ulong t0,target_ulong t1); +#ifdef TARGET_X86_64 +target_ulong helper_rclq (target_ulong t0,target_ulong t1); +target_ulong helper_rcrq (target_ulong t0,target_ulong t1); +#endif +
Added: trunk/target-i386/helper_template.h
===================================================================
target-i386/helper_template.h +118 -0
118 lines not on this page · raw message
Modified: trunk/target-i386/op.c
===================================================================
target-i386/op.c +0 -91
109 lines not on this page · raw message
Modified: trunk/target-i386/ops_template.h
===================================================================
target-i386/ops_template.h +0 -30
@@ -415,36 +415,6 @@T0 = ((DATA_STYPE )src1 <= (DATA_STYPE )src2); } -/* shifts */ - -void OPPROTO glue(glue(op_shl, SUFFIX), _T0_T1)(void) -{ -int count; - count =T1 &SHIFT1_MASK ; -T0 =T0 << count; -FORCE_RET (); -} - -void OPPROTO glue(glue(op_shr, SUFFIX), _T0_T1)(void) -{ -int count; - count =T1 &SHIFT1_MASK ; -T0 &=DATA_MASK ; -T0 =T0 >> count; -FORCE_RET (); -} - -void OPPROTO glue(glue(op_sar, SUFFIX), _T0_T1)(void) -{ -int count; -target_long src; - - count =T1 &SHIFT1_MASK ; - src = (DATA_STYPE )T0 ; -T0 = src >> count; -FORCE_RET (); -} -#undef MEM_WRITE#include "ops_template_mem.h"
Modified: trunk/target-i386/ops_template_mem.h
===================================================================
target-i386/ops_template_mem.h +0 -364
370 lines not on this page · raw message
Modified: trunk/target-i386/translate.c
===================================================================
target-i386/translate.c +597 -640
1,636 lines not on this page · raw message