------- Comment #1 from ubizjak at gmail dot com 2009-11-02 09:36 ------- This prototype patch should reject %esp from call operand:
Index: predicates.md =================================================================== --- predicates.md (revision 153803) +++ predicates.md (working copy) @@ -561,7 +561,8 @@ ;; Test for a valid operand for a call instruction. (define_predicate "call_insn_operand" (ior (match_operand 0 "constant_call_address_operand") - (ior (match_operand 0 "register_no_elim_operand") + (ior (and (match_operand 0 "register_no_elim_operand") + (match_operand 0 "index_register_operand")) (match_operand 0 "memory_operand")))) ;; Similarly, but for tail calls, in which we cannot allow memory references. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41900