X-Original-To: pgsql-ports-postgresql.org@localhost.postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id C56B39F946D for ; Fri, 12 May 2006 17:38:49 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 41091-01 for ; Fri, 12 May 2006 17:38:39 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from centaur.rentec.com (centaur.rentec.com [216.223.240.8]) by postgresql.org (Postfix) with ESMTP id ADD1A9FA1B0 for ; Fri, 12 May 2006 17:38:34 -0300 (ADT) Received: from ram.rentec.com (ram [192.5.35.66]) by centaur.rentec.com (8.13.6/8.12.1) with ESMTP id k4CKcSc6001209 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 May 2006 16:38:28 -0400 (EDT) X-Source: non-mednet Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by ram.rentec.com (8.13.1/8.12.1) with ESMTP id k4CKcQCV029470; Fri, 12 May 2006 16:38:26 -0400 (EDT) Message-ID: <4464F242.5060705@rentec.com> Date: Fri, 12 May 2006 16:38:26 -0400 From: Alan Stange Reply-To: stange@rentec.com Organization: Renaissance Technologies Corp. User-Agent: Mail/News 1.5.0.2 (X11/20060427) MIME-Version: 1.0 To: Tom Lane CC: Bruce Momjian , pgsql-ports@postgresql.org Subject: Re: solaris build problem with Sun compilers References: <200605112316.k4BNGeB17324@candle.pha.pa.us> <4463D639.3030802@rentec.com> <4464B653.1040301@rentec.com> <5470.1147451501@sss.pgh.pa.us> <4464C950.40906@rentec.com> <12675.1147457431@sss.pgh.pa.us> <4464DAB0.70900@rentec.com> <15883.1147460750@sss.pgh.pa.us> <4464EC2D.6080406@rentec.com> <23055.1147465626@sss.pgh.pa.us> In-Reply-To: <23055.1147465626@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Logged: Logged by centaur.rentec.com as k4CKcSc6001209 at Fri May 12 16:38:28 2006 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/36 X-Sequence-Number: 2417 Tom Lane wrote: > Alan Stange writes: >> - postgresql HEAD when using the Solaris compilers spro9 or newer will >> only run on v9 based hardware using v8plus or v9 platform. >> - postgresql HEAD when using gcc will run on anything as they generate >> code for the v7 platform by default and the cas instruction isn't used >> in any assembler code in postgresql. > > I gather from the contents of solaris_sparc.s that the Sun compilers can > be expected to define __sparcv9 if compiling for v9 hardware. I'm > inclined to #ifdef things so that we use cas if that symbol's defined and > ldstub if not. I'm not sure if gcc can be expected to define the same > symbol --- we might end up using ldstub always, even if we try to > conditionalize the code for gcc. This code isn't used by gcc, is it? Or are you thinking to use the same assembler segment in the inline function used by gcc? > Or we could just revert to ldstub. This seems like a lot of complexity > for a so-far-entirely-hypothetical performance gain ... I suspect that on machines like the UltraSparc T1 (the multi-core boxes) this can have an impact (lots of additional memory writes). Even so, that seems like a stretch. Was there any reason given for the cas patch? I might get around to doing the work for the Solaris compiler build to support the inline keyword as well. I hacked on it a bit today but had to get back to real work... -- Alan