Changeset 445 in xtideuniversalbios for trunk/Assembly_Library/Inc


Ignore:
Timestamp:
Aug 29, 2012, 12:59:23 PM (12 years ago)
Author:
krille_n_@…
google:author:
krille_n_@hotmail.com
Message:

Changes:

  • A speed optimization to the eSHL_IM macro for 386 and higher. This change breaks emulation in the sense that the macro will fail when given a memory operand as the first parameter.
  • Memory_SumCXbytesFromESSItoAL now returns with the zero flag set/cleared according to the result.
  • Unrolled all the 8 bit READ transfer loops to do 16 bytes per iteration. Added a new macro (UNROLL_SECTORS_IN_CX_TO_OWORDS) as part of it. Size wise this is expensive but I think it should be worth the ROM space. The WRITE transfer loops were left as is since writes are rare anyway (<10% of all disk I/O IIRC).
  • Minor optimizations and fixes here and there.
Location:
trunk/Assembly_Library/Inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Assembly_Library/Inc/Emulate.inc

    r420 r445  
    465465    eSHIFT_IM   %1, %2, shr
    466466%endmacro
     467
    467468%macro eSHL_IM 2
     469%ifdef USE_386
     470    %if %2 = 1
     471        add     %1, %1  ; Same size but faster on 386 and 486. Fails if %1 is a memory operand.
     472    %else
     473        eSHIFT_IM   %1, %2, shl
     474    %endif
     475%else
    468476    eSHIFT_IM   %1, %2, shl
    469 %endmacro
     477%endif
     478%endmacro
     479
    470480%macro eROR_IM 2
    471481    eSHIFT_IM   %1, %2, ror
    472482%endmacro
     483
    473484%macro eROL_IM 2
    474485    eSHIFT_IM   %1, %2, rol
    475486%endmacro
     487
    476488%macro eRCR_IM 2
    477489    eSHIFT_IM   %1, %2, rcr
    478490%endmacro
     491
    479492%macro eRCL_IM 2
    480493    eSHIFT_IM   %1, %2, rcl
  • trunk/Assembly_Library/Inc/Math.inc

    r287 r445  
    7979ALIGN JUMP_ALIGN
    8080.ShiftNextBit:
    81     shl     ax, 1
     81    eSHL_IM ax, 1
    8282    rcl     dx, 1
    8383    loop    .ShiftNextBit
Note: See TracChangeset for help on using the changeset viewer.