From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10735 invoked by alias); 22 Jun 2010 16:53:50 -0000 Received: (qmail 10579 invoked by uid 48); 22 Jun 2010 16:53:32 -0000 Date: Tue, 22 Jun 2010 16:53:00 -0000 Message-ID: <20100622165332.10578.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/44618] Arguments are not passed correctly to out-of-line restore functions. In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "edmar at freescale dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-06/txt/msg02221.txt.bz2 ------- Comment #11 from edmar at freescale dot com 2010-06-22 16:53 ------- (In reply to comment #10) > Because the insn has a register reference to r11/r1/r12 :) that is the (use > (match_operand: )) part of the rtx. This is unlike call instructions which > don't have match_operands for function arguments. That is what I mean explicit > vs implicit. Ok. > I mixed up insn rtl codes, woops. I thought calls was always done using > jump_insn. Anyways I am saying you are hard coding a target specific > information inside a target generic part of the code. This is why I think it > is the wrong approach. I understand your point of view. But I am still convinced that a jump_insn with a parallel and symbol reference (external or global) cannot have the explicit registers renamed, regardless of the target architecture. Now, if powerpc is the only target that can generate such a rtl (jump_insn, with external symbol reference), then I have to agree with you... > (define_insn "return_indirect_internal" > [(return) > (use (match_operand:SI 0 "register_operand" "r"))] > "reload_completed" > "jmp\t%A0" > [(set_attr "type" "ibr") > (set_attr "length_immediate" "0")]) > > Though it is harder to invoke that but still it can happen if I read the code > correctly (the pop needs to be greater than 64k). This was close, but it has no symbol reference. Therefore it is ok to rename the register, because the use of the register is in the "jmp" instruction and not inside the code that the "jmp" points to. (i.e., this insn is not passing an argument to a function). Ok, I have to change my patch, but before I do that, I want to make sure we agree on the details. Is it safe to assume that powerpc is the only target that can generate such a rtl ? If not, I will modify the patch to add a test that checks if there is a symbol reference. If it is, I will scratch all this, and will make the powerpc target generate a call_insn instead of a jump_insn (At this point we agree that reg rename cannot swallow a jump_insn, right ?) Thanks, Edmar -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44618