From patchwork Thu Jan 25 17:44:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Lance Taylor X-Patchwork-Id: 865987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-472030-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="NZeDIXJ1"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zS8Yj1pNKz9s8J for ; Fri, 26 Jan 2018 04:44:39 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; q= dns; s=default; b=gclzQehVDuSj/2VRniWrABPaJ7zf1WPfefet96VayP1/II TEiIcbE+UETbrSjqhOvYjL+UiQlvKONg6+Gxu883XQ8iyYONh729XRNKA8fYP1IM uBKT/iZd7bTOrwv9iAbJydarXBchhsEG3n9fCwppROpcT+m1VpUUnJniZ6nfw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:from:date:message-id:subject:to:content-type; s= default; bh=avSQuvPTbNnLhLGyM2WRAjFHJ+8=; b=NZeDIXJ1qgUEuFq+iSHw Zp19NAFobIHGjftE6nxGF8QP2ugzGknmE1BKBzcGQRMZPp6ElOO0JelEx2nd/8M4 7yCKJXiMAPNVejADwur2gfhEw3Srst2jCvzJcUdoBPfpJ/7hz5Xsiy1B2Vn6dMYE 0BkCzBEUfNw1FmXrVgkkt0E= Received: (qmail 18944 invoked by alias); 25 Jan 2018 17:44:32 -0000 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 Received: (qmail 18932 invoked by uid 89); 25 Jan 2018 17:44:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-wm0-f41.google.com Received: from mail-wm0-f41.google.com (HELO mail-wm0-f41.google.com) (74.125.82.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 25 Jan 2018 17:44:29 +0000 Received: by mail-wm0-f41.google.com with SMTP id f71so16161156wmf.0 for ; Thu, 25 Jan 2018 09:44:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=N8necNWM3WIGpHju3C2q0lb67FWrUBEmmBRAcvJRem0=; b=iR7t8R9PWDnykehHjrQtA+iVTb2pQS7onOSyMCb/uJmpMuVuVJjQfU/tNJCGvWyBHx aYPbS82AHeSgAEakCSvCx0dwtRXd6+dSNgpqtSPgodCIDDoeNI+jGvz+OyCXKbS+Xgk/ 0mUNyaSav2Lt+tW86zV9BiK4iAlMjTJ+mlvRLdmwgMgQeidk91JtpLCAnX+h7Mjusuhh ipsrOuz0H5D3B1SRV78/+mN+RqeP+PFVTvPXkMglu576BeotqfzjNeiAShN2ceDzCS9+ nFwo4bm4ZqCMQYYF/DttL4ageOLzZNH8pPtiBGRdHmyi+tDcjpcIUgb4i0R/jJVzyjdG dj4A== X-Gm-Message-State: AKwxytdYCk+D53fh27PyOpIiHWY6hwIE/H8uyARK5VE+fk7++duJFQQO lOLrzgdt6goEi+/tgyGWhZHw/imWnJQ/3SKu7lPRQNYt X-Google-Smtp-Source: AH8x226OdJQltQikIMnF/BOI4spDHy6PgzC3N0zuNZiunLVXcEbflYAWWxvsSRzlZ9oPGwt29B0uIhXv+1cqodob0oY= X-Received: by 10.80.217.141 with SMTP id w13mr29952177edj.193.1516902267512; Thu, 25 Jan 2018 09:44:27 -0800 (PST) MIME-Version: 1.0 Received: by 10.80.134.56 with HTTP; Thu, 25 Jan 2018 09:44:26 -0800 (PST) From: Ian Lance Taylor Date: Thu, 25 Jan 2018 09:44:26 -0800 Message-ID: Subject: libgo patch committed: fix lfstackUnpack on ia64 To: gcc-patches , gofrontend-dev@googlegroups.com This libgo patch by James Clarke fixes lfstackUnpack on ia64. The top three region number bits must be masked out before right-shifting the address bits into place, otherwise they will be copied down into the lower always-zero address bits. Bootstrapped and ran Go runtime tests on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE =================================================================== --- gcc/go/gofrontend/MERGE (revision 257049) +++ gcc/go/gofrontend/MERGE (working copy) @@ -1,4 +1,4 @@ -016ea21c4cba324c6ea6424da7988c6f985e671b +553e04735d1be372c596c720bcaea27e050b13a6 The first line of this file holds the git revision number of the last merge done from the gofrontend repository. Index: libgo/go/runtime/lfstack_64bit.go =================================================================== --- libgo/go/runtime/lfstack_64bit.go (revision 256593) +++ libgo/go/runtime/lfstack_64bit.go (working copy) @@ -78,7 +78,7 @@ func lfstackUnpack(val uint64) *lfnode { return (*lfnode)(unsafe.Pointer(uintptr(int64(val) >> sparcLinuxCntBits << 3))) } if GOARCH == "ia64" { - return (*lfnode)(unsafe.Pointer(uintptr((val>>ia64CntBits<<3)&(1<<(64-3)-1) | val&^(1<<(64-3)-1)))) + return (*lfnode)(unsafe.Pointer(uintptr(((val & (1<<(64-3) - 1)) >> ia64CntBits << 3) | val&^(1<<(64-3)-1)))) } if GOARCH == "ppc64" && GOOS == "aix" { if val&(1<<63) != 0 {