diff options
| author | Michal Sudwoj <msudwoj@student.ethz.ch> | 2020-05-23 03:48:40 +0200 |
|---|---|---|
| committer | Michal Sudwoj <msudwoj@student.ethz.ch> | 2020-05-24 08:20:40 +0200 |
| commit | 70cd375c57bc35db9c9a3eff37abdb900e45f910 (patch) | |
| tree | 081f4e933b66acb009cf5974afb88779d4f260b7 /src | |
| parent | ed559b3770d11f1047f0f4df3036beccb1b6dc47 (diff) | |
| download | rust-70cd375c57bc35db9c9a3eff37abdb900e45f910.tar.gz rust-70cd375c57bc35db9c9a3eff37abdb900e45f910.zip | |
Corrected statement about zero-extension in docs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/unstable-book/src/library-features/asm.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/doc/unstable-book/src/library-features/asm.md b/src/doc/unstable-book/src/library-features/asm.md index c34a2931bc0..50121b2c0fc 100644 --- a/src/doc/unstable-book/src/library-features/asm.md +++ b/src/doc/unstable-book/src/library-features/asm.md @@ -510,7 +510,7 @@ Each register class has constraints on which value types they can be used with. > **Note**: For the purposes of the above table pointers, function pointers and `isize`/`usize` are treated as the equivalent integer type (`i16`/`i32`/`i64` depending on the target). -If a value is of a smaller size than the register it is allocated in then the upper bits of that register will have an undefined value for inputs and will be ignored for outputs. The only exceptions are the `freg` register class on RISC-V where `f32` values are NaN-boxed in a `f64` as required by the RISC-V architecture, and the register classes on NVPTX where values are zero-extended. +If a value is of a smaller size than the register it is allocated in then the upper bits of that register will have an undefined value for inputs and will be ignored for outputs. The only exception is the `freg` register class on RISC-V where `f32` values are NaN-boxed in a `f64` as required by the RISC-V architecture. When separate input and output expressions are specified for an `inout` operand, both expressions must have the same type. The only exception is if both operands are pointers or integers, in which case they are only required to have the same size. This restriction exists because the register allocators in LLVM and GCC sometimes cannot handle tied operands with different types. |
