VirtualBox

Changeset 14574

Show
Ignore:
Timestamp:
11/25/08 15:00:38 (1 month ago)
Author:
vboxsync
Message:

new REM makefile cleanup, added external even check in IO check to allow correct compilation of int 15/86 - style timing loops

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/recompiler_new/Makefile.kmk

    r14537 r14574  
    2929 REM_MOD              += VBoxREM2 
    3030 SYSMODS              += VBoxREM2 
    31  
    3231else 
    3332 REM_MOD              += VBoxREM 
     
    6968# 
    7069$(REM_MOD)_DEFS             = IN_REM_R3 REM_INCLUDE_CPU_H  
    71 $(REM_MOD)_DEFS            += REM_PHYS_ADDR_IN_TLB 
     70#$(REM_MOD)_DEFS            += REM_PHYS_ADDR_IN_TLB 
    7271#$(REM_MOD)_DEFS           += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB  # Enables huge amounts of debug logging. 
    7372$(REM_MOD)_DEFS.linux      = _GNU_SOURCE 
     
    129128$(REM_MOD)_TEMPLATE        = VBOXNOCRTGAS 
    130129$(REM_MOD)_DEFS           += LOG_USE_C99 $(ARCH_BITS_DEFS) 
    131 $(REM_MOD)_CFLAGS.amd64    = -O2 
    132 $(REM_MOD)_CFLAGS.debug    = -O0 
    133130 
    134131# This doesn't fit in IPRT because it requires GAS and is LGPL. 
     
    144141endif 
    145142 
    146 # gcc targets 
    147 if1of ($(KBUILD_TARGET), linux darwin solaris) 
    148 $(REM_MOD)_CFLAGS.debug     = -O0 
    149 $(REM_MOD)_CFLAGS.release  += -fomit-frame-pointer -fno-gcse 
    150 endif 
    151143$(REM_MOD)_CFLAGS.profile  = $($(REM_MOD)_CFLAGS.release) 
    152144$(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release) 
     
    209201                $< 
    210202 
    211  
    212 if1of ($(KBUILD_TARGET), linux darwin solaris) 
    213 # Extra flags for these source modules. 
    214 target-i386/op-helper.c_CFLAGS.x86 = -O2 -fno-strict-aliasing -fno-gcse 
    215 cpu-exec.c_CFLAGS.x86           = -O2 -fno-strict-aliasing -fno-gcse 
    216 cpu-exec.c_CFLAGS.solaris.amd64 = -O2 -fno-strict-aliasing 
    217 endif 
    218  
    219203# 
    220204# The math testcase as a standalone program for testing and debugging purposes. 
  • trunk/src/recompiler_new/target-i386/translate.c

    r14425 r14574  
    867867} 
    868868 
    869 #ifndef VBOX 
    870 static inline void gen_jmp_im(target_ulong pc) 
    871 #else /* VBOX */ 
    872 DECLINLINE(void) gen_jmp_im(target_ulong pc) 
    873 #endif /* VBOX */ 
    874 { 
    875     tcg_gen_movi_tl(cpu_tmp0, pc); 
    876     tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUState, eip)); 
    877 } 
    878  
    879869#ifdef VBOX 
    880870static void gen_check_external_event() 
     
    903893} 
    904894 
    905 #ifndef VBOX 
    906 static inline void gen_update_eip(target_ulong pc) 
     895static void gen_check_external_event2() 
     896
     897    tcg_gen_helper_0_0(helper_check_external_event); 
     898
     899 
     900#endif 
     901 
     902#ifndef VBOX 
     903static inline void gen_jmp_im(target_ulong pc) 
    907904#else /* VBOX */ 
     905DECLINLINE(void) gen_jmp_im(target_ulong pc) 
     906#endif /* VBOX */ 
     907{ 
     908    tcg_gen_movi_tl(cpu_tmp0, pc); 
     909    tcg_gen_st_tl(cpu_tmp0, cpu_env, offsetof(CPUState, eip)); 
     910} 
     911 
     912#ifdef VBOX 
    908913DECLINLINE(void) gen_update_eip(target_ulong pc) 
    909 #endif /* VBOX */ 
    910914{ 
    911915    gen_jmp_im(pc); 
    912 #if defined (VBOX) && defined(VBOX_DUMP_STATE) 
     916#ifdef VBOX_DUMP_STATE 
    913917     tcg_gen_helper_0_0(helper_dump_state); 
    914918#endif 
    915919} 
     920 
    916921#endif 
    917922 
     
    10951100                           tcg_const_i32(next_eip - cur_eip)); 
    10961101    } 
     1102#ifdef VBOX 
     1103    gen_check_external_event2(s); 
     1104#endif /* VBOX */ 
    10971105} 
    10981106 
     
    26792687    int l1, l2, cc_op; 
    26802688 
     2689#ifdef VBOX 
     2690        gen_check_external_event(s); 
     2691#endif /* VBOX */ 
    26812692    cc_op = s->cc_op; 
    26822693    if (s->cc_op != CC_OP_DYNAMIC) { 
     
    26852696    } 
    26862697    if (s->jmp_opt) { 
    2687 #ifdef VBOX 
    2688         gen_check_external_event(s); 
    2689 #endif /* VBOX */ 
    26902698        l1 = gen_new_label(); 
    26912699        gen_jcc1(s, cc_op, b, l1); 
     
    31283136{ 
    31293137    if (s->jmp_opt) { 
    3130 #ifdef VBOX 
    3131         gen_check_external_event(s); 
    3132 #endif /* VBOX */ 
    31333138        if (s->cc_op != CC_OP_DYNAMIC) { 
    31343139            gen_op_set_cc_op(s->cc_op); 
     
    31453150static void gen_jmp(DisasContext *s, target_ulong eip) 
    31463151{ 
     3152#ifdef VBOX 
     3153    gen_check_external_event(s); 
     3154#endif /* VBOX */ 
    31473155    gen_jmp_tb(s, eip, 0); 
    31483156} 
  • trunk/src/recompiler_new/tcg/tcg.h

    r14542 r14574  
    397397#define tcg_abort() \ 
    398398do {\ 
    399     remAbort(-1, "TCG fatal error: "__FILE__":"VBOX_STR(__LINE__));
     399    remAbort(-1, "TCG fatal error: "__FILE__":"VBOX_STR(__LINE__));     
    400400} while (0) 
    401401extern void qemu_qsort(void* base, size_t nmemb, size_t size, 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy