From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31550 invoked by alias); 11 Oct 2014 00:33:41 -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 31529 invoked by uid 89); 11 Oct 2014 00:33:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 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-f45.google.com Received: from mail-oi0-f45.google.com (HELO mail-oi0-f45.google.com) (209.85.218.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 11 Oct 2014 00:33:39 +0000 Received: by mail-oi0-f45.google.com with SMTP id i138so8393395oig.18 for ; Fri, 10 Oct 2014 17:33:37 -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=xB5opfDlVj9Y4yie2Y5LKCmGqXiMDtclwZb11R9iFKg=; b=Kfd4pbQ+N1tTEawGgBnXskeKiIhVLKC7kOJebI14cYN1n+GaVn0iHstqUevOnhlbVH +38gFwSBVHvnuE0fF23Q7lb1652RxUDXCXQTKkvxOh0NatIC9DOl8pzaMQyR7PoubvZN r/T0fAMQKB2Spt7OnSPQIrGRvCHm8pXEh007i7l1sgl+f24/SpnpFFsCH5pHnxFq/DgD iKWIe35xsxtfVPRzT/mSlB/sT98NcVHfs4PXEkYKmImdr4+aoAt/h6Fim9dB7yacAxQ7 ZOxfenJ9B4VC8bWhf+Li1R2bMxk+zhNK1sUg7oY22Hf62p4coi6AdmKE0ETVylr1kNod SFDw== X-Gm-Message-State: ALoCoQktJ9rPeBqgI17p6J4Rm0OUdW269rycZwGLL7ZRztumPpKOL9DVsMGFMurDiKAWyjrerc0E MIME-Version: 1.0 X-Received: by 10.182.236.162 with SMTP id uv2mr7745944obc.12.1412987617651; Fri, 10 Oct 2014 17:33:37 -0700 (PDT) Received: by 10.60.35.227 with HTTP; Fri, 10 Oct 2014 17:33:37 -0700 (PDT) In-Reply-To: <1412973773-3942-4-git-send-email-rth@redhat.com> References: <1412973773-3942-1-git-send-email-rth@redhat.com> <1412973773-3942-4-git-send-email-rth@redhat.com> Date: Sat, 11 Oct 2014 00:33:00 -0000 Message-ID: Subject: Re: [PATCH 03/13] HACK! Allow the static chain to be set from C 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/msg00111.txt.bz2 On Fri, Oct 10, 2014 at 1:42 PM, Richard Henderson wrote: > > This is awful syntax, and therefore contains no documentation. > But we'll need to be able to set the static chain on a few calls > within the Go runtime, so we need to expose this by some means. > > It currently looks like > > function(args...) __builtin_call_chain(pointer) > > because that was easy to parse. How crazy would it be to move __builtin_call_chain into the function arguments, as in function(a1, a2, __builtin_call_chain(pointer)) This __builtin_call_chain call would be removed from the argument list so type checking would only look at a1, a2. It would just set the static chain value. That at least puts the call_chain in the right place, which is a special kind of function argument. Ian