From patchwork Tue Nov 6 18:46:41 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 197534 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 AB0DB2C007D for ; Wed, 7 Nov 2012 05:46:56 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1352832418; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version: Content-Type:Mailing-List:Precedence:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:Sender:Delivered-To; bh=2SaGMzL GxQvcBw6L9TNfXwiP9Yw=; b=DVRNCOkhfS9ixcU6A19P8kMFykp2Lj5ha9/a+Dz 7dFlnB4AL3Q30fYN+g5PFkbSj/vHj9IAqZ/v1scWPMES4V4PJmRSkW+hnEswQa9x LhMRv5S8JLK+HYsKjc1HjoKX6FOlHTveDkNu33YJt7Or90bzBVSNgosOrVdVlEm/ jc7c= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:X-Google-DKIM-Signature:Received:Received:From:To:Subject:Date:Message-ID:User-Agent:MIME-Version:Content-Type:X-Gm-Message-State:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=xkoYDBTVyOLkBamojrH7pYv0MCxmO8yJYg/qHV81giVVk9uDLwrj+qV2u50DPU v+xT3haGnyNos2LZBH2B2JbFS+XDgboRWvn0quZPx3B6Jylnm9XxbrI6rYzvfZOH eh6XOjOAHcECgrWqLLSih1ggbp5ueyoAA15EgHebYFGv8=; Received: (qmail 31818 invoked by alias); 6 Nov 2012 18:46:51 -0000 Received: (qmail 31806 invoked by uid 22791); 6 Nov 2012 18:46:49 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, KHOP_RCVD_TRUST, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mail-pb0-f47.google.com (HELO mail-pb0-f47.google.com) (209.85.160.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Nov 2012 18:46:43 +0000 Received: by mail-pb0-f47.google.com with SMTP id ro12so564031pbb.20 for ; Tue, 06 Nov 2012 10:46:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type:x-gm-message-state; bh=s383d05fYMCoNFPotTlq6mV0rrWV+R3iJUMbUEdf/Wc=; b=LlwEBNX/MZwBEy2o0pw7Y/E06GrKBl0y/zJCiXgbInQFtFFJ+QXqgHpI8ebsmlRZws 5PDNVsUs9MEujBGSUowxEwqOGc1bQydsCqWy+iwb0VhlkJJWQMBLkAwz8yChDNUIebGh 4l1eF8bG8WgCIQmeTJ0Rov+ifSpiZT8DGuramLkdMEa4egKIJCwflHYkX8dNDqjxgNjX xAtTDvzhuHdYB4GszCbNfk+JMD6jgXfEKzL7MQGf6lVFAQ00uCOGBI3RE087J7FNghTD tk9w9TqrDPH+10lRGNXr+JpaRKoWi+EOn/tOVqn+GIQQh82GUOppr2keeTVuB6kk9fcP aVVA== Received: by 10.68.137.234 with SMTP id ql10mr5772156pbb.158.1352227603454; Tue, 06 Nov 2012 10:46:43 -0800 (PST) Received: from coign.google.com ([2620:0:1000:1804:224:d7ff:fe8f:f634]) by mx.google.com with ESMTPS id ju7sm12715443pbb.60.2012.11.06.10.46.42 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Nov 2012 10:46:43 -0800 (PST) From: Ian Lance Taylor To: gcc-patches@gcc.gnu.org, gofrontend-dev@googlegroups.com Subject: Go patch committed: Size of int is now 64 bits on x86_64 Date: Tue, 06 Nov 2012 10:46:41 -0800 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnwkaucg9+LztBgCFTX5wrqclsQMCpx/ned96Gt5R91EvMySLWrB6Z70T3lGTKd8Nwb+SbJG3vlkCBuu8VtjT3wxGP4N6udmNI9Z/aryocaD8ZILM44YhoQ0XJMOVfRJvPH/1zO+ww3dyON2ZoDL5ThT7b55gq2fY5r9OCHsPGEUu6dgRNUzQtrHbt2Sm4bFREZ5Qqo 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 This patch to the Go compiler and library changes the size of the Go type "int" to be the same as the size of a pointer. This means that on x86_64 the size of int will be 64 bits. This matches the new behaviour of the other Go compiler, and is the intended implementation for the future Go 1.1 release. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline. Ian diff -r 530c277d39c4 go/gogo.cc --- a/go/gogo.cc Tue Nov 06 10:26:29 2012 -0800 +++ b/go/gogo.cc Tue Nov 06 10:43:54 2012 -0800 @@ -23,8 +23,7 @@ // Class Gogo. -Gogo::Gogo(Backend* backend, Linemap* linemap, int int_type_size, - int pointer_size) +Gogo::Gogo(Backend* backend, Linemap* linemap, int, int pointer_size) : backend_(backend), linemap_(linemap), package_(NULL), @@ -83,6 +82,7 @@ this->add_named_type(Type::make_complex_type("complex128", 128, RUNTIME_TYPE_KIND_COMPLEX128)); + int int_type_size = pointer_size; if (int_type_size < 32) int_type_size = 32; this->add_named_type(Type::make_integer_type("uint", true, diff -r 530c277d39c4 libgo/runtime/runtime.h --- a/libgo/runtime/runtime.h Tue Nov 06 10:26:29 2012 -0800 +++ b/libgo/runtime/runtime.h Tue Nov 06 10:43:54 2012 -0800 @@ -41,8 +41,8 @@ typedef signed int intptr __attribute__ ((mode (pointer))); typedef unsigned int uintptr __attribute__ ((mode (pointer))); -typedef int intgo; // Go's int -typedef unsigned int uintgo; // Go's uint +typedef intptr intgo; // Go's int +typedef uintptr uintgo; // Go's uint /* Defined types. */