- 時間撮記:
- 2011-6-29 上午07:07:14 (14 年 以前)
- svn:sync-xref-src-repo-rev:
- 72535
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
TabularUnified trunk/src/recompiler/target-i386/op_helper.c ¶
r36765 r37675 675 675 676 676 #ifdef VBOX 677 677 678 /* Keep in sync with gen_check_external_event() */ 678 679 void helper_check_external_event() … … 695 696 sync_seg(env, reg, env->segs[reg].newselector); 696 697 } 698 697 699 #endif /* VBOX */ 698 700 … … 714 716 void helper_outb(uint32_t port, uint32_t data) 715 717 { 718 #ifndef VBOX 719 cpu_outb(port, data & 0xff); 720 #else 716 721 cpu_outb(env, port, data & 0xff); 722 #endif 717 723 } 718 724 719 725 target_ulong helper_inb(uint32_t port) 720 726 { 727 #ifndef VBOX 728 return cpu_inb(port); 729 #else 721 730 return cpu_inb(env, port); 731 #endif 722 732 } 723 733 724 734 void helper_outw(uint32_t port, uint32_t data) 725 735 { 736 #ifndef VBOX 737 cpu_outw(port, data & 0xffff); 738 #else 726 739 cpu_outw(env, port, data & 0xffff); 740 #endif 727 741 } 728 742 729 743 target_ulong helper_inw(uint32_t port) 730 744 { 745 #ifndef VBOX 746 return cpu_inw(port); 747 #else 731 748 return cpu_inw(env, port); 749 #endif 732 750 } 733 751 734 752 void helper_outl(uint32_t port, uint32_t data) 735 753 { 754 #ifndef VBOX 755 cpu_outl(port, data); 756 #else 736 757 cpu_outl(env, port, data); 758 #endif 737 759 } 738 760 739 761 target_ulong helper_inl(uint32_t port) 740 762 { 763 #ifndef VBOX 764 return cpu_inl(port); 765 #else 741 766 return cpu_inl(env, port); 767 #endif 742 768 } 743 769 … … 1406 1432 cpu_x86_set_cpl(env, 3); 1407 1433 } 1408 #ifdef CONFIG_KQEMU1409 if (kqemu_is_ok(env)) {1410 if (env->hflags & HF_LMA_MASK)1411 CC_OP = CC_OP_EFLAGS;1412 env->exception_index = -1;1413 cpu_loop_exit();1414 }1415 #endif1416 1434 } 1417 1435 #endif 1418 1436 1419 1437 #ifdef VBOX 1438 1420 1439 /** 1421 1440 * Checks and processes external VMM events. … … 1459 1478 } 1460 1479 } 1480 1461 1481 /* helper for recording call instruction addresses for later scanning */ 1462 1482 void helper_record_call() … … 1467 1487 remR3RecordCall(env); 1468 1488 } 1489 1469 1490 #endif /* VBOX */ 1470 1491 … … 2945 2966 EIP = offset; 2946 2967 } 2947 #ifdef CONFIG_KQEMU2948 if (kqemu_is_ok(env)) {2949 env->exception_index = -1;2950 cpu_loop_exit();2951 }2952 #endif2953 2968 } 2954 2969 … … 3094 3109 if ((new_cs & 0x3) == 1 && (env->state & CPU_RAW_RING0)) 3095 3110 { 3096 # ifdef DEBUG3111 # ifdef DEBUG 3097 3112 printf("RPL 1 -> new_cs %04X -> %04X\n", new_cs, new_cs & 0xfffc); 3098 # endif3113 # endif 3099 3114 new_cs = new_cs & 0xfffc; 3100 3115 } … … 3326 3341 } 3327 3342 env->hflags2 &= ~HF2_NMI_MASK; 3328 #ifdef CONFIG_KQEMU3329 if (kqemu_is_ok(env)) {3330 CC_OP = CC_OP_EFLAGS;3331 env->exception_index = -1;3332 cpu_loop_exit();3333 }3334 #endif3335 3343 } 3336 3344 … … 3338 3346 { 3339 3347 helper_ret_protected(shift, 0, addend); 3340 #ifdef CONFIG_KQEMU3341 if (kqemu_is_ok(env)) {3342 env->exception_index = -1;3343 cpu_loop_exit();3344 }3345 #endif3346 3348 } 3347 3349 … … 3416 3418 ESP = ECX; 3417 3419 EIP = EDX; 3418 #ifdef CONFIG_KQEMU3419 if (kqemu_is_ok(env)) {3420 env->exception_index = -1;3421 cpu_loop_exit();3422 }3423 #endif3424 3420 } 3425 3421 … … 3536 3532 } 3537 3533 3538 #ifdef VBOX3539 3534 void helper_rdtscp(void) 3540 3535 { 3536 #ifndef VBOX 3537 helper_rdtsc(); 3538 ECX = (uint32_t)(env->tsc_aux); 3539 #else 3541 3540 uint64_t val; 3542 3541 if ((env->cr[4] & CR4_TSD_MASK) && ((env->hflags & HF_CPL_MASK) != 0)) { … … 3551 3550 else 3552 3551 ECX = 0; 3553 }3554 3552 #endif /* VBOX */ 3553 } 3555 3554 3556 3555 void helper_rdpmc(void) … … 3705 3704 env->mcg_ctl = val; 3706 3705 break; 3706 case MSR_TSC_AUX: 3707 env->tsc_aux = val; 3708 break; 3707 3709 # endif /* !VBOX */ 3708 3710 default: … … 3788 3790 val = env->kernelgsbase; 3789 3791 break; 3790 #endif 3791 #ifdef CONFIG_KQEMU 3792 case MSR_QPI_COMMBASE: 3793 if (env->kqemu_enabled) { 3794 val = kqemu_comm_base; 3795 } else { 3796 val = 0; 3797 } 3798 break; 3792 # ifndef VBOX 3793 case MSR_TSC_AUX: 3794 val = env->tsc_aux; 3795 break; 3796 # endif /*!VBOX*/ 3799 3797 #endif 3800 3798 # ifndef VBOX … … 5010 5008 target_ulong addr; 5011 5009 5010 /* The operand must be 16 byte aligned */ 5011 if (ptr & 0xf) { 5012 raise_exception(EXCP0D_GPF); 5013 } 5014 5012 5015 fpus = (env->fpus & ~0x3800) | (env->fpstt & 0x7) << 11; 5013 5016 fptag = 0; … … 5065 5068 CPU86_LDouble tmp; 5066 5069 target_ulong addr; 5070 5071 /* The operand must be 16 byte aligned */ 5072 if (ptr & 0xf) { 5073 raise_exception(EXCP0D_GPF); 5074 } 5067 5075 5068 5076 env->fpuc = lduw(ptr); … … 6732 6740 } 6733 6741 6734 target_ulong helper_ bsr(target_ulong t0)6742 target_ulong helper_lzcnt(target_ulong t0, int wordsize) 6735 6743 { 6736 6744 int count; 6737 6745 target_ulong res, mask; 6738 6746 6747 if (wordsize > 0 && t0 == 0) { 6748 return wordsize; 6749 } 6739 6750 res = t0; 6740 6751 count = TARGET_LONG_BITS - 1; … … 6744 6755 res <<= 1; 6745 6756 } 6757 if (wordsize > 0) { 6758 return wordsize - 1 - count; 6759 } 6746 6760 return count; 6747 6761 } 6748 6762 6763 target_ulong helper_bsr(target_ulong t0) 6764 { 6765 return helper_lzcnt(t0, 0); 6766 } 6749 6767 6750 6768 static int compute_all_eflags(void)
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器