On 8/31/26 11:57 PM, Shreesh Adiga wrote:
The calculate_crc and calculate_reversed_crc functions assumed initial
crc of 0 and only operated on 8 bits of data. This commit extends those
functions to take explicit data arg and data size as well, so that it
can compute CRC for >8 bits with a separate initial CRC.
These functions are also made public so that they can be called from
different modules. This will be used in the future to implement CRC
const folding.
gcc/ChangeLog:
* expr.cc (calculate_crc): Moved to hwint.cc file.
(assemble_crc_table): Updated function call.
(calculate_reversed_crc): Moved to hwint.cc file.
(assemble_reversed_crc_table): Updated function call.
* hwint.cc (calculate_crc): Moved from expr.cc and made public.
(calculate_reversed_crc): Moved from expr.cc and made public.
* hwint.h (calculate_crc): Added function prototype.
(calculate_reversed_crc): Added function prototype.
Signed-off-by: Shreesh Adiga <[email protected]>
THanks. I've pushed both of these patches to the trunk.
jeff