From patchwork Fri Jan 14 16:04:12 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 78933 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 5BB66B70AF for ; Sat, 15 Jan 2011 03:04:29 +1100 (EST) Received: (qmail 21645 invoked by alias); 14 Jan 2011 16:04:26 -0000 Received: (qmail 21633 invoked by uid 22791); 14 Jan 2011 16:04:25 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_FX, TW_MB, TW_MX, TW_XC, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Jan 2011 16:04:19 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 42980D3E; Fri, 14 Jan 2011 17:04:15 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id o5bA6QUTWwZ7; Fri, 14 Jan 2011 17:04:13 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 0E948D3D; Fri, 14 Jan 2011 17:04:13 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p0EG4Cao003075; Fri, 14 Jan 2011 17:04:12 +0100 (MET) From: Rainer Orth To: Ian Lance Taylor Cc: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Re: libgo patch committed: Add Solaris support to mksysinfo.sh References: Date: Fri, 14 Jan 2011 17:04:12 +0100 In-Reply-To: (Ian Lance Taylor's message of "Thu, 13 Jan 2011 12:24:21 -0800") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Ian Lance Taylor writes: > Oh yeah, fixed with this patch. Bootstrapped on > x86_64-unknown-linux-gnu. Committed to mainline. Thanks, but there's another necessary change. Since your patch not to dump float80 any longer, _u?pad128_t aren't included in sysinfo.go anymore: // type _pad128_t struct { _q INVALID-float-80; } // type _upad128_t struct { _q INVALID-float-80; } but are needed in the definition of _fxsave_state: type _fxsave_state struct { fx_fcw uint16; fx_fsw uint16; fx_fctw uint16; fx_fop uint16; fx_eip uint32; fx_cs uint16; __fx_ign0 uint16; fx_dp uint32; fx_ds uint16; __fx_ign1 uint16; fx_mxcsr uint32; fx_mxcsr_mask uint32; fx_st [7+1]struct { fpr_16 [4+1]uint16; }; fx_xmm [7+1]_upad128_t; __fx_ign2 [13+1]_upad128_t; } type _xsave_state struct { xs_fxsave _fxsave_state; xs_xstate_bv uint64; xs_rsv_mbz [1+1]uint64; xs_reserved [4+1]uint64; xs_ymm [15+1]_upad128_t; } type _fpchip_state struct { state [26+1]uint32; status uint32; mxcsr uint32; xstatus uint32; __pad [1+1]uint32; xmm [7+1]_upad128_t; } This patch fixes this by emitting another variant of the unions instead. It allowed me to get further along with the libgo bootstrap on Solaris 10 and 11/x86 (more to follow separately). Ok for mainline? Rainer 2011-01-14 Rainer Orth * mksysinfo.sh (_pad128_t): Define if commented. (_upad128_t): Likewise. diff -r d41829b039be libgo/mksysinfo.sh --- a/libgo/mksysinfo.sh Fri Jan 14 10:14:45 2011 +0100 +++ b/libgo/mksysinfo.sh Fri Jan 14 10:24:54 2011 +0100 @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2009 The Go Authors. All rights reserved. +# Copyright 2009, 2011 The Go Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. @@ -250,6 +250,15 @@ exit 1 fi +# Solaris 2 needs _u?pad128_t, but its default definition in terms of long +# double is commented by -fdump-go-spec. +if grep "^// type _pad128_t" gen-sysinfo.go > /dev/null 2>&1; then + echo "type _pad128_t struct { _l [4]int32; }" >> ${OUT} +fi +if grep "^// type _upad128_t" gen-sysinfo.go > /dev/null 2>&1; then + echo "type _upad128_t struct { _l [4]uint32; }" >> ${OUT} +fi + # The time structures need special handling: we need to name the # types, so that we can cast integers to the right types when # assigning to the structures.