From: user5857@newsgrouper.org.invalid   
      
   anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:   
      
   > BGB writes:   
   > >Can note that GCC seemingly doesn't support 128-bit integers on 64-bit   
   > >RISC-V.   
   >   
   > What makes you think so? It has certainly worked every time I tried   
   > it. E.g., Gforth's "configure" reports:   
   >   
   > checking size of __int128_t... 16   
   > checking size of __uint128_t... 16   
   > [...]   
   > checking for a C type for double-cells... __int128_t   
   > checking for a C type for unsigned double-cells... __uint128_t   
   >   
   > That's with gcc 10.3.1   
   >   
   > >Also, doing 128-bit arithmetic on RV64 kinda sucks as there is   
   > >basically no good way to do extended precision arithmetic (essentially,   
   > >the ISA offers nothing more here than what C already gives you).   
   > >   
   > >Like, you can do what is essentially:   
   > > c_lo = a_lo + b_lo;   
   > > c_hi = a_hi + b_hi;   
   > > if((c_lo > c_hi++;   
   >   
   > You only need to check for c_lo either both be true or both be false.   
   >   
   > Here's 128-bit arithmetic on RV64GC (and very similar on MIPS and   
   > Alpha):   
   >   
   > add a4,a4,a5   
   > sltu a5,a4,a5   
   > add s8,s8,s9   
   > add s9,a5,s8   
   >   
   > RISC-V (and MIPS and Alpha) becomes relly bad when you need add with   
   > carry-in and carry-out (five instructions).   
      
   My 66000: // 256-bit add   
    CARRY R15,{{O}{IO}{IO}{I}}   
    ADD R12,R8,R24   
    ADD R13,R9,R25   
    ADD R14,R10,R26   
    ADD R15,R11,R27   
   !!!!!!   
   >   
   > - anton   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|