Changeset 102117 in vbox
- Timestamp:
- Nov 15, 2023 9:34:30 PM (14 months ago)
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.c
r102096 r102117 1470 1470 1471 1471 # endif /* ARCH_BITS != 64 */ 1472 1473 1474 extern BS3_DECL_FAR(void) BS3_CMN_FAR_NM(bs3CpuBasic2_lea_16)(void); 1475 1476 BS3_DECL_FAR(uint8_t) BS3_CMN_NM(bs3CpuBasic2_Lea)(uint8_t bMode) 1477 { 1478 # if ARCH_BITS != 64 1479 /* Repeat the test so the native recompiler get a chance to kick in... */ 1480 unsigned i; 1481 for (i = 0; i < 64; i++) 1482 BS3_CMN_FAR_NM(bs3CpuBasic2_lea_16)(); 1483 # endif 1484 1485 RT_NOREF(bMode); 1486 return UINT8_MAX; 1487 } 1488 1489 1472 1490 #endif /* BS3_INSTANTIATING_CMN */ 1473 1491 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2-template.mac
r98103 r102117 1874 1874 1875 1875 1876 1877 ;********************************************************************************************************************************* 1878 ;* LEA * 1879 ;********************************************************************************************************************************* 1880 1881 1882 ;; 1883 ; Loads known values into all registers but xSP. 1884 BS3_PROC_BEGIN_CMN bs3CpuBasic2_lea_load_regs, BS3_PBC_NEAR 1885 %if TMPL_BITS == 64 1886 mov rax, 01111111111111110h 1887 mov rcx, 02222222222222202h 1888 mov rdx, 03333333333333033h 1889 mov rbx, 04444444444440444h 1890 mov rbp, 05555555555555551h 1891 mov rsi, 06666666666666616h 1892 mov rdi, 07777777777777177h 1893 mov r8, 08888888888881888h 1894 mov r9, 09999999999999992h 1895 mov r10, 0aaaaaaaaaaaaaa2ah 1896 mov r11, 0bbbbbbbbbbbbb2bbh 1897 mov r12, 0cccccccccccc2ccch 1898 mov r13, 0ddddddddddddddd3h 1899 mov r14, 0eeeeeeeeeeeeee3eh 1900 mov r15, 0fffffffffffff3ffh 1901 %else 1902 mov eax, 011111110h 1903 mov ecx, 022222202h 1904 mov edx, 033333033h 1905 mov ebx, 044440444h 1906 mov ebp, 055555551h 1907 mov esi, 066666616h 1908 mov edi, 077777177h 1909 %endif 1910 BS3_HYBRID_RET 1911 BS3_PROC_END_CMN bs3CpuBasic2_lea_load_regs 1912 1913 1914 %if TMPL_BITS != 64 1915 ;; 1916 ; Tests 16-bit addressing using the LEA instruction. 1917 ; 1918 BS3_PROC_BEGIN_CMN bs3CpuBasic2_lea_16, BS3_PBC_FAR 1919 pushad 1920 %ifndef BS3CPUBASIC2_LEA_16_MACROS 1921 %define BS3CPUBASIC2_LEA_16_MACROS 1922 %macro test_lea_16_one 3 1923 call BS3_CMN_NM(bs3CpuBasic2_lea_load_regs) 1924 lea strict %1, %2 1925 cmp %1, %3 & 0ffffh 1926 jz %%okay 1927 int3 1928 %%okay: 1929 %endm 1930 %macro test_lea_16_inner 2 1931 test_lea_16_one ax, %1, %2 1932 test_lea_16_one cx, %1, %2 1933 test_lea_16_one dx, %1, %2 1934 test_lea_16_one bx, %1, %2 1935 test_lea_16_one bp, %1, %2 1936 test_lea_16_one si, %1, %2 1937 test_lea_16_one di, %1, %2 1938 1939 test_lea_16_one eax, %1, %2 1940 test_lea_16_one ecx, %1, %2 1941 test_lea_16_one edx, %1, %2 1942 test_lea_16_one ebx, %1, %2 1943 test_lea_16_one ebp, %1, %2 1944 test_lea_16_one esi, %1, %2 1945 test_lea_16_one edi, %1, %2 1946 %endm 1947 %macro test_lea_16_outer 3 1948 %if %1 == 0 1949 test_lea_16_inner [%2], %3 1950 %else 1951 test_lea_16_inner [word %3], %3 ; mod0/6 = disp16 1952 %endif 1953 test_lea_16_inner [%2 + 07fh], %3 + 7fh 1954 test_lea_16_inner [%2 - 19], %3 - 19 1955 test_lea_16_inner [%2 + 5708h], %3 + 5708h 1956 test_lea_16_inner [%2 - 7293h], %3 - 7293h 1957 %endm 1958 %endif 1959 1960 test_lea_16_outer 0, bx + si, 00444h+06616h 1961 test_lea_16_outer 0, bx + di, 00444h+07177h 1962 test_lea_16_outer 0, bp + si, 05551h+06616h 1963 test_lea_16_outer 0, bp + di, 05551h+07177h 1964 test_lea_16_outer 0, si, 06616h 1965 test_lea_16_outer 0, di, 07177h 1966 test_lea_16_outer 1, bp, 05551h 1967 test_lea_16_outer 0, bx, 00444h 1968 1969 popad 1970 BS3_HYBRID_RET 1971 BS3_PROC_END_CMN bs3CpuBasic2_lea_16 1972 %endif ; TMPL_BITS != 64 1973 1876 1974 %endif ; BS3_INSTANTIATING_CMN 1877 1975 -
trunk/src/VBox/ValidationKit/bootsectors/bs3-cpu-basic-2.c
r98103 r102117 46 46 * Internal Functions * 47 47 *********************************************************************************************************************************/ 48 BS3TESTMODE_PROTOTYPES_CMN(bs3CpuBasic2_Lea); 48 49 BS3TESTMODE_PROTOTYPES_MODE(bs3CpuBasic2_TssGateEsp); 49 50 BS3TESTMODE_PROTOTYPES_MODE(bs3CpuBasic2_RaiseXcpt1); … … 69 70 static const BS3TESTMODEENTRY g_aModeTest[] = 70 71 { 72 BS3TESTMODEENTRY_CMN("lea", bs3CpuBasic2_Lea), 71 73 BS3TESTMODEENTRY_MODE("tss / gate / esp", bs3CpuBasic2_TssGateEsp), 72 74 #if 0 /** @todo The 'raise xcpt \#1' test doesn't work in IEM! */
Note:
See TracChangeset
for help on using the changeset viewer.