This is the mail archive of the gcc-patches@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]

[PATCH, i386]: Fix recently added sibcall insns and peephole2 patterns


Hello!

Attached patch fixes recently added sibcall insns and their
corresponding peephole2 patterns:

- There is no need for new memory_nox32_operand. A generic
memory_operand can be used, since new insns and peephole2 patterns
should be disabled for TARGET_X32 entirely.
- Adds missing "m" constraint in insn patterns.
- Macroizes peephole2 patterns
- Adds check that eliminated register is really dead after the call
(maybe an overkill, but some hard-to-debug problems surfaced due to
missing liveness checks in the past)
- Fixes call RTXes in sibcall_pop related patterns (and fixes two
newly introduced warnings in i386.md)

2014-06-18  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.md (*sibcall_memory): Rename from *sibcall_intern.
    Do not use unspec as call operand.  Use memory_operand instead of
    memory_nox32_operand and add "m" operand constraint.  Disable
    pattern for TARGET_X32.
    (*sibcall_pop_memory): Ditto.
    (*sibcall_value_memory): Ditto.
    (*sibcall_value_pop_memory): Ditto.
    (sibcall peepholes): Merge SImode and DImode patterns using
    W mode iterator.  Use memory_operand instead of memory_nox32_operand.
    Disable pattern for TARGET_X32.  Check if eliminated register is
    really dead after call insn.  Generate call RTX without unspec operand.
    (sibcall_value peepholes): Ditto.
    (sibcall_pop peepholes): Fix call insn RTXes.  Use memory_operand
    instead of memory_nox32_operand.  Check if eliminated register is
    really dead after call insn. Generate call RTX without unspec operand.
    (sibcall_value_pop peepholes): Ditto.
    * config/i386/predicates.md (memory_nox32_operand): Remove predicate.

The patch was bootstrapped and regression tested on
x86_64-pc-linux-gnu {,-m32} and was committed to mainline SVN.

Uros.

Attachment: p.diff.txt
Description: Text document


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