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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Uros Bizjak <[email protected]>:

https://gcc.gnu.org/g:f3d75174a098342f40cc3203799f251ef7f3cc7c

commit r17-6378-gf3d75174a098342f40cc3203799f251ef7f3cc7c
Author: Uros Bizjak <[email protected]>
Date:   Tue Nov 10 10:49:02 2026 +0100

    reg-stack: Reject asm operands that need several stack registers

    For

      float _Complex z = 0;
      long double v;
      asm volatile ("" : "=t" (v) : "0" (z));

    the input is (reg:SC st), i.e. st(0) and st(1).  Only the first register
    is tied to the output, so the death note at the asm is just for st(1),
    which subst_asm_stack_regs never pops because it only looks at REGNO of
    an operand, and convert_regs_1 asserts since the stack after the asm does
    not match the live registers.

    Operands that need more than one stack register, such as complex values,
    are not supported by reg-stack, so report them as an error like the other
    malformed stack register asms.

    Assisted-by: Claude Sonnet 5.5

            PR target/128533

    gcc/ChangeLog:

            * doc/extend.texi (x86 Floating-Point asm Operands):
            Document that operands must occupy a single register.
            * reg-stack.cc: Document rule #7.
            (check_asm_stack_operands): Reject operands
            that need more than one stack register.

    gcc/testsuite/ChangeLog:

            * gcc.target/i386/pr128533.c: New test.

Reply via email to