This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Two suggestions for gcc C compiler to extend C language (by WD Smith)


On 26/07/16 14:31, Warren D Smith wrote:
> However, why not provide access to double-precision multiply and
> add-with-carry (subtract with borrow? shift-left?) in the same fashion?
>    twofer  x = mul(a,b);  would cause  x.hi and x.lo  to be computed.
>    twofer  x = addwithcarry(a,b)   ditto.

unsigned __int128 poo(unsigned long a, unsigned long b) {
  return (__int128)a * b;
}

unsigned __int128 bar(unsigned __int128 a, unsigned long b) {
  return a + b;
}

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]