From owner-freebsd-ppc@freebsd.org Tue Jan 17 20:33:05 2017 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C327CB4175; Tue, 17 Jan 2017 20:33:05 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 05F331CAB; Tue, 17 Jan 2017 20:33:05 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qt0-x233.google.com with SMTP id l7so178981807qtd.1; Tue, 17 Jan 2017 12:33:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ZUiLChI8TlZJAnT7zw1vn7TLWt0FJRL6MChrvjmtE54=; b=kG7ewu1jYA2XQrWr3tbtxcuxD4f4kiQuLiQBx5jL1n71QYMussuTavaqJqLkj57/P8 53YUStFHeJTYH4EV91gy9di/jVkzO1nVa/H55j+/u1U8x4bA+wIRePivu4TtwEJlV9PY Pfxs6N06JFXIHcGr3F2UwnSIJL4Jp4+z3uCE0zYLF4+JwYQXv3OKRMCZPB4ZRopz4R17 eRUk0RPtVInpimxZ7QuqV+drTi+rEakDp8ww5PPO4NLQ0jV1lOsyD4iybNm4v46CEUm2 yA03O7uBOjQ9JnAdB0XcLBGmES2Zp8JpEoMqTKAaE+jbyepwC9qzR81Nwe2RvVWxhPI/ 2cEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ZUiLChI8TlZJAnT7zw1vn7TLWt0FJRL6MChrvjmtE54=; b=iQGAVIuFf+z/OTdJt7uK3gKKNvWGXBsJcFBUgA6q3XJHnJkJEsEG7oxccbvQ9Nfp8H Ie9jEw6ltJk1ELQAn+QNd5Xjpxi2L//vtzLxcDvE8bd4d8b6S+L7fUzf6BOhUUw1wjKI Ayz8fIf3B7/69KnlZ0Iky9LkLCw4hmZ3bGYgcWrstZFkscR+vWnt+PUPU7z/f98aU70F JxQY9YagKxbjrZU7E+dMeGqWKxC8VoMpx4ttB0Or1qc+bNMzf7yXwjGxkQuUk5C3xpV3 JybEV1jK/T0xfqw6S3l6CVTqAXeeJ8BjV7e/hR1A526gkprQoG4+Y6ZxpT33tllv04AX PfCg== X-Gm-Message-State: AIkVDXKFoinzw5Zn/21uTaZkWngcSFzzRWbmU8lbUuTWAEb4YgffN3hSXQboIVyDKbnRShOXhw7fDO4u3Yec7Q== X-Received: by 10.200.56.76 with SMTP id r12mr35423342qtb.2.1484685184102; Tue, 17 Jan 2017 12:33:04 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.157.69 with HTTP; Tue, 17 Jan 2017 12:33:03 -0800 (PST) In-Reply-To: <20170117194651.GA88907@vlakno.cz> References: <300CB7A2-34BB-407F-B2E9-D263B119A989@dsl-only.net> <20161205161904.GA7889@vlakno.cz> <20170117194651.GA88907@vlakno.cz> From: Justin Hibbits Date: Tue, 17 Jan 2017 14:33:03 -0600 Message-ID: Subject: Re: clang 3.9.0 buildkernel on old powerpc64's vs. trying to build hwpmc_e500.o and the like. . . To: Roman Divacky Cc: FreeBSD Toolchain , Mark Millard , FreeBSD PowerPC ML Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Jan 2017 20:33:05 -0000 I was incorrect. The Freescale reference actually lists both numbers in the instruction list (167/231 in A.1 and A.5, 334/462 in A.2). The values you listed are correct, and match what GCC generates as well. - Justin On Jan 17, 2017 13:49, "Roman Divacky" wrote: > Are you sure? My coy of PowerISA lists the numbers that I used? What makes > you > think it should be shifted by one bit? > > On Mon, Jan 16, 2017 at 08:45:58PM -0600, Justin Hibbits wrote: > > The patch is incorrect, the 'xo' values are off by one bit (inline > > change): > > > > > > On Dec 5, 2016, at 10:19 AM, Roman Divacky wrote: > > > > > Can you try this patch? > > > > > > Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td > > > =================================================================== > > > --- llvm/lib/Target/PowerPC/PPCInstrInfo.td (revision 288675) > > > +++ llvm/lib/Target/PowerPC/PPCInstrInfo.td (working copy) > > > @@ -2373,6 +2373,12 @@ > > > def MFTB : XFXForm_1<31, 371, (outs gprc:$RT), (ins i32imm:$SPR), > > > "mftb $RT, $SPR", IIC_SprMFTB>; > > > > > > +def MFPMR : XFXForm_1<31, 334, (outs gprc:$RT), (ins i32imm:$PMRN), > > > > 334 should be 167 > > > > > + "mfpmr $RT, $PMRN", IIC_IntGeneral>; > > > + > > > +def MTPMR : XFXForm_1<31, 462, (outs), (ins i32imm:$PMRN, gprc:$RS), > > > + "mtpmr $PMRN, $RS", IIC_IntGeneral>; > > > > 462 should be 231. > > > > > + > > > // A pseudo-instruction used to implement the read of the 64-bit > > > cycle counter > > > // on a 32-bit target. > > > let hasSideEffects = 1, usesCustomInserter = 1 in > > > > > > > I'll have a patch ready for LLVM review within a week or so, including > > some level of scheduling. > > > > - Justin >