Add documentation for immediates with type bool.

This makes the documentation for the new bconst instruction more complete.
This commit is contained in:
Dan Gohman
2017-07-13 16:23:41 -07:00
parent 52dae7c2e2
commit 89634fa645
2 changed files with 8 additions and 1 deletions

View File

@@ -265,6 +265,13 @@ indicate the different kinds of immediate operands on an instruction.
A 64-bit immediate floating point number in the IEEE 754-2008 binary64 A 64-bit immediate floating point number in the IEEE 754-2008 binary64
interchange format. All bit patterns are allowed. interchange format. All bit patterns are allowed.
.. type:: bool
A boolean immediate value, either false or true.
In the textual format, :type:`bool` immediates appear as 'false'
and 'true'.
.. type:: intcc .. type:: intcc
An integer condition code. See the :inst:`icmp` instruction for details. An integer condition code. See the :inst:`icmp` instruction for details.

View File

@@ -49,7 +49,7 @@ ieee64 = ImmediateKind('ieee64', 'A 64-bit immediate floating point number.')
#: #:
#: This type of immediate boolean can interact with SSA values with any #: This type of immediate boolean can interact with SSA values with any
#: :py:class:`cretonne.BoolType` type. #: :py:class:`cretonne.BoolType` type.
boolean = ImmediateKind('boolean', 'An immediate boolean.', boolean = ImmediateKind('bool', 'An immediate boolean.',
rust_type='bool') rust_type='bool')
#: A condition code for comparing integer values. #: A condition code for comparing integer values.