https://sourceware.org/bugzilla/show_bug.cgi?id=34028

--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Beulich <[email protected]>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=925926577a460ef2fc170e0261f8b207a42bc0e0

commit 925926577a460ef2fc170e0261f8b207a42bc0e0
Author: Jan Beulich <[email protected]>
Date:   Fri Apr 17 08:06:39 2026 +0200

    x86: refine special casing of insns with MSR as immediate

    PR gas/34028

    i.op[].imms is legitimate to de-reference only when the operand actually
    is an immediate. The pointer happens to be non-NULL for most other operand
    kinds (i.e. a deref is UB, but would likely not fault), just not for
    memory operands without displacement.

    Leverage that the to-be-special-cased insns all only have just a single
    immediate, and leverage further that after the immediately preceding
    swapping of operands valid immediates will come first. Hence the
    conditional can be adjusted to satisfy the criteria above, and no loop is
    needed at all.

    With the conditional changed, leverage the property also in optimize_imm()
    itself, reducing the number of loop iterations.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to