@@ -206,7 +206,7 @@ extern void poly1305_final_avx2(Poly1305* ctx, byte* mac);
206206#endif
207207
208208#elif defined(POLY130564)
209- #ifndef WOLFSSL_ARMASM
209+ #if !defined( WOLFSSL_ARMASM ) && !defined( WOLFSSL_RISCV_ASM )
210210 static word64 U8TO64 (const byte * p )
211211 {
212212 return
@@ -230,7 +230,7 @@ extern void poly1305_final_avx2(Poly1305* ctx, byte* mac);
230230 p [6 ] = (byte )(v >> 48 );
231231 p [7 ] = (byte )(v >> 56 );
232232 }
233- #endif /* WOLFSSL_ARMASM */
233+ #endif /* ! WOLFSSL_ARMASM && !WOLFSSL_RISCV_ASM */
234234#else /* if not 64 bit then use 32 bit */
235235
236236 static word32 U8TO32 (const byte * p )
@@ -268,7 +268,8 @@ static WC_INLINE void u32tole64(const word32 inLe32, byte outLe64[8])
268268}
269269
270270
271- #if !defined(WOLFSSL_ARMASM ) || !defined(__aarch64__ )
271+ #if (!defined(WOLFSSL_ARMASM ) || !defined(__aarch64__ )) && \
272+ !defined(WOLFSSL_RISCV_ASM )
272273/*
273274This local function operates on a message with a given number of bytes
274275with a given ctx pointer to a Poly1305 structure.
@@ -491,9 +492,7 @@ static int poly1305_block(Poly1305* ctx, const unsigned char *m)
491492 return poly1305_blocks (ctx , m , POLY1305_BLOCK_SIZE );
492493#endif
493494}
494- #endif /* !defined(WOLFSSL_ARMASM) || !defined(__aarch64__) */
495495
496- #if !defined(WOLFSSL_ARMASM ) || !defined(__aarch64__ )
497496int wc_Poly1305SetKey (Poly1305 * ctx , const byte * key , word32 keySz )
498497{
499498#if defined(POLY130564 ) && !defined(USE_INTEL_POLY1305_SPEEDUP )
@@ -789,7 +788,7 @@ int wc_Poly1305Final(Poly1305* ctx, byte* mac)
789788
790789 return 0 ;
791790}
792- #endif /* !defined( WOLFSSL_ARMASM) || !defined( __aarch64__) */
791+ #endif /* (! WOLFSSL_ARMASM || !__aarch64__) && !WOLFSSL_RISCV_ASM */
793792
794793
795794int wc_Poly1305Update (Poly1305 * ctx , const byte * m , word32 bytes )
@@ -884,7 +883,8 @@ int wc_Poly1305Update(Poly1305* ctx, const byte* m, word32 bytes)
884883 /* process full blocks */
885884 if (bytes >= POLY1305_BLOCK_SIZE ) {
886885 size_t want = ((size_t )bytes & ~((size_t )POLY1305_BLOCK_SIZE - 1 ));
887- #if !defined(WOLFSSL_ARMASM ) || !defined(__aarch64__ )
886+ #if (!defined(WOLFSSL_ARMASM ) || !defined(__aarch64__ )) && \
887+ !defined(WOLFSSL_RISCV_ASM )
888888 int ret ;
889889 ret = poly1305_blocks (ctx , m , want );
890890 if (ret != 0 )
0 commit comments