Open alexcher-im opened 1 year ago
How about something like:
The final word is the word containing the string's nul-termination byte. Any remaining bytes in this final word are padded with 0.
Hopefully that makes it clearer that the nul-terminator is a byte in the string rather than requiring an additional nul word.
Current specification (Version 1.6, Revision 2) (see Online specification) states:
2.2.1 Instructions:
Which can be misundestood as the nul-word is required after the words, containing string. e.g. the string "Khronos" wil consume 3 words: "Khro", "nos\0", "\0", while the last word must not be present, according to the generated output of SPIRV-Tools.
Can you please clarify it in the specification, maybe with simple example, like: "the 6-character string will consume 2 words, where high 16 bits of the last word will be zero", or something more formal.