Skip to content

Commit 88921ac

Browse files
Explicitly cast bits instead of allowing C++ to automatically cast the
same (during typecasting)
1 parent 717a3ad commit 88921ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/intrinsic-test/src/x86/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ impl IntrinsicTypeDefinition for X86IntrinsicType {
203203
let cast_type = self.c_promotion();
204204
let lane_fn = self.get_lane_function();
205205
if cast_type.len() > 2 {
206-
format!("({cast_type})({lane_fn}(__return_value, {idx}))")
206+
format!("cast<{cast_type}>({lane_fn}(__return_value, {idx}))")
207207
} else {
208208
format!("{lane_fn}(__return_value, {idx})")
209209
}
@@ -227,7 +227,7 @@ impl IntrinsicTypeDefinition for X86IntrinsicType {
227227
),
228228
_ => self.c_scalar_type(),
229229
},
230-
promote = self.c_promotion(),
230+
promote = self.generate_final_type_cast(),
231231
)
232232
};
233233

0 commit comments

Comments
 (0)