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 C78619F9C18 for ; Thu, 18 May 2006 09:41:08 -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 23370-09 for ; Thu, 18 May 2006 09:41:00 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from unicorn.rentec.com (unicorn.rentec.com [216.223.240.10]) by postgresql.org (Postfix) with ESMTP id 3F8899FA293 for ; Thu, 18 May 2006 09:40:46 -0300 (ADT) Received: from wren.rentec.com (wren [192.5.35.106]) by unicorn.rentec.com (8.13.6/8.12.1) with ESMTP id k4ICecjJ009937 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 18 May 2006 08:40:39 -0400 (EDT) X-Source: non-mednet Received: from [172.26.132.145] (hoopoe.rentec.com [172.26.132.145]) by wren.rentec.com (8.13.1/8.12.1) with ESMTP id k4ICeaJf012954; Thu, 18 May 2006 08:40:36 -0400 (EDT) Message-ID: <446C6B44.9040800@rentec.com> Date: Thu, 18 May 2006 08:40:36 -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: Bruce Momjian CC: Tom Lane , pgsql-ports@postgresql.org Subject: Re: solaris build problem with Sun compilers References: <200605172239.k4HMdm303324@candle.pha.pa.us> In-Reply-To: <200605172239.k4HMdm303324@candle.pha.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Logged: Logged by unicorn.rentec.com as k4ICecjJ009937 at Thu May 18 08:40:39 2006 X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200605/57 X-Sequence-Number: 2438 Bruce Momjian wrote: > Alan Stange wrote: >> Tom Lane wrote: >>> Alan Stange writes: >>> >>>> Check out the comment and implementation for cas32() in this .il >>>> template file for libc from OpenSolaris: >>>> >>> >>>> http://cvs.opensolaris.org/source/xref/on/usr/src/lib/libc/sparc/threads/sparc.il >>>> >>> If you mean >>> >>> * When compiling with -xarch=v8, the compiler refuses to >>> * accept the 'cas' instruction, so we encode it in hex below. >>> >>> I can't say that that impresses me. It still will fail on v8 chips no? >>> What's the point of fooling the compiler if you can't fool the hardware? >> I believe the trick here is that Solaris 10 will only run on v9 hardware >> (or the sun4u systems), which all have the instruction. But the v8 ABI >> "model" doesn't have it. So, in some sense the ABI doesn't "allow" >> this instruction, but the hardware does, so they can just slam it in >> knowing that it'll work. > Uh, are you saying our Solaris Sparc "cas" ASM is only going to work for > Solaris 11 tools? That doesn't sound good. We must have people using > earlier Solaris tools. No, I'm not saying that at all. I think I'm saying that cas is OK for any reasonable Solaris+Sparc+Sun compiler combination. It'll fail on any SuperSparc based hardware and older compilers (more than ~5 years), but that's too bad. I'm also saying that cas in not OK for any gcc+binutils combination. As far as I can tell, gcc is still building code for the v7 platform by default. It's possible to override this, but I don't think it's something you can test for in the preprocessor. -- Alan