diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-05-27 13:10:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-27 13:10:34 +0200 |
| commit | 86f2fa35a2289e4af5b5859d9762c431840a4655 (patch) | |
| tree | 5813b5a4b544914ed1d2792ed2c4c57862c6b6b8 /compiler/rustc_codegen_ssa/src/traits | |
| parent | 6dddc888fcdb0849ebf1fe4241bffa9b2a2c0812 (diff) | |
| parent | 17bd43cb250ff3bf0c29d021e232969d9d1765fa (diff) | |
Rollup merge of #125148 - RalfJung:codegen-sh, r=scottmcm
codegen: tweak/extend shift comments r? `@scottmcm`
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/traits')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/traits/builder.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_ssa/src/traits/builder.rs b/compiler/rustc_codegen_ssa/src/traits/builder.rs index 9fd6eb8edab..2f0daefa46a 100644 --- a/compiler/rustc_codegen_ssa/src/traits/builder.rs +++ b/compiler/rustc_codegen_ssa/src/traits/builder.rs @@ -110,8 +110,16 @@ pub trait BuilderMethods<'a, 'tcx>: fn frem(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; fn frem_fast(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; fn frem_algebraic(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; + /// Generate a left-shift. Both operands must have the same size. The right operand must be + /// interpreted as unsigned and can be assumed to be less than the size of the left operand. fn shl(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; + /// Generate a logical right-shift. Both operands must have the same size. The right operand + /// must be interpreted as unsigned and can be assumed to be less than the size of the left + /// operand. fn lshr(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; + /// Generate an arithmetic right-shift. Both operands must have the same size. The right operand + /// must be interpreted as unsigned and can be assumed to be less than the size of the left + /// operand. fn ashr(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; fn unchecked_sadd(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; fn unchecked_uadd(&mut self, lhs: Self::Value, rhs: Self::Value) -> Self::Value; |
