https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/powerpc64/strlen.S;h=0d8a38b0cdc7e4582cbb1aa81b07f315a626ee35;hb=d5b411854f0a3135c931921dfa8a33af395acfd3#l104 Since both of dcbt and dcbtst are just hints, it seems easiest to just implement them as no-ops rather than try to fix glibc and probably other software that uses them since afaict all 64-bit PowerISA cpus have implemented them (and probably more, they were first introduced with PPC). I encountered this while trying to get a statically-linked hello-world to work in bug #1228
(In reply to Jacob Lifshay from comment #0) > https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/powerpc64/ > strlen.S;h=0d8a38b0cdc7e4582cbb1aa81b07f315a626ee35; > hb=d5b411854f0a3135c931921dfa8a33af395acfd3#l104 > > Since both of dcbt and dcbtst are just hints, it seems easiest to just > implement them as no-ops absolutely. this is exactly what microwatt does. leave it with me.
commit 1e80810cfac7e2786aa5b81a92f4831dc1031ec0 (HEAD -> 1228-elf-dynamic, origin/1228-elf-dynamic) Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net> Date: Sun Dec 3 11:32:28 2023 +0000 bug 1231: all dc* instructions to be treated as nop https://bugs.libre-soc.org/show_bug.cgi?id=1231#c1
(In reply to Luke Kenneth Casson Leighton from comment #3) > commit 1e80810cfac7e2786aa5b81a92f4831dc1031ec0 (HEAD -> 1228-elf-dynamic, > origin/1228-elf-dynamic) > Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net> > Date: Sun Dec 3 11:32:28 2023 +0000 > > bug 1231: all dc* instructions to be treated as nop > > https://bugs.libre-soc.org/show_bug.cgi?id=1231#c1 it needs to be just dcbt and dcbtst, since some dc* instructions do have an effect even in the simulator: dcbz -- zero block -- basically a really fast way to write zeros to memory. our half-baked pseudocode for dcbz: https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=openpower/isa/sprset.mdwn;hb=1d45949e369d92c0cbd41b2c247a5bae9c37e11b#l310
commit 79811794450d0eb832313ed26468637da6d27f12 (HEAD -> 1228-elf-dynamic) Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net> Date: Sun Dec 3 17:45:53 2023 +0000 bug 1228: dcbt* to match against nop, not dc* in ISACaller
(In reply to Luke Kenneth Casson Leighton from comment #5) > commit 79811794450d0eb832313ed26468637da6d27f12 (HEAD -> 1228-elf-dynamic) > Author: Luke Kenneth Casson Leighton <lkcl@lkcl.net> > Date: Sun Dec 3 17:45:53 2023 +0000 > > bug 1228: dcbt* to match against nop, not dc* in ISACaller Thanks! I'm leaving this bug open so we add dcbt to soc.git.