From owner-freebsd-sparc64@FreeBSD.ORG Fri Feb 23 22:10:01 2007 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5DEEC16A405 for ; Fri, 23 Feb 2007 22:10:01 +0000 (UTC) (envelope-from evultrole@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.freebsd.org (Postfix) with ESMTP id E263313C442 for ; Fri, 23 Feb 2007 22:10:00 +0000 (UTC) (envelope-from evultrole@gmail.com) Received: by nf-out-0910.google.com with SMTP id k27so771921nfc for ; Fri, 23 Feb 2007 14:09:56 -0800 (PST) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=JAsnOQiHGZ0QvRm9NwcC4869enZbZizfoX7iL0zpxpDV1EtfZ9izRYTR9R1hG/SeIhUVnbb3abhwhd1FsEGBuQ3OOH32zjQ4Ir0nKDoDr9pJgBT5eokALpFzJCo4dev5qucRPBASTp2I5xH4P6kDS93OlTZk7a18VlG07+0rBJk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=g6wjDKvVKMLu4Qbqzb/gEPqPkiLjlDdD3uqXBX0Pce6fpEFUAkNEY2bCH8Qb2bEcDuv+wL8LUKHACTnz0i39cGWfR0d27cAM3maDR/75gFb8KXPBoZ+h4Jt20YU3hj1YsWvbk7Lzx/FqPgd8sy/CNQz/tiyY8oezwUb4Y9Vedck= Received: by 10.78.204.7 with SMTP id b7mr231379hug.1172268596155; Fri, 23 Feb 2007 14:09:56 -0800 (PST) Received: by 10.78.178.6 with HTTP; Fri, 23 Feb 2007 14:09:51 -0800 (PST) Message-ID: <340594530702231409i15b257dwdb39d52a62ab9a0a@mail.gmail.com> Date: Fri, 23 Feb 2007 14:09:51 -0800 From: "Steven Hillis" To: freebsd-sparc64@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: good (working) CFLAGS for SPARC64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Feb 2007 22:10:01 -0000 So, changing the __sparc_v9__ to __sparc64___ in 5 files (something for asm in bind9 and four files in contrib/gcc/config/sparc, only two of which are actually used) makes CPU flags work properly. I do not yet know whether it disables their effects or not (i.e. does setting it to __sparc_v9__ have some effect on the code output, or is it an arbitrary label with optimizations controlled by the -Av9a thing?) I have compiled the tree successfully using mcpu=ultrasparc after very few changes, and am trying to work up a proper benchmark to see if it actually did anything at all. The other side (if this just disabled their effects) consists of replacing all the ifdef __sparc64__ lines with if defined(__sparc64__) || defined(__sparc_v9__) in about 400 places, none of which are just standard lines I can swap out using sed... so I'm hoping I can fix it with the 5 changes rather than the other way around... I'll up a source diff after I get it worked out properly. Incidentally, bzip2 works at exactly the same speed with the mcpu flag set for compile and with a standard compile... that means one of three things: code is already set to ultrasparc || I disabled the mcpu flag effects || ultrasparc has too many cache hits for optimization to matter in compression programs. I don't really know enough about the internals of the GCC optimization settings and how flags affect it to be certain until I get some sort of real number on this (currently I'm trying to just use average build time for buildworld and comparing mcpu'd gcc with non) so if anyone can shed light on what that does (just a quick sentence or two) that would probably help.