https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #16 from Mason ---
For the record, the example I provided was intended to show that, with some
help, GCC can generate good code for bigint multiplication. In this situation,
"help" means a short asm template.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #15 from cqwrteur ---
template<::std::unsigned_integral T>
inline constexpr T add_carry_no_carry_in(T a,T b,T& carryout) noexcept
{
T res{a+b};
carryout=res
inline constexpr T add_carry(T a,T b,T carryin,T& carryout) noexcept
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #14 from cqwrteur ---
template
inline constexpr T add_carry_no_carry_in(T a,T b,T& carryout) noexcept
{
T res{a+b};
carryout=res
inline constexpr T add_carry(T a,T b,T carryin,T& carryout) noexcept
{
assume(carryin==0||ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #13 from cqwrteur ---
Hi, the problem comes out GCC does not do a very good job to deal with crypto
computations that usually exploit all sorts of patterns.
template
inline constexpr T add_carry_no_carry_in(T a,T b,T& carryout) noe
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #12 from Mason ---
Actually, in this case, we don't need to propagate the carry over 3 limbs.
typedef unsigned int u32;
typedef unsigned long long u64;
/* u32 acc[2], a[1], b[1] */
static void mul_add_32x32(u32 *acc, const u32 *a,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #11 from Mason ---
Here's umul_least_64() rewritten as mul_64x64_128() in C
typedef unsigned int u32;
typedef unsigned long long u64;
/* u32 acc[3], a[1], b[1] */
static void mul_add_32x32(u32 *acc, const u32 *a, const u32 *b)
{
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
Martin Liška changed:
What|Removed |Added
CC||marxin at gcc dot gnu.org
--- Comment #1
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #9 from cqwrteur ---
(In reply to Richard Biener from comment #8)
> As mentioned in the other bug STV might make things only worse.
what is stv?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #8 from Richard Biener ---
As mentioned in the other bug STV might make things only worse.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #7 from cqwrteur ---
(In reply to cqwrteur from comment #6)
> (In reply to Andrew Pinski from comment #5)
> > (In reply to cqwrteur from comment #4)
> > > (In reply to cqwrteur from comment #3)
> > > > (In reply to Andrew Pinski from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #6 from cqwrteur ---
(In reply to Andrew Pinski from comment #5)
> (In reply to cqwrteur from comment #4)
> > (In reply to cqwrteur from comment #3)
> > > (In reply to Andrew Pinski from comment #2)
> > > > There might be another bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #5 from Andrew Pinski ---
(In reply to cqwrteur from comment #4)
> (In reply to cqwrteur from comment #3)
> > (In reply to Andrew Pinski from comment #2)
> > > There might be another bug about _addcarryx_u64 already.
> >
> > This is
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #4 from cqwrteur ---
(In reply to cqwrteur from comment #3)
> (In reply to Andrew Pinski from comment #2)
> > There might be another bug about _addcarryx_u64 already.
>
> This is 32 bit addcarry.
but yeah. GCC does not perform opti
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
--- Comment #3 from cqwrteur ---
(In reply to Andrew Pinski from comment #2)
> There might be another bug about _addcarryx_u64 already.
This is 32 bit addcarry.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102974
Andrew Pinski changed:
What|Removed |Added
Component|tree-optimization |target
--- Comment #2 from Andrew Pinsk
15 matches
Mail list logo