[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
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Thu Jan 5 03:02:57 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215681
--- Comment #2 from Mark Millard <markmi at dsl-only.net> ---
(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
===================================================================
--- /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= 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=
being in use was:
--- adb_mouse.o ---
/usr/src/sys/dev/adb/adb_mouse.c:523:21: error: implicit conversion from 'int'
to 'int8_t' (aka 'signed char') changes value from 128 to -128
[-Werror,-Wconstant-conversion]
sc->packet[0] = 1 << 7;
~ ~~^~~~
1 error generated.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-toolchain
mailing list