Skip to content

Commit

Permalink
Merge pull request #8038 from SparkiDev/sp_math_ppc_li_fix
Browse files Browse the repository at this point in the history
SP Maths: PowerPC ASM fix
  • Loading branch information
dgarske authored Oct 3, 2024
2 parents afe5209 + 695914e commit d0d802a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wolfcrypt/src/sp_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -3942,7 +3942,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo,
__asm__ __volatile__ ( \
"mulhwu %[h], %[a], %[b] \n\t" \
"mullw %[l], %[a], %[b] \n\t" \
"li %[o], 0 \n\t" \
"xor %[o], %[o], %[o] \n\t" \
: [l] "+r" (vl), [h] "+r" (vh), [o] "=r" (vo) \
: [a] "r" (va), [b] "r" (vb) \
)
Expand Down Expand Up @@ -4045,7 +4045,7 @@ static WC_INLINE sp_int_digit sp_div_word(sp_int_digit hi, sp_int_digit lo,
#define SP_ASM_SUBB(vl, vh, va) \
__asm__ __volatile__ ( \
"subfc %[l], %[a], %[l] \n\t" \
"li 16, 0 \n\t" \
"xor 16, 16, 16 \n\t" \
"subfe %[h], 16, %[h] \n\t" \
: [l] "+r" (vl), [h] "+r" (vh) \
: [a] "r" (va) \
Expand Down

0 comments on commit d0d802a

Please sign in to comment.