From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6585 invoked by alias); 14 Feb 2011 13:41:36 -0000 Received: (qmail 6577 invoked by uid 22791); 14 Feb 2011 13:41:35 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mtagate1.uk.ibm.com (HELO mtagate1.uk.ibm.com) (194.196.100.161) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Feb 2011 13:41:27 +0000 Received: from d06nrmr1707.portsmouth.uk.ibm.com (d06nrmr1707.portsmouth.uk.ibm.com [9.149.39.225]) by mtagate1.uk.ibm.com (8.13.1/8.13.1) with ESMTP id p1EDfOh5019760 for ; Mon, 14 Feb 2011 13:41:24 GMT Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by d06nrmr1707.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id p1EDfTnO1785908 for ; Mon, 14 Feb 2011 13:41:29 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id p1EDfNNq026280 for ; Mon, 14 Feb 2011 06:41:23 -0700 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id p1EDfMXU026236; Mon, 14 Feb 2011 06:41:22 -0700 Message-Id: <201102141341.p1EDfMXU026236@d06av02.portsmouth.uk.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 14 Feb 2011 14:41:22 +0100 Subject: Re: [rfc] Implement support for IBM XL C for OpenCL vector ABI To: mark.kettenis@xs4all.nl (Mark Kettenis) Date: Mon, 14 Feb 2011 13:47:00 -0000 From: "Ulrich Weigand" Cc: gdb-patches@sourceware.org In-Reply-To: <201102131537.p1DFbvf2004634@glazunov.sibelius.xs4all.nl> from "Mark Kettenis" at Feb 13, 2011 04:37:57 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00275.txt.bz2 Mark Kettenis wrote: > I didn't look too closely at the diff yet, but given that > push_dummy_call() functions tend to be fairly complex already, would > it be possible to move the OpenCL calling convention into a seperate > function? Having a completely separate function at the push_dummy_call level would lead to significant code duplication, since most of the "regular" data types are also available in OpenCL C. The new code just adds support for the special vector types. I certainly agree that those functions are quite complex already. One reason for that is that pushing arguments is inherently stateful, and that state is currently spread out across a significant number of local variables in the push_dummy_call functions. This makes using subroutines and helper functions difficult. It seems one way towards a refactoring of those routines would be to extract that state into an explicit data structure (along the lines of CUMULATIVE_ARGS in GCC), and then split handling of different types of arguments into functions of their own, passing that state around. If this looks useful, I can work on patch along those lines ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com