From owner-freebsd-toolchain@freebsd.org Thu Jan 5 03:02:57 2017 Return-Path: Delivered-To: freebsd-toolchain@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 D81C2C9C18F for ; Thu, 5 Jan 2017 03:02:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C6A3E1692 for ; Thu, 5 Jan 2017 03:02:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0532vla066187 for ; Thu, 5 Jan 2017 03:02:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 215681] head -r310854: TARGET_ARCH=powerpc buildkernel via clang 3.9.1: sys/powerpc/aim/trap_subr32.S:409:2: error: too few operands for instruction Date: Thu, 05 Jan 2017 03:02:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-toolchain@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jan 2017 03:02:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215681 --- Comment #2 from Mark Millard --- (In reply to Mark Millard from comment #1) [Possibly to be treated as a kernel source code issue instead of a toolchain issue! Reassign?] It turns out that only one "normal" ppc instruction had such a syntactic rejection by llvm. So this is not a general syntax mismatch for clang 3.9.1 . I'd guess that the below means that the kernel source will be updated to avoid the problem. I've no clue if FreeBSD would request llvm to allow the assembler syntax that was rejected as well. clang 3.9.1 is not allowing the optional crD to be optional in the instruction format: cmp [crD,]L,rA,rB The following: # svnlite diff /usr/src/sys/powerpc/aim/trap_subr32.S Index: /usr/src/sys/powerpc/aim/trap_subr32.S =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /usr/src/sys/powerpc/aim/trap_subr32.S (revision 311147) +++ /usr/src/sys/powerpc/aim/trap_subr32.S (working copy) @@ -406,7 +406,7 @@ mtctr %r1 /* load counter */ im1: lwzu %r1, 8(%r2) /* get next pte */ - cmp 0, %r1, %r3 /* see if found pte */ + cmp 0, 0, %r1, %r3 /* see if found pte */ bdnzf 2, im1 /* dec count br if cmp ne and if * count not zero */ bne instr_sec_hash /* if not found set up second hash allows buildkernel to finish if WEEROR=3D is used. (The above filled in the default value explicltly.) The other code in trap_subr32.S has a couple of cmp instructions and they have the extra "0," already: . . . dm1: lwzu %r1, 8(%r2) /* get next pte */ cmp 0, 0, %r1, %r3 /* see if found pte */ bdnzf 2, dm1 /* dec count br if cmp ne and if * count not zero */ . . . ds1: lwzu %r1, 8(%r2) /* get next pte */ cmp 0, 0, %r1, %r3 /* see if found pte */ bdnzf 2, ds1 /* dec count br if cmp ne and if * count not zero */ So it appears that having the "extra" 0, is normal for the powerpc kernel sources. Extra information: The next error that buildkernel stopped at without WERROR=3D being in use was: --- adb_mouse.o --- /usr/src/sys/dev/adb/adb_mouse.c:523:21: error: implicit conversion from 'i= nt' to 'int8_t' (aka 'signed char') changes value from 128 to -128 [-Werror,-Wconstant-conversion] sc->packet[0] =3D 1 << 7; ~ ~~^~~~ 1 error generated. --=20 You are receiving this mail because: You are the assignee for the bug.=