File tree Expand file tree Collapse file tree 4 files changed +0
-11
lines changed
cranelift/assembler-x64/src Expand file tree Collapse file tree 4 files changed +0
-11
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,6 @@ fn pretty_print_hexadecimal(hex: &[u8]) -> String {
84
84
/// See `replace_signed_immediates`.
85
85
macro_rules! hex_print_signed_imm {
86
86
( $hex: expr, $from: ty => $to: ty) => { {
87
- #[ allow( clippy:: cast_possible_wrap, reason = "bit conversion is intended here" ) ]
88
87
let imm = <$from>:: from_str_radix( $hex, 16 ) . unwrap( ) as $to;
89
88
let mut simm = String :: new( ) ;
90
89
if imm < 0 {
Original file line number Diff line number Diff line change 1
1
//! Immediate operands to instructions.
2
2
3
- #![ allow( clippy:: module_name_repetitions, reason = "'imm::Imm*' is fine" ) ]
4
-
5
3
use crate :: api:: CodeSink ;
6
4
use std:: fmt;
7
5
@@ -67,7 +65,6 @@ impl Simm8 {
67
65
}
68
66
69
67
pub fn encode ( & self , sink : & mut impl CodeSink ) {
70
- #[ allow( clippy:: cast_sign_loss, reason = "bit conversion is intended here" ) ]
71
68
sink. put1 ( self . 0 as u8 ) ;
72
69
}
73
70
@@ -127,7 +124,6 @@ impl Simm16 {
127
124
}
128
125
129
126
pub fn encode ( & self , sink : & mut impl CodeSink ) {
130
- #[ allow( clippy:: cast_sign_loss, reason = "bit conversion is intended here" ) ]
131
127
sink. put2 ( self . 0 as u16 ) ;
132
128
}
133
129
@@ -195,7 +191,6 @@ impl Simm32 {
195
191
}
196
192
197
193
pub fn encode ( & self , sink : & mut impl CodeSink ) {
198
- #[ allow( clippy:: cast_sign_loss, reason = "bit conversion is intended here" ) ]
199
194
sink. put4 ( self . 0 as u32 ) ;
200
195
}
201
196
Original file line number Diff line number Diff line change @@ -384,7 +384,6 @@ pub fn emit_modrm_sib_disp<R: AsReg>(
384
384
// to the end of the u32 field. So, to compensate for
385
385
// this, we emit a negative extra offset in the u32 field
386
386
// initially, and the relocation will add to it.
387
- #[ allow( clippy:: cast_sign_loss, reason = "bit conversion is intended here" ) ]
388
387
sink. put4 ( -( i32:: from ( bytes_at_end) ) as u32 ) ;
389
388
}
390
389
}
Original file line number Diff line number Diff line change 1
1
//! Encoding logic for REX instructions.
2
2
3
- // #![allow(clippy::bool_to_int_with_if)]
4
-
5
3
use crate :: api:: CodeSink ;
6
4
7
5
pub ( crate ) fn low8_will_sign_extend_to_32 ( xs : i32 ) -> bool {
@@ -151,7 +149,6 @@ impl Imm {
151
149
if val % i32:: from ( scaling) == 0 {
152
150
let scaled = val / i32:: from ( scaling) ;
153
151
if low8_will_sign_extend_to_32 ( scaled) {
154
- #[ allow( clippy:: cast_possible_truncation, reason = "pre-existing code" ) ]
155
152
return Imm :: Imm8 ( scaled as i8 ) ;
156
153
}
157
154
}
@@ -183,7 +180,6 @@ impl Imm {
183
180
}
184
181
185
182
/// Emit the truncated immediate into the code sink.
186
- #[ allow( clippy:: cast_sign_loss, reason = "bit conversion is intended here" ) ]
187
183
pub fn emit ( self , sink : & mut impl CodeSink ) {
188
184
match self {
189
185
Imm :: None => { }
You can’t perform that action at this time.
0 commit comments