[Bug 233863] Various PowerMac G5 models may require kern.smp.disabled=1 and must set usefdt=1 which causes net interface reorder
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri May 10 23:29:30 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=233863
--- Comment #39 from Mark Millard <marklmi26-fbsd at yahoo.com> ---
(In reply to Mark Millard from comment #38)
I forgot to warn that head -r347463 without any patching
has world messed up for older powerpc64 processors like
the 970 family: it is using the newer instruction cmpb in
its strcmp implementation in libc.
I dealt with this issue with a patch that avoids cmpb:
(not appropriate or required for head -r345758 were
the previouosly-attached patches are targeted)
# svnlite diff /mnt/usr/src/
Index: /mnt/usr/src/lib/libc/powerpc64/string/strcmp.S
===================================================================
--- /mnt/usr/src/lib/libc/powerpc64/string/strcmp.S (revision 347463)
+++ /mnt/usr/src/lib/libc/powerpc64/string/strcmp.S (working copy)
@@ -88,9 +88,16 @@
.Lstrcmp_compare_by_word:
ld %r5,0(%r3) /* Load double words. */
ld %r6,0(%r4)
- xor %r8,%r8,%r8 /* %r8 <- Zero. */
+ lis %r8,32639 /* 0x7f7f */
+ ori %r8,%r8,32639 /* 0x7f7f7f7f */
+ rldimi %r8,%r8,32,0 /* 0x7f7f7f7f'7f7f7f7f */
xor %r0,%r5,%r6 /* Check if double words are different. */
- cmpb %r7,%r5,%r8 /* Check if double words contain zero. */
+ /* Check for zero vs. not bytes: */
+ and %r9,%r5,%r8 /* 0x00->0x00, 0x80->0x00,
other->ms-bit-in-byte==0 */
+ add %r9,%r9,%r8 /* ->0x7f, ->0x7f,
->ms-bit-in-byte==1 */
+ nor %r7,%r9,%r5 /* ->0x80, ->0x00,
->ms-bit-in-byte==0 */
+ andc %r7,%r7,%r8 /* ->0x80, ->0x00, ->0x00 */
+ /* sort of like cmpb %r7,%r5,%r8 for %r8 being
zero */
/*
* If double words are different or contain zero,
@@ -104,7 +111,12 @@
ldu %r5,8(%r3) /* Load double words. */
ldu %r6,8(%r4)
xor %r0,%r5,%r6 /* Check if double words are different. */
- cmpb %r7,%r5,%r8 /* Check if double words contain zero. */
+ /* Check for zero vs. not bytes: */
+ and %r9,%r5,%r8 /* 0x00->0x00, 0x80->0x00,
other->ms-bit-in-byte==0 */
+ add %r9,%r9,%r8 /* ->0x7f, ->0x7f,
->ms-bit-in-byte==1 */
+ nor %r7,%r9,%r5 /* ->0x80, ->0x00,
->ms-bit-in-byte==0 */
+ andc %r7,%r7,%r8 /* ->0x80, ->0x00, ->0x00 */
+ /* sort of like cmpb %r7,%r5,%r8 for %r8 being
zero */
/*
* If double words are different or contain zero,
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ppc
mailing list