Re: [x86 PATCH] Fun with flags: Adding stc/clc instructions to i386.md.

2022-07-08 Thread Segher Boessenkool
Hi! On Fri, Jul 08, 2022 at 08:14:58AM +0100, Roger Sayle wrote: > This patch adds support for x86's single-byte encoded stc (set carry flag) > and clc (clear carry flag) instructions to i386.md. Maybe add a test for clc as well? Because: > +(define_insn "x86_clc" > + [(set (reg:CCC FLAGS_REG)

Re: [x86 PATCH] Fun with flags: Adding stc/clc instructions to i386.md.

2022-07-08 Thread Uros Bizjak via Gcc-patches
On Fri, Jul 8, 2022 at 9:15 AM Roger Sayle wrote: > > > This patch adds support for x86's single-byte encoded stc (set carry flag) > and clc (clear carry flag) instructions to i386.md. > > The motivating example is the simple code snippet: > > unsigned int foo (unsigned int a, unsigned int b, unsi

Re: [x86 PATCH] Fun with flags: Adding stc/clc instructions to i386.md.

2022-07-08 Thread Uros Bizjak via Gcc-patches
On Fri, Jul 8, 2022 at 9:15 AM Roger Sayle wrote: > > > This patch adds support for x86's single-byte encoded stc (set carry flag) > and clc (clear carry flag) instructions to i386.md. > > The motivating example is the simple code snippet: > > unsigned int foo (unsigned int a, unsigned int b, unsi

[x86 PATCH] Fun with flags: Adding stc/clc instructions to i386.md.

2022-07-08 Thread Roger Sayle
This patch adds support for x86's single-byte encoded stc (set carry flag) and clc (clear carry flag) instructions to i386.md. The motivating example is the simple code snippet: unsigned int foo (unsigned int a, unsigned int b, unsigned int *c) { return __builtin_ia32_addcarryx_u32 (1, a, b, c