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

            Bug ID: 119079
           Summary: Intel assembly output should use MOVSXD instead of
                    MOVSX for 32b->64b sign extensions
           Product: gcc
           Version: 15.0
               URL: https://gcc.godbolt.org/z/GrEP9GTr6
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tiborgyri at gmail dot com
                CC: tiborgyri at gmail dot com
  Target Milestone: ---
            Target: x86-64

Created attachment 60629
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60629&action=edit
-O3 -march=znver3 -S -masm=intel

Currently, x86-64 backend is happy to generate Intel syntax assembly that is
strictly speaking not valid:

> movsx   rax, r10d

According to the relevant page of the Intel Software Developer’s Manual, MOVSX
is not a valid mnemonic for 32b --> 64b sign extensions, and MOVSXD should be
generated instead.

Reply via email to