• Ben Avison's avatar
    Fix bugs and inefficiencies revealed by unaligned data audit · 7f286493
    Ben Avison authored
    Detail:
      Many of these are unaligned LDRs where only bits 0-7 of the result are used
      (tested against a bitmask or used as an input to the barrel shifter) but
      they have all been moved to byte operations because they are faster on
      ARMv6 and won't cause false positives if unaligned aborts are enabled.
    
      s.BigDirCode line 104: not wrong as such, but changed to use aligned LDR
        for speed on ARMv6.
      s.BigDirCode line 1727: LDR of an unaligned 1-byte variable. Only used as
        input to shifter.
      s.Commands line 129: STR to an unaligned 1-byte variable. Harmless because
        all overlapping variables are initialised later on.
      s.Commands line 539: LDR of an unaligned 1-byte variable. Only used for
        testing bit 6.
      s.FileCore31 line 1359: LDR of an unaligned 1-byte variable. Only used as
        input to shifter.
      s.FileCore32 lines 1483 and 1825: LDR of an unaligned 1-byte variable. Only
        used as input to shifter.
      s.FormSWIs line 1403: bugfix: incorrect load of 16-bit zone_spare field of
        disc record - uses lowsector and nzones fields instead! This is used to
        terminate the search of free space fragments within the allocation bytes
        of the current map block for the one containing a bad block found during
        formatting. Would manifest itself as a "Can't map defect out" error.
      s.GenSWIs lines 1182,1195: bugfix: LDR of 1-byte variables. Effect of this
        was that range-checking of the drive number passed to FileCore_MiscOp 5
        (eject) wasn't performed.
      Added ENTRY directive to permit building of GPA debug listing.
    Admin:
      Builds, but untested.
    
    Version 3.34. Tagged as 'FileCore-3_34'
    7f286493
VersionNum 811 Bytes