From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25856 invoked by alias); 11 Oct 2014 00:23:26 -0000 Mailing-List: contact libffi-discuss-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libffi-discuss-owner@sourceware.org Received: (qmail 25810 invoked by uid 89); 11 Oct 2014 00:23:22 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-oi0-f47.google.com Received: from mail-oi0-f47.google.com (HELO mail-oi0-f47.google.com) (209.85.218.47) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 11 Oct 2014 00:23:21 +0000 Received: by mail-oi0-f47.google.com with SMTP id a141so8554262oig.20 for ; Fri, 10 Oct 2014 17:23:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=yMn24P3fz2L5gSNytRiMaPrGCF7nTzZYxpkKlws84ek=; b=lG4l0uFkkZTLIEsbrOF/9aRrpBHqfdHpsZBQdzZxyCG9ht04oMYj6V46hqLoLyRDtt 0QPLIv5ykzyG9FzGbte6MltXOl0iwc5un7jwcrJ9KZ7T5CGlQdhYrfSGJ2len+CxQ6+W 50aMyo5RcdFmQbikwYadzEyHbj7NAWVEsvzaPcwzT1+jF//Wcl5yIaY0h0E6I87F5Kwc DdyF75EehQzKzX6D0M0vUHYbHWtK3ItDmbzXFgezvuXmYp36SwURhcegBnh8EiRPEdee rOnmyM6t8qEfAo1uiW4WUkb3+lH+Ii8ISS9tiX5v5DvyPlsknPgZgNnrktPKlm93BHyT FDqQ== X-Gm-Message-State: ALoCoQkApXdflLTmwUWM7ME/x92qhN1MX6g9juke+mDTHDdckweYEUFlZ1GKIwri87/0cYf8KkO6 MIME-Version: 1.0 X-Received: by 10.60.46.167 with SMTP id w7mr61363oem.50.1412986999473; Fri, 10 Oct 2014 17:23:19 -0700 (PDT) Received: by 10.60.35.227 with HTTP; Fri, 10 Oct 2014 17:23:19 -0700 (PDT) In-Reply-To: <1412973773-3942-1-git-send-email-rth@redhat.com> References: <1412973773-3942-1-git-send-email-rth@redhat.com> Date: Sat, 11 Oct 2014 00:23:00 -0000 Message-ID: Subject: Re: [PATCH 00/13] Go closures, libffi, and the static chain From: Ian Lance Taylor To: Richard Henderson Cc: gcc-patches , "libffi-discuss@sourceware.org" , "gofrontend-dev@googlegroups.com" Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2014/txt/msg00110.txt.bz2 On Fri, Oct 10, 2014 at 1:42 PM, Richard Henderson wrote: > > So instead I thought about how I'd add some support for Go directly > into libffi. After all, we've got some custom code in libffi for > Java, why couldn't Go have the same treatment? > > The stickler, as far as I could see, is __go_set_context. I didn't > like the idea of libffi needing a callback into libgo in order to > accomplish the goal. > > But the comment immediately before __go_set_closure itself says > that it would be better to use the static chain register. So I set > about to see how easy that would be to accomplish. (And not for > nothing such a change would make gccgo compiled programs faster > by avoiding the library calls.) > > The following patch set enables this for x86_64, i386, and aarch64[3]. ... > Before I go too much farther down this road, I wanted to get some > feedback. FWIW, a complete tree can be found at [4]. I think this is a great idea. Thanks. Ian