[Bug inline-asm/49611] Inline asm should support input/output of flags

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Jul 17 10:58:00 GMT 2015


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611

--- Comment #13 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Jeremy from comment #12)
> Hi David,
> That's very interesting.  Its not in gcc 5.2.0 released yesterday though.

That is because 5.2 is a patch release off of the 5 branch. It was added to gcc
6 and above. 

> It probably does a setcc on x86 which doesn't really gain much, but on ARM
> it could be useful.
> More useful (as of gcc 5.0) is the new __builtin_xxx_overflow which uses
> the overflow flag directly.   So for int16_t  operands for example:
>     if(   __builtin_add_overflow( a, b, &result)  )
>          printf( "overflow");
> it would emit "addw; jno".
> 
> Jeremy
> 
> 
> 
> On 17 July 2015 at 06:41, gccbugzilla at limegreensocks dot com <
> gcc-bugzilla@gcc.gnu.org> wrote:
> 
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=49611
> >
> > --- Comment #11 from David <gccbugzilla at limegreensocks dot com> ---
> > Apparently this feature has been checked in:
> > https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#FlagOutputOperands
> >
> > --
> > You are receiving this mail because:
> > You are on the CC list for the bug.
> >



More information about the Gcc-bugs mailing list