This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch (x86): PR 18019 (again)
- From: Dale Johannesen <dalej at apple dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jan Hubicka <jh at suse dot cz>, Dale Johannesen <dalej at apple dot com>
- Date: Tue, 7 Jun 2005 15:33:33 -0700
- Subject: Patch (x86): PR 18019 (again)
The fix to the movqi_1 pattern, recorded in the PR, does not fix the
entire problem.
When the destination reg is EDI/ESI, and -Os is used, the current
pattern produces
a 'movl', which is wrong. See attached testcase. This patch does the
following.
- Removes the 'q' from case 5 (?r, qm), as case 3 (r, q) will handle
that pairing.
- Adds a ? to case 3, as we prefer q to r for source when available.
- Adjusts the "type" computation so case 5 (?r, m) always uses movzbl.
We never
want to get into the choice between movq and movl in this case, as
movq is not valid
for an r destination and movl is not valid for an m source (as the
word load might
cross a page boundary).
Bootstrapped and tested, x86 darwin. OK?
2005-06-07 Dale Johannesen <dalej@apple.com>
* config/i386/i386.md (movqi_1): Fix case where source
is memory and destination EDI.
2005-06-07 Dale Johannesen <dalej@apple.com>
* gcc.target/i386/movq.c: New.
Attachment:
diffs3.txt
Description: Text document
Attachment:
movq.c
Description: Text document