Re: 128-bit inline assembly addition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 16, 2018 at 09:52:12PM +0200, Marcel Keller wrote:
> Hi,
> 
> I've found that the attached program, which supposedly adds 1 and 0 as 
> 128-bit numbers using inline assembly, outputs 2^64 + 1 instead when 
> compiled with g++ 7 or 8 and at least -O1. Am I doing something wrong, 

Operand 0 should be marked as earlyclobber.

> or is this a compiler bug?

The answer to that is almost always "no".


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux