From: Luke Kenneth Casson Leighton Date: Sun, 21 May 2023 20:26:59 +0000 (+0000) Subject: minor wording in opensearch2023.tex X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=feca9ae9e29a8c0e1c5aa02a66f25cd518f3f0e3;p=libreriscv.git minor wording in opensearch2023.tex --- diff --git a/conferences/opensearch2023/opensearch2023.tex b/conferences/opensearch2023/opensearch2023.tex index e53aa60d2..2319f2880 100644 --- a/conferences/opensearch2023/opensearch2023.tex +++ b/conferences/opensearch2023/opensearch2023.tex @@ -191,8 +191,9 @@ up algorithms have to have "preamble" and "postamble" to take care of the corner-cases. Worse, a naive SIMD ISA cannot have Conditional inter-relationships. -64-byte or 128-byte-wide LOADs either succeed in full or they fail -in full. If the strncpy subroutine happens to copy from the last +In well-defined ISAs, 128-byte or greater LOADs either succeed in full +or they fail in full. +If the strncpy subroutine happens to copy from the last few bytes in memory, SIMD LOADs are the worst thing to use. We need a way to Conditionally terminate the LOAD and inform the Programmer, and this is where (as in ARM SVE) @@ -209,7 +210,9 @@ copying NUL characters from that point onwards. dest[i] = '\0'; \end{verbatim} -Performing such a conditional NUL-character search in a SIMD ISA +Leaving aside the prior issue that LOADing beyond the point where the +NUL was should not even have been attempted in the first place, +performing such a conditional NUL-character search in a SIMD ISA is typically extremely convoluted. A usual approach would be to perform a Parallel compare against NUL (easy enough) followed by an instruction that then searches sequentially for the first @@ -246,7 +249,7 @@ the Vector Length, followed finally by the actual STORE. \textit{All of the sequential-search-and-truncate} is part of the Data-Dependent Fail-First Mode that is a first-order construct in SVP64. When applied to the \textbf{sv.cmpi} instruction, -which produces a Vector of Condition Codes ()as opposed to just +which produces a Vector of Condition Codes as opposed to just one for the Scalar \textbf{cmpi} instruction), the search for the NUL character truncates the Vector Length at the required point, such that the next instruction (STORE)