Add meta definition for bitcast.

This instruction uses two type variables: input and output. Make sure that our
parser can handle it. The output type variable annotation is mandatory.

Add a ValueTypeSet::example() method which is used to provide better diagnostics
for a missing type variable.
This commit is contained in:
Jakob Stoklund Olesen
2016-07-07 13:40:16 -07:00
parent 2bfb4ca5b7
commit 4a929f5e41
6 changed files with 113 additions and 9 deletions

View File

@@ -817,14 +817,7 @@ represented as a floating point number.
Conversion operations
---------------------
.. inst:: a = bitcast x
Reinterpret the bits in ``x`` as a different type.
The input and output types must be storable to memory and of the same size.
A bitcast is equivalent to storing one type and loading the other type from
the same address.
.. autoinst:: bitcast
.. inst:: a = itrunc x
.. inst:: a = uext x
.. inst:: a = sext x