This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39942] Nonoptimal code - leaveq; xchg %ax,%ax; retq
- From: "jakub at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 May 2009 06:37:49 -0000
- Subject: [Bug target/39942] Nonoptimal code - leaveq; xchg %ax,%ax; retq
- References: <bug-39942-17483@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #45 from jakub at gcc dot gnu dot org 2009-05-16 06:37 -------
cmpl $1, %eax does have the modrm byte:
83 f8 01 cmp $0x1,%eax
compared to cmpl $0xdeadbeef, $eax which doesn't have it:
3d ef be ad de cmp $0xdeadbeef,%eax
So I think what I wrote is more precise. modrm byte is there if the insn has
ax_reg_operand destination and immediate source which hasn't been shortened.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39942