This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/50797] New: [x32] Use 32bit Pmode


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]