[PATCH] D107796: [docs] Clarify variable-width integer (VBR) encoding example.
Volodymyr Sapsai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 10 12:59:40 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG178da37b186d: [docs] Clarify variable-width integer (VBR) encoding example. (authored by vsapsai).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D107796/new/
https://reviews.llvm.org/D107796
Files:
llvm/docs/BitCodeFormat.rst
Index: llvm/docs/BitCodeFormat.rst
===================================================================
--- llvm/docs/BitCodeFormat.rst
+++ llvm/docs/BitCodeFormat.rst
@@ -104,11 +104,11 @@
larger than N-1 bits emit their bits in a series of N-1 bit chunks, where all
but the last set the high bit.
-For example, the value 27 (0x1B) is encoded as 1011 0011 when emitted as a vbr4
-value. The first set of four bits indicates the value 3 (011) with a
-continuation piece (indicated by a high bit of 1). The next word indicates a
-value of 24 (011 << 3) with no continuation. The sum (3+24) yields the value
-27.
+For example, the value 30 (0x1E) is encoded as 62 (0b0011'1110) when emitted as
+a vbr4 value. The first set of four bits starting from the least significant
+indicates the value 6 (110) with a continuation piece (indicated by a high bit
+of 1). The next set of four bits indicates a value of 24 (011 << 3) with no
+continuation. The sum (6+24) yields the value 30.
.. _char6-encoded value:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107796.365594.patch
Type: text/x-patch
Size: 1017 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210810/4f2e7292/attachment.bin>
More information about the llvm-commits
mailing list