diff options
author | Alex Bradbury <asb@lowrisc.org> | 2017-05-02 13:47:10 +0000 |
---|---|---|
committer | Alex Bradbury <asb@lowrisc.org> | 2017-05-02 13:47:10 +0000 |
commit | 6d1bf4ddc4f6d12ba0b835be5bd9069a21acbd62 (patch) | |
tree | e4ea0c608f98c455a7ba4f8c6f4f744306a9240c /docs | |
parent | bd38dfea4cc854ca3908f79b24d51553bf84855c (diff) |
Improvements to TableGen/LangIntro.rst
Document the 'code' data type, and that value{15-17} is different to
value{17-15}.
Patch by @chenwj (Wei-Ren Chen).
Differential Revision: https://reviews.llvm.org/D32117
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301920 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r-- | docs/TableGen/LangIntro.rst | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/docs/TableGen/LangIntro.rst b/docs/TableGen/LangIntro.rst index d8bd17d750b8..460ff9067f20 100644 --- a/docs/TableGen/LangIntro.rst +++ b/docs/TableGen/LangIntro.rst @@ -58,6 +58,10 @@ types are: The 'string' type represents an ordered sequence of characters of arbitrary length. +``code`` + The `code` type represents a code fragment, which can be single/multi-line + string literal. + ``bits<n>`` A 'bits' type is an arbitrary, but fixed, size integer that is broken up into individual bits. This type is useful because it can handle some bits @@ -105,7 +109,7 @@ supported include: hexadecimal integer value ``"foo"`` - string value + a single-line string value, can be assigned to ``string`` or ``code`` variable. ``[{ ... }]`` usually called a "code fragment", but is just a multiline string literal @@ -126,7 +130,8 @@ supported include: access to one bit of a value ``value{15-17}`` - access to multiple bits of a value + access to an ordered sequence of bits of a value, in particular ``value{15-17}`` + produces an order that is the reverse of ``value{17-15}``. ``DEF`` reference to a record definition |