From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29306 invoked by alias); 4 Dec 2008 01:37:01 -0000 Received: (qmail 29287 invoked by uid 22791); 4 Dec 2008 01:37:00 -0000 X-Spam-Check-By: sourceware.org Received: from mail51.messagelabs.com (HELO mail51.messagelabs.com) (216.82.241.99) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Dec 2008 01:36:21 +0000 X-VirusChecked: Checked X-Env-Sender: Alex.Austin@spectrumdsi.com X-Msg-Ref: server-3.tower-51.messagelabs.com!1228354578!19644619!1 X-StarScan-Version: 6.0.0; banners=-,-,- Received: (qmail 24528 invoked from network); 4 Dec 2008 01:36:18 -0000 Received: from mail.mx2.digi.com (HELO mcl-sms-ns2.DIGI.COM) (66.77.174.14) by server-3.tower-51.messagelabs.com with RC4-SHA encrypted SMTP; 4 Dec 2008 01:36:18 -0000 Received: from mtk-sms-exch01.digi.com (10.10.8.100) by mail.mx2.digi.com (172.16.1.14) with Microsoft SMTP Server (TLS) id 8.1.311.2; Wed, 3 Dec 2008 19:38:07 -0600 Received: from mtk-sms-exch01.digi.com ([10.10.8.100]) by mtk-sms-exch01.digi.com ([10.10.8.100]) with mapi; Wed, 3 Dec 2008 19:36:18 -0600 From: "Austin, Alex" To: Robert William Fuller , David Daney CC: Harvey Chapman , "gcc-help@gcc.gnu.org" Date: Thu, 04 Dec 2008 01:37:00 -0000 Subject: RE: va_arglist Message-ID: <3DC6D022E7CC5D41A9CA465499463C9E719BD7335C@mtk-sms-exch01.digi.com> References: <3DC6D022E7CC5D41A9CA465499463C9E719BD73237@mtk-sms-exch01.digi.com> <4935382F.1060909@3gfp.com> <3DC6D022E7CC5D41A9CA465499463C9E719BD73241@mtk-sms-exch01.digi.com> <49357CEC.9070900@caviumnetworks.com> <4935C448.2020806@gmail.com> In-Reply-To: <4935C448.2020806@gmail.com> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2008-12/txt/msg00058.txt.bz2 I'm not aware of __builtin_apply, but the target arch is arm. Not sure whet= her it's eabi or oabi. Whatever the default of gcc-4.0.1 is. -----Original Message----- From: Robert William Fuller [mailto:hydrologiccycle@gmail.com]=20 Sent: Tuesday, December 02, 2008 5:27 PM To: David Daney Cc: Austin, Alex; Harvey Chapman; gcc-help@gcc.gnu.org Subject: Re: va_arglist David Daney wrote: > Austin, Alex wrote: >> That's all about unpacking an arglist. >=20 > No, it does both 'packing' and 'unpacking'. >=20 >> I need to pack an arglist. Also, the function in question isn't >> actually printf, but a custom API, and it doesn't have a vprintf >> equivalent. >=20 > If your architecture is supported by libffi, and the vargs ABI is the=20 > same as the ABI for fixed args, libffi should do exactly what you need. >=20 > David Daney Whatever you do, don't try to use __builtin_apply. It's busted on=20 x86-64. This is why the Objective-C runtime is broken out of the box on=20 x86-64. The only reason Objective-C works for the GnuStep project is=20 they are using hooks in the runtime to replace calls to __builtin_apply=20 with calls to libffi in their runtime.