@@ -443,15 +443,18 @@ typedef const char wcchar[];
443443
444444#elif defined(WC_16BIT_CPU)
445445 /* WC_16BIT_CPU selects 16-bit int (word16=unsigned int, word32=unsigned
446- * long). It historically also assumes no native 64-bit type, but targets
447- * like the TI C2000 C28x are 16-bit-int yet have a 64-bit long long, so
448- * keep WORD64_AVAILABLE when one genuinely exists. Porting note: any other
449- * 16-bit-int target with a 64-bit long/long long now keeps the 64-bit paths
450- * (SHA-512, word64 rotates) that were previously force-disabled here. */
446+ * long). Historically every WC_16BIT_CPU build (except MICROCHIP_PIC24)
447+ * force-disabled WORD64_AVAILABLE. The TI C2000 C28x is 16-bit-int yet has
448+ * a 64-bit long long and needs the 64-bit paths (SHA-512, ML-DSA/ML-KEM),
449+ * so keep WORD64_AVAILABLE for CHAR_BIT != 8 (WOLFSSL_WIDE_BYTE) targets
450+ * that genuinely have a 64-bit type. All other 16-bit-int targets (e.g.
451+ * MSP430) retain the historical behavior, so this is not a silent ABI or
452+ * code-path change for existing non-C28x ports. */
451453 #if !defined(MICROCHIP_PIC24) && \
452- !(defined (SIZEOF_LONG ) && (SIZEOF_LONG == 8 )) && \
453- !(defined (SIZEOF_LONG_LONG ) && (SIZEOF_LONG_LONG == 8 )) && \
454- !(defined (__SIZEOF_LONG_LONG__) && (__SIZEOF_LONG_LONG__ == 8 ))
454+ !(defined (WOLFSSL_WIDE_BYTE ) && \
455+ ((defined (SIZEOF_LONG ) && (SIZEOF_LONG == 8 )) || \
456+ (defined (SIZEOF_LONG_LONG ) && (SIZEOF_LONG_LONG == 8 )) || \
457+ (defined (__SIZEOF_LONG_LONG__) && (__SIZEOF_LONG_LONG__ == 8 ))))
455458 #undef WORD64_AVAILABLE
456459 #endif
457460 typedef word16 wolfssl_word;
0 commit comments