History

Fix minor typos in IL doc

Simon Heath committed 4 years ago

Commit 790aedb1 parent cd778b41 file · +11 −11Browse files

Unified · Split

doc/il.txt+11−11
@@ -744,11 +744,11 @@ returns 1 when the first argument is smaller than the second one. · 743 unmodified lines
744~ Conversions744~ Conversions
745~~~~~~~~~~~~~745~~~~~~~~~~~~~
746 746
747Conversion operations allow to change the representation of747Conversion operations change the representation of a value,
748a value, possibly modifying it if the target type cannot hold748possibly modifying it if the target type cannot hold the value
749the value of the source type. Conversions can extend the749of the source type. Conversions can extend the precision of a
750precision of a temporary (e.g., from signed 8-bit to 32-bit),750temporary (e.g., from signed 8-bit to 32-bit), or convert a
751or convert a floating point into an integer and vice versa.751floating point into an integer and vice versa.
752 752
753 * `extsw`, `extuw` -- `l(w)`753 * `extsw`, `extuw` -- `l(w)`
754 * `extsh`, `extuh` -- `I(ww)`754 * `extsh`, `extuh` -- `I(ww)`
@@ -766,17 +766,17 @@ or convert a floating point into an integer and vice versa. · 11 unmodified lines
766 766
767Extending the precision of a temporary is done using the767Extending the precision of a temporary is done using the
768`ext` family of instructions. Because QBE types do not768`ext` family of instructions. Because QBE types do not
769precise the signedness (like in LLVM), extension instructions769specify the signedness (like in LLVM), extension instructions
770exist to sign-extend and zero-extend a value. For example,770exist to sign-extend and zero-extend a value. For example,
771`extsb` takes a word argument and sign-extends the 8771`extsb` takes a word argument and sign-extends the 8
772least-significant bits to a full word or long, depending on772least-significant bits to a full word or long, depending on
773the return type.773the return type.
774 774
775The instructions `exts` and `truncd` are provided to change775The instructions `exts` (extend single) and `truncd` (truncate
776the precision of a floating point value. When the double776double) are provided to change the precision of a floating
777argument of `truncd` cannot be represented as a777point value. When the double argument of `truncd` cannot
778single-precision floating point, it is truncated towards778be represented as a single-precision floating point, it is
779zero.779truncated towards zero.
780 780
781Converting between signed integers and floating points is done781Converting between signed integers and floating points is done
782using `stosi` (single to signed integer), `stoui` (single to782using `stosi` (single to signed integer), `stoui` (single to

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t