From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7156 invoked by alias); 22 Sep 2009 18:07:21 -0000 Received: (qmail 7147 invoked by uid 22791); 22 Sep 2009 18:07:21 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-ew0-f226.google.com (HELO mail-ew0-f226.google.com) (209.85.219.226) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Sep 2009 18:07:16 +0000 Received: by ewy26 with SMTP id 26so4206861ewy.29 for ; Tue, 22 Sep 2009 11:07:13 -0700 (PDT) Received: by 10.211.142.17 with SMTP id u17mr1418322ebn.0.1253642833629; Tue, 22 Sep 2009 11:07:13 -0700 (PDT) Received: from localhost (rsandifo.gotadsl.co.uk [82.133.89.107]) by mx.google.com with ESMTPS id 24sm475650eyx.19.2009.09.22.11.07.11 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 22 Sep 2009 11:07:12 -0700 (PDT) To: Richard Henderson Mail-Followup-To: Richard Henderson ,GCC Patches , rdsandiford@googlemail.com Cc: GCC Patches Subject: Re: [patch 19/36][mips] Hookize static chain and trampoline macros References: <4AB7F353.3060707@redhat.com> <4AB804EC.8040809@redhat.com> From: Richard Sandiford Date: Tue, 22 Sep 2009 18:19:00 -0000 In-Reply-To: <4AB804EC.8040809@redhat.com> (Richard Henderson's message of "Mon\, 21 Sep 2009 15\:57\:48 -0700") Message-ID: <87hbuudfas.fsf@firetop.home> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg01551.txt.bz2 Richard Henderson writes: > Your trampoline can be greatly simplified for N32 and N64 abis. Recall > that the current address is passed in via $25. Which simplifies your > trampoline to e.g. > > lw $1,20($25) > lw $25,16($25) > jr $25 > nop Ah, good point. FTR, this is a "hosted" vs. "freestanding" thing really. Non-abicalls o32, n32 and n64 all use arbitrary pointers while the abicalls versions all use $25. Same goes for VxWorks kernel mode vs. RTP mode. Maybe the worry was that it wasn't worth complicating things, but... > And why emit raw integers to the template? It just makes things a bit > confusing in my opinion. Integers are of course acceptable if you're > not going to use a template... ...that's an excellent question. I've no idea. Using asm would certainly make it easier to handle the $25/not-$25 and pointer size differences. (As will having it all in mips.c, so thanks for that.) I'll give it a go. Richard