From 1b2721500337d37f189c7e5d714c9c943062ea79 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Tue, 15 Mar 2016 14:07:13 -0400 Subject: document exts and truncd --- doc/il.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/il.txt b/doc/il.txt index b6e1ecc..9896672 100644 --- a/doc/il.txt +++ b/doc/il.txt @@ -642,6 +642,8 @@ or convert a floating point into an integer and vice versa. * `extsw`, `extzw` -- `l(w)` * `extsh`, `extzh` -- `I(ww)` * `extsb`, `extzb` -- `I(ww)` + * `exts` -- `d(s)` + * `truncd` -- `s(d)` * `ftosi` -- `I(F)` * `sitof` -- `F(I)` @@ -653,6 +655,12 @@ exist to sign-extend and zero-extend a value. For example, least-significant bits to a full word or long, depending on the return type. +The instructions `exts` and `truncd` are provided to change +the precision of a floating point value. When the double +argument of `truncd` cannot be represented as a +single-precision floating point, it is truncated towards +zero. + Converting between signed integers and floating points is done using `ftosi` (float to signed integer) and `sitof` (signed integer to float). Note that the bit width of the @@ -661,7 +669,7 @@ point number can only be converted directly to a long integer. Because of <@ Subtyping >, there is no need to have an -instruction to lower the precision of a temporary. +instruction to lower the precision of an integer temporary. ~ Cast ~~~~~~ -- cgit 1.4.1