[Bug target/119079] Intel assembly output should use MOVSXD instead of MOVSX for 32b->64b sign extensions

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Sun Oct 26 16:28:55 GMT 2025


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

--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Uros Bizjak <uros@gcc.gnu.org>:

https://gcc.gnu.org/g:943576af4cbb43c73c51f82b43dc71768236eb57

commit r13-9938-g943576af4cbb43c73c51f82b43dc71768236eb57
Author: LIU Hao <lh_mouse@126.com>
Date:   Sat Oct 25 17:19:34 2025 +0800

    x86-64: Use `movsxd` to perform SI-to-DI extension in Intel syntax

    Although there's no possibility of ambiguity, Intel manual says the
mnemonic
    for DWORD-to-QWORD sign-extension operation should be MOVSXD. Some
assemblers
    (GNU AS, NASM) also overload MOVSX, but some others don't accept MOVSX
(LLVM,
    MASM, YASM in NASM mode) and require MOVSXD.

    This mnemonic was introduced in r0-34259-g123bf9e3f4056d in 2001, and has
not
    been updated ever since.

    gcc/ChangeLog:

            PR target/119079
            * config/i386/i386.md: Use `movsxd` to perform SI-to-DI extension
in Intel
            syntax.

    Signed-off-by: LIU Hao <lh_mouse@126.com>
    (cherry picked from commit 66b38349273525dfb86f0f74d6c928abdbf7154f)


More information about the Gcc-bugs mailing list