From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31573 invoked by alias); 30 May 2007 21:29:54 -0000 Received: (qmail 31542 invoked by uid 48); 30 May 2007 21:29:46 -0000 Date: Wed, 30 May 2007 21:29:00 -0000 Message-ID: <20070530212946.31541.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/27386] AVR: wrong code generated when passing three uint64_t arguments to function In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rask at sygehus dot dk" 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: 2007-05/txt/msg02759.txt.bz2 ------- Comment #12 from rask at sygehus dot dk 2007-05-30 21:29 ------- The AVR is unusual in having #define STACK_PUSH_CODE POST_DEC #define STACK_GROWS_DOWNWARD where most targets would have PRE_DEC when the stack grows downward. The middle-end tries to synthesize the missing pushdi pattern, but while the offsets seem to be wrong in any case, the instruction order would be correct for PRE_DEC. In expr.c/emit_single_push_insn(), there is this comment: #ifdef STACK_GROWS_DOWNWARD /* ??? This seems wrong if STACK_PUSH_CODE == POST_DEC. */ dest_addr = gen_rtx_PLUS (Pmode, stack_pointer_rtx, GEN_INT (-(HOST_WIDE_INT) rounded_size)); #else Someone needs to set a breakpoint on emit_push_insn() and friends to find out exactly where the problem is. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27386