This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/50797] New: [x32] Use 32bit Pmode
- From: "hjl.tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Oct 2011 17:04:59 +0000
- Subject: [Bug target/50797] New: [x32] Use 32bit Pmode
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50797
Bug #: 50797
Summary: [x32] Use 32bit Pmode
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: hjl.tools@gmail.com
CC: sergos.gnu@gmail.com
Since x86-64 supports 0x67 address-size prefix, we can use
32bit Pmode. It will avoid unnecessary LEA instructions in
memory operand.
1. For memory operand (base, index, scale), we can generate
32bit base/index registers directly.
2. For memory operand (base), we can generate 64bit base
register to avoid 0x67 prefix since x32 is limited to 32bit
address space and the upper 32bits are always zero.
However, since call/pop/push instructions only work on 64bit
stack pointer, they have to be handled properly.