Changeset 94190 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Mar 11, 2022 9:30:23 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM/VMMAll
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllAImpl.asm
r94178 r94190 1395 1395 ; Makes ASSUMPTIONS about A0, A1 and A2 assignments. 1396 1396 ; 1397 ; @note the _intel and _amd variants are implemented in C. 1398 ; 1397 1399 %macro IEMIMPL_SHIFT_OP 3 1398 1400 BEGINCODE 1399 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u8_intel, 121400 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u8_amd, 121401 1401 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u8, 12 1402 1402 PROLOGUE_3_ARGS … … 1413 1413 ENDPROC iemAImpl_ %+ %1 %+ _u8 1414 1414 1415 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u16_intel, 121416 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u16_amd, 121417 1415 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u16, 12 1418 1416 PROLOGUE_3_ARGS … … 1429 1427 ENDPROC iemAImpl_ %+ %1 %+ _u16 1430 1428 1431 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u32_intel, 121432 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u32_amd, 121433 1429 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u32, 12 1434 1430 PROLOGUE_3_ARGS … … 1446 1442 1447 1443 %ifdef RT_ARCH_AMD64 1448 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u64_intel, 121449 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u64_amd, 121450 1444 BEGINPROC_FASTCALL iemAImpl_ %+ %1 %+ _u64, 12 1451 1445 PROLOGUE_3_ARGS -
trunk/src/VBox/VMM/VMMAll/IEMAllAImplC.cpp
r94178 r94190 2202 2202 # endif 2203 2203 2204 #endif /* !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) */ 2205 2204 2206 2205 2207 /********************************************************************************************************************************* … … 2236 2238 } \ 2237 2239 } 2240 2241 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2238 2242 EMIT_ROL(64, RT_NOTHING, 1, ASMRotateLeftU64) 2243 #endif 2239 2244 EMIT_ROL(64, _intel, 1, ASMRotateLeftU64) 2240 2245 EMIT_ROL(64, _amd, 0, ASMRotateLeftU64) 2241 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) 2246 2247 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2242 2248 EMIT_ROL(32, RT_NOTHING, 1, ASMRotateLeftU32) 2249 #endif 2243 2250 EMIT_ROL(32, _intel, 1, ASMRotateLeftU32) 2244 2251 EMIT_ROL(32, _amd, 0, ASMRotateLeftU32) … … 2248 2255 return (uValue << cShift) | (uValue >> (16 - cShift)); 2249 2256 } 2257 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2250 2258 EMIT_ROL(16, RT_NOTHING, 1, iemAImpl_rol_u16_hlp) 2259 #endif 2251 2260 EMIT_ROL(16, _intel, 1, iemAImpl_rol_u16_hlp) 2252 2261 EMIT_ROL(16, _amd, 0, iemAImpl_rol_u16_hlp) … … 2256 2265 return (uValue << cShift) | (uValue >> (8 - cShift)); 2257 2266 } 2267 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2258 2268 EMIT_ROL(8, RT_NOTHING, 1, iemAImpl_rol_u8_hlp) 2269 #endif 2259 2270 EMIT_ROL(8, _intel, 1, iemAImpl_rol_u8_hlp) 2260 2271 EMIT_ROL(8, _amd, 0, iemAImpl_rol_u8_hlp) 2261 # endif /* !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) */2262 2272 2263 2273 … … 2289 2299 } \ 2290 2300 } 2301 2302 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2291 2303 EMIT_ROR(64, RT_NOTHING, 1, ASMRotateRightU64) 2304 #endif 2292 2305 EMIT_ROR(64, _intel, 1, ASMRotateRightU64) 2293 2306 EMIT_ROR(64, _amd, 0, ASMRotateRightU64) 2294 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) 2307 2308 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2295 2309 EMIT_ROR(32, RT_NOTHING, 1, ASMRotateRightU32) 2310 #endif 2296 2311 EMIT_ROR(32, _intel, 1, ASMRotateRightU32) 2297 2312 EMIT_ROR(32, _amd, 0, ASMRotateRightU32) … … 2301 2316 return (uValue >> cShift) | (uValue << (16 - cShift)); 2302 2317 } 2318 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2303 2319 EMIT_ROR(16, RT_NOTHING, 1, iemAImpl_ror_u16_hlp) 2320 #endif 2304 2321 EMIT_ROR(16, _intel, 1, iemAImpl_ror_u16_hlp) 2305 2322 EMIT_ROR(16, _amd, 0, iemAImpl_ror_u16_hlp) … … 2309 2326 return (uValue >> cShift) | (uValue << (8 - cShift)); 2310 2327 } 2328 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2311 2329 EMIT_ROR(8, RT_NOTHING, 1, iemAImpl_ror_u8_hlp) 2330 #endif 2312 2331 EMIT_ROR(8, _intel, 1, iemAImpl_ror_u8_hlp) 2313 2332 EMIT_ROR(8, _amd, 0, iemAImpl_ror_u8_hlp) 2314 # endif /* !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) */2315 2333 2316 2334 … … 2348 2366 } \ 2349 2367 } 2368 2369 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2350 2370 EMIT_RCL(64, RT_NOTHING, 1) 2371 #endif 2351 2372 EMIT_RCL(64, _intel, 1) 2352 2373 EMIT_RCL(64, _amd, 0) 2353 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) 2374 2375 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2354 2376 EMIT_RCL(32, RT_NOTHING, 1) 2377 #endif 2355 2378 EMIT_RCL(32, _intel, 1) 2356 2379 EMIT_RCL(32, _amd, 0) 2380 2381 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2357 2382 EMIT_RCL(16, RT_NOTHING, 1) 2383 #endif 2358 2384 EMIT_RCL(16, _intel, 1) 2359 2385 EMIT_RCL(16, _amd, 0) 2386 2387 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2360 2388 EMIT_RCL(8, RT_NOTHING, 1) 2389 #endif 2361 2390 EMIT_RCL(8, _intel, 1) 2362 2391 EMIT_RCL(8, _amd, 0) 2363 # endif2364 2392 2365 2393 … … 2397 2425 } \ 2398 2426 } 2427 2428 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2399 2429 EMIT_RCR(64, RT_NOTHING, 1) 2430 #endif 2400 2431 EMIT_RCR(64, _intel, 1) 2401 2432 EMIT_RCR(64, _amd, 0) 2402 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) 2433 2434 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2403 2435 EMIT_RCR(32, RT_NOTHING, 1) 2436 #endif 2404 2437 EMIT_RCR(32, _intel, 1) 2405 2438 EMIT_RCR(32, _amd, 0) 2439 2440 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2406 2441 EMIT_RCR(16, RT_NOTHING, 1) 2442 #endif 2407 2443 EMIT_RCR(16, _intel, 1) 2408 2444 EMIT_RCR(16, _amd, 0) 2445 2446 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2409 2447 EMIT_RCR(8, RT_NOTHING, 1) 2448 #endif 2410 2449 EMIT_RCR(8, _intel, 1) 2411 2450 EMIT_RCR(8, _amd, 0) 2412 # endif2413 2451 2414 2452 … … 2444 2482 } \ 2445 2483 } 2484 2485 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2446 2486 EMIT_SHL(64, RT_NOTHING, 1) 2487 #endif 2447 2488 EMIT_SHL(64, _intel, 1) 2448 2489 EMIT_SHL(64, _amd, 0) 2449 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) 2490 2491 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2450 2492 EMIT_SHL(32, RT_NOTHING, 1) 2493 #endif 2451 2494 EMIT_SHL(32, _intel, 1) 2452 2495 EMIT_SHL(32, _amd, 0) 2496 2497 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2453 2498 EMIT_SHL(16, RT_NOTHING, 1) 2499 #endif 2454 2500 EMIT_SHL(16, _intel, 1) 2455 2501 EMIT_SHL(16, _amd, 0) 2502 2503 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2456 2504 EMIT_SHL(8, RT_NOTHING, 1) 2505 #endif 2457 2506 EMIT_SHL(8, _intel, 1) 2458 2507 EMIT_SHL(8, _amd, 0) 2459 # endif2460 2508 2461 2509 … … 2488 2536 } \ 2489 2537 } 2538 2539 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2490 2540 EMIT_SHR(64, RT_NOTHING, 1) 2541 #endif 2491 2542 EMIT_SHR(64, _intel, 1) 2492 2543 EMIT_SHR(64, _amd, 0) 2493 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) 2544 2545 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2494 2546 EMIT_SHR(32, RT_NOTHING, 1) 2547 #endif 2495 2548 EMIT_SHR(32, _intel, 1) 2496 2549 EMIT_SHR(32, _amd, 0) 2550 2551 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2497 2552 EMIT_SHR(16, RT_NOTHING, 1) 2553 #endif 2498 2554 EMIT_SHR(16, _intel, 1) 2499 2555 EMIT_SHR(16, _amd, 0) 2556 2557 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2500 2558 EMIT_SHR(8, RT_NOTHING, 1) 2559 #endif 2501 2560 EMIT_SHR(8, _intel, 1) 2502 2561 EMIT_SHR(8, _amd, 0) 2503 # endif2504 2562 2505 2563 … … 2531 2589 } \ 2532 2590 } 2591 2592 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2533 2593 EMIT_SAR(64, RT_NOTHING, 1) 2594 #endif 2534 2595 EMIT_SAR(64, _intel, 1) 2535 2596 EMIT_SAR(64, _amd, 0) 2536 # if !defined(RT_ARCH_X86) || defined(IEM_WITHOUT_ASSEMBLY) 2597 2598 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2537 2599 EMIT_SAR(32, RT_NOTHING, 1) 2600 #endif 2538 2601 EMIT_SAR(32, _intel, 1) 2539 2602 EMIT_SAR(32, _amd, 0) 2603 2604 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2540 2605 EMIT_SAR(16, RT_NOTHING, 1) 2606 #endif 2541 2607 EMIT_SAR(16, _intel, 1) 2542 2608 EMIT_SAR(16, _amd, 0) 2609 2610 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2543 2611 EMIT_SAR(8, RT_NOTHING, 1) 2612 #endif 2544 2613 EMIT_SAR(8, _intel, 1) 2545 2614 EMIT_SAR(8, _amd, 0) 2546 # endif2547 2548 #endif /* !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) */2549 2615 2550 2616 … … 2591 2657 } \ 2592 2658 } 2659 2593 2660 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2594 2661 EMIT_SHLD(64, uint64_t, RT_NOTHING, 1) 2595 #endif /* !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) */2662 #endif 2596 2663 EMIT_SHLD(64, uint64_t, _intel, 1) 2597 2664 EMIT_SHLD(64, uint64_t, _amd, 0) 2665 2598 2666 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2599 2667 EMIT_SHLD(32, uint32_t, RT_NOTHING, 1) … … 2601 2669 EMIT_SHLD(32, uint32_t, _intel, 1) 2602 2670 EMIT_SHLD(32, uint32_t, _amd, 0) 2671 2603 2672 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2604 2673 EMIT_SHLD(16, uint16_t, RT_NOTHING, 1) … … 2652 2721 } \ 2653 2722 } 2723 2654 2724 #if !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) 2655 2725 EMIT_SHRD(64, uint64_t, RT_NOTHING, 1) 2656 #endif /* !defined(RT_ARCH_AMD64) || defined(IEM_WITHOUT_ASSEMBLY) */2726 #endif 2657 2727 EMIT_SHRD(64, uint64_t, _intel, 1) 2658 2728 EMIT_SHRD(64, uint64_t, _amd, 0) 2729 2659 2730 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2660 2731 EMIT_SHRD(32, uint32_t, RT_NOTHING, 1) … … 2662 2733 EMIT_SHRD(32, uint32_t, _intel, 1) 2663 2734 EMIT_SHRD(32, uint32_t, _amd, 0) 2735 2664 2736 #if (!defined(RT_ARCH_X86) && !defined(RT_ARCH_AMD64)) || defined(IEM_WITHOUT_ASSEMBLY) 2665 2737 EMIT_SHRD(16, uint16_t, RT_NOTHING, 1)
Note:
See TracChangeset
for help on using the changeset viewer.