patchAVR C Runtime Library - Patches: patch #10101, util/crc16.h: improved...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10101: util/crc16.h: improved _crc_xmodem_update (smaller & faster)

Submitter:  Benoit Steinmetz <sten>
Submitted:  Sun 29 Aug 2021 09:20:55 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Discussion

Sun 29 Aug 2021 09:20:55 PM UTC, original submission:  

The attached patch improves the _crc_xmodem_update algorithm.  The improved algorithm uses 14 instructions instead of the original 25.  Additionally the temporary variables have less strict constraints (=r instead of =d), and r0 is not clobbered.

I have successfully tested the new algorithm with all possible inputs (65536 * 256) against the original algorithm.  The test was run in simulavr.  See attached files main.c, orig_crc.c and run_test.sh

Benoit Steinmetz <sten>

 

Attached Files

Attached Files
file #51830:  patch_crc_xmodem_update.txt added by sten (1.9KiB - text/plain)
file #51831:  main.c added by sten (1.2KiB - text/x-csrc)
file #51832:  orig_crc.c added by sten (116B - text/x-csrc)
file #51833:  run_test.sh added by sten (51B - application/x-sh)

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by sten (Submitted the item)
  •  

    Votes

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    History

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-08-29 sten Attached File- Added patch_crc_xmodem_update.txt, #51830
        Attached File- Added main.c, #51831
        Attached File- Added orig_crc.c, #51832
        Attached File- Added run_test.sh, #51833

    Back to the top

    Powered by Savane 3.16-11ef.
    Corresponding source code