aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Documentation
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-08-15 09:55:19 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-06-23 07:46:40 +0200
commitc8fac68af94b9d23b64e844a283f16b9bed2f9e0 (patch)
treecc5ace2a1e618680ce141e5b0aa6ad7066bad21c /Documentation
parentff7f001bef9aa88ff951d61ec10772e7d2143180 (diff)
downloadsparse-dev-c8fac68af94b9d23b64e844a283f16b9bed2f9e0.tar.gz
cast: specialize cast from pointers
Currently all casts to pointers are processed alike. This is simple but rather unconvenient in later phases as this correspond to different operations that obeys to different rules and which later need extra checks. Change this by using a specific instructions (OP_UTPTR) for [unsigned] integer to pointers. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/IR.rst10
1 files changed, 8 insertions, 2 deletions
diff --git a/Documentation/IR.rst b/Documentation/IR.rst
index b7fe98a4..61575386 100644
--- a/Documentation/IR.rst
+++ b/Documentation/IR.rst
@@ -264,8 +264,11 @@ They all have the following signature:
* .target: result value
* .type: type of .target
+Currently, a cast to a void pointer is treated like a cast to
+an unsigned integer of the same size.
+
.. op:: OP_CAST
- Cast to unsigned integer (and to void pointer).
+ Cast to unsigned integer.
.. op:: OP_SCAST
Cast to signed integer.
@@ -273,8 +276,11 @@ They all have the following signature:
.. op:: OP_UTPTR
Cast from pointer-sized unsigned integer to pointer type.
+.. op:: OP_PTRTU
+ Cast from pointer type to unsigned integer.
+
.. op:: OP_PTRCAST
- Cast to pointer.
+ Cast between pointers.
.. op:: OP_FCVTU
Conversion from float type to unsigned integer.