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]

Re: [PATCH, i386]: Fix PR 41900, call *%esp shouldn't be generated because of CPU errata


On 11/14/2009 10:19 AM, Eric Botcazou wrote:
2009-11-13 Uros Bizjak<ubizjak@gmail.com>

      PR target/41900
      (*call_pop_1, *call_1, *call_value_pop_1, *call_value_1): Use "lsm"
      as operand 1 constraint.
      * config/i386/predicates.md (call_insn_operand): Depend on
      index_register_operand to avoid %esp register.

2009-11-13 Uros Bizjak<ubizjak@gmail.com>

      Revert:
      2009-11-03  Uros Bizjak<ubizjak@gmail.com>

PR target/41900
* config/i386/i386.h (ix86_arch_indices)<X86_ARCH_CALL_ESP>: New.
(TARGET_CALL_ESP): New define.
* config/i386/i386.c (initial_ix86_tune_features): Initialize
X86_ARCH_CALL_ESP.
* config/i386/i386.md (*call_pop_1_esp, *call_1_esp,
*call_value_pop_1_esp, *call_value_1_esp): Rename from *call_pop_1,
*call_1, *call_value_pop_1 and *call_value_1. Depend on
TARGET_CALL_ESP.
(*call_pop_1, *call_1, *call_value_pop_1, *call_value_1):
New patterns, use "lsm" as operand 1 constraint.
* config/i386/predicates.md (call_insn_operand): Depend on
index_register_operand for !TARGET_CALL_ESP to avoid %esp register.
This has introduced a regression

FAIL: gcc.c-torture/compile/930117-1.c  -O1  (internal compiler error)
FAIL: gcc.c-torture/compile/930117-1.c  -O1  (test for excess errors)
FAIL: gcc.c-torture/compile/930117-1.c  -O2  (internal compiler error)
FAIL: gcc.c-torture/compile/930117-1.c  -O2  (test for excess errors)
FAIL: gcc.c-torture/compile/930117-1.c  -O3 -fomit-frame-pointer  (interna
compiler error)
FAIL: gcc.c-torture/compile/930117-1.c  -O3 -fomit-frame-pointer  (test for
excess errors)
FAIL: gcc.c-torture/compile/930117-1.c  -O3 -g  (internal compiler error)
FAIL: gcc.c-torture/compile/930117-1.c  -O3 -g  (test for excess errors)
FAIL: gcc.c-torture/compile/930117-1.c  -Os  (internal compiler error)
FAIL: gcc.c-torture/compile/930117-1.c  -Os  (test for excess errors)

on x86 (all branches).

Uh, for some reason -m32 was ineffective in my test scripts :( .


Apparently, "index_register_operand" predicate is not _that_ similar to "register_no_elim_operand".

2009-11-14 Uros Bizjak <ubizjak@gmail.com>

    * config/i386/predicates.md (call_register_no_elim_operand):
    New predicate.  Reject stack register as valid call operand
    for 32bit targets.
    (call_insn_operand): Use call_register_no_elim_operand.

I'm testing attached patch.

Thanks,
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]