add strncpy TODO background
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 11 Feb 2024 15:26:07 +0000 (15:26 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 11 Feb 2024 15:26:07 +0000 (15:26 +0000)
conferences/fosdem2024/fosdem2024_ddffirst/fosdem2024_ddffirst.tex

index edcf5e7a2cfe02e131f5751a91145f76b1b3de9e..c02d755c2b5197daa67d39bf8dc47e0f1c65a83b 100644 (file)
@@ -165,7 +165,14 @@ for (i = 0; i < VL; i++)
 
     \lstinputlisting[language={}]{strncpy.c}
   \begin{itemize}
-    \item "TODO
+    \item two simple-looking for-loops, unfortunately sequentially
+          data-dependent in the first.
+     \item Power ISA added a hard-coded variant of this inner
+          data-dependent capacity into VSX - only for strcpy!
+     \item even the null-ing part is not straightforward as
+          it could be mis-aligned compared to the VSX width.
+     \item end-result is that assembler-optimised strncpy on Power
+           ISA v3.0 is a whopping 240 instructions. SVP64 is 10
  \end{itemize}
 }