Changeset 1095 in vbox for trunk/src/recompiler/new/VBoxRecompiler.c
- Timestamp:
- Feb 28, 2007 10:33:02 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/recompiler/new/VBoxRecompiler.c
r1057 r1095 1875 1875 { 1876 1876 Log2(("REMR3State: SS changed from %04x to %04x!\n", pVM->rem.s.Env.segs[R_SS].selector, pCtx->ss)); 1877 if (pCtx->eflags.Bits.u1VM == 1) 1877 1878 cpu_x86_set_cpl(&pVM->rem.s.Env, (pCtx->eflags.Bits.u1VM) ? 3 : (pCtx->ss & 3)); 1879 sync_seg(&pVM->rem.s.Env, R_SS, pCtx->ss); 1880 #ifdef VBOX_WITH_STATISTICS 1881 if (pVM->rem.s.Env.segs[R_SS].newselector) 1878 1882 { 1879 cpu_x86_set_cpl(&pVM->rem.s.Env, 3); 1880 pVM->rem.s.Env.segs[R_SS].selector = (uint16_t)pCtx->ss; 1883 STAM_COUNTER_INC(&gStatSelOutOfSync[R_SS]); 1881 1884 } 1882 else1883 {1884 cpu_x86_set_cpl(&pVM->rem.s.Env, pCtx->ss & 3);1885 sync_seg(&pVM->rem.s.Env, R_SS, pCtx->ss);1886 #ifdef VBOX_WITH_STATISTICS1887 if (pVM->rem.s.Env.segs[R_SS].newselector)1888 {1889 STAM_COUNTER_INC(&gStatSelOutOfSync[R_SS]);1890 }1891 1885 #endif 1892 }1893 1886 } 1894 1887 else … … 1898 1891 { 1899 1892 Log2(("REMR3State: ES changed from %04x to %04x!\n", pVM->rem.s.Env.segs[R_ES].selector, pCtx->es)); 1900 if (pCtx->eflags.Bits.u1VM == 1) 1893 sync_seg(&pVM->rem.s.Env, R_ES, pCtx->es); 1894 #ifdef VBOX_WITH_STATISTICS 1895 if (pVM->rem.s.Env.segs[R_ES].newselector) 1901 1896 { 1902 pVM->rem.s.Env.segs[R_ES].selector = (uint16_t)pCtx->es;1897 STAM_COUNTER_INC(&gStatSelOutOfSync[R_ES]); 1903 1898 } 1904 else1905 {1906 sync_seg(&pVM->rem.s.Env, R_ES, pCtx->es);1907 #ifdef VBOX_WITH_STATISTICS1908 if (pVM->rem.s.Env.segs[R_ES].newselector)1909 {1910 STAM_COUNTER_INC(&gStatSelOutOfSync[R_ES]);1911 }1912 1899 #endif 1913 }1914 1900 } 1915 1901 else … … 1919 1905 { 1920 1906 Log2(("REMR3State: CS changed from %04x to %04x!\n", pVM->rem.s.Env.segs[R_CS].selector, pCtx->cs)); 1921 if (pCtx->eflags.Bits.u1VM == 1) 1907 sync_seg(&pVM->rem.s.Env, R_CS, pCtx->cs); 1908 #ifdef VBOX_WITH_STATISTICS 1909 if (pVM->rem.s.Env.segs[R_CS].newselector) 1922 1910 { 1923 pVM->rem.s.Env.segs[R_CS].selector = (uint16_t)pCtx->cs;1911 STAM_COUNTER_INC(&gStatSelOutOfSync[R_CS]); 1924 1912 } 1925 else1926 {1927 sync_seg(&pVM->rem.s.Env, R_CS, pCtx->cs);1928 #ifdef VBOX_WITH_STATISTICS1929 if (pVM->rem.s.Env.segs[R_CS].newselector)1930 {1931 STAM_COUNTER_INC(&gStatSelOutOfSync[R_CS]);1932 }1933 1913 #endif 1934 }1935 1914 } 1936 1915 else … … 1940 1919 { 1941 1920 Log2(("REMR3State: DS changed from %04x to %04x!\n", pVM->rem.s.Env.segs[R_DS].selector, pCtx->ds)); 1942 if (pCtx->eflags.Bits.u1VM == 1) 1921 sync_seg(&pVM->rem.s.Env, R_DS, pCtx->ds); 1922 #ifdef VBOX_WITH_STATISTICS 1923 if (pVM->rem.s.Env.segs[R_DS].newselector) 1943 1924 { 1944 pVM->rem.s.Env.segs[R_DS].selector = (uint16_t)pCtx->ds;1925 STAM_COUNTER_INC(&gStatSelOutOfSync[R_DS]); 1945 1926 } 1946 else1947 {1948 sync_seg(&pVM->rem.s.Env, R_DS, pCtx->ds);1949 #ifdef VBOX_WITH_STATISTICS1950 if (pVM->rem.s.Env.segs[R_DS].newselector)1951 {1952 STAM_COUNTER_INC(&gStatSelOutOfSync[R_DS]);1953 }1954 1927 #endif 1955 }1956 1928 } 1957 1929 else … … 1963 1935 { 1964 1936 Log2(("REMR3State: FS changed from %04x to %04x!\n", pVM->rem.s.Env.segs[R_FS].selector, pCtx->fs)); 1965 if (pCtx->eflags.Bits.u1VM == 1) 1937 sync_seg(&pVM->rem.s.Env, R_FS, pCtx->fs); 1938 #ifdef VBOX_WITH_STATISTICS 1939 if (pVM->rem.s.Env.segs[R_FS].newselector) 1966 1940 { 1967 pVM->rem.s.Env.segs[R_FS].selector = (uint16_t)pCtx->fs;1941 STAM_COUNTER_INC(&gStatSelOutOfSync[R_FS]); 1968 1942 } 1969 else1970 {1971 sync_seg(&pVM->rem.s.Env, R_FS, pCtx->fs);1972 #ifdef VBOX_WITH_STATISTICS1973 if (pVM->rem.s.Env.segs[R_FS].newselector)1974 {1975 STAM_COUNTER_INC(&gStatSelOutOfSync[R_FS]);1976 }1977 1943 #endif 1978 }1979 1944 } 1980 1945 else … … 1984 1949 { 1985 1950 Log2(("REMR3State: GS changed from %04x to %04x!\n", pVM->rem.s.Env.segs[R_GS].selector, pCtx->gs)); 1986 if (pCtx->eflags.Bits.u1VM == 1) 1951 sync_seg(&pVM->rem.s.Env, R_GS, pCtx->gs); 1952 #ifdef VBOX_WITH_STATISTICS 1953 if (pVM->rem.s.Env.segs[R_GS].newselector) 1987 1954 { 1988 pVM->rem.s.Env.segs[R_GS].selector = (uint16_t)pCtx->gs;1955 STAM_COUNTER_INC(&gStatSelOutOfSync[R_GS]); 1989 1956 } 1990 else1991 {1992 sync_seg(&pVM->rem.s.Env, R_GS, pCtx->gs);1993 #ifdef VBOX_WITH_STATISTICS1994 if (pVM->rem.s.Env.segs[R_GS].newselector)1995 {1996 STAM_COUNTER_INC(&gStatSelOutOfSync[R_GS]);1997 }1998 1957 #endif 1999 }2000 1958 } 2001 1959 else
Note:
See TracChangeset
for help on using the changeset viewer.