From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13398 invoked by alias); 13 Feb 2014 02:15:02 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 13350 invoked by uid 89); 13 Feb 2014 02:15:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f179.google.com Received: from mail-lb0-f179.google.com (HELO mail-lb0-f179.google.com) (209.85.217.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 13 Feb 2014 02:15:00 +0000 Received: by mail-lb0-f179.google.com with SMTP id l4so7848588lbv.10 for ; Wed, 12 Feb 2014 18:14:56 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.152.4.68 with SMTP id i4mr32922189lai.8.1392257696618; Wed, 12 Feb 2014 18:14:56 -0800 (PST) Received: by 10.114.186.35 with HTTP; Wed, 12 Feb 2014 18:14:56 -0800 (PST) Date: Thu, 13 Feb 2014 02:15:00 -0000 Message-ID: Subject: Aarch64 implementation for dwarf exception handling From: Shiva Chen To: gcc@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2014-02/txt/msg00171.txt.bz2 Hi, I have a question about the implementation of aarch64_final_eh_return_addr which is used to point out the return address of the frame According the source code If FP is not needed return gen_frame_mem (DImode, plus_constant (Pmode, stack_pointer_rtx, fp_offset + cfun->machine->frame.saved_regs_size - 2 * UNITS_PER_WORD)); According the frame layout +-------------------------------+ <-- arg_pointer_rtx | | callee-allocated save area | for register varargs | +-------------------------------+ | | local variables | +-------------------------------+ <-- frame_pointer_rtx | | callee-saved registers | +-------------------------------+ | LR' +-------------------------------+ | FP' P+-------------------------------+ <-- hard_frame_pointer_rtx | dynamic allocation +-------------------------------+ | | outgoing stack arguments | +-------------------------------+ <-- stack_pointer_rtx Shouldn't the return value be return gen_frame_mem (DImode, plus_constant (Pmode, stack_pointer_rtx, fp_offset + 2* UNITS_PER_WORD)); Or I just mis-understanding something ? Hope someone could give me a tip. It would be very helpful. Thanks Shiva Chen