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