Skip to content

Commit dad0fb2

Browse files
committed
fuzz: Remove comments about u128 ABI issues
These have since been resolved and is no longer a concern. This also means that indirection is no longer needed.
1 parent 4856685 commit dad0fb2

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

fuzz/ops.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,6 @@ using namespace llvm;
237237
#pragma clang diagnostic error "-Wextra"
238238
#pragma clang diagnostic error "-Wunknown-attributes"
239239
240-
// HACK(eddyb) allow code below to assume `uintN_t` maps to Rust `uN`.
241-
// FIXME(eddyb) make sure this doesn't run into `u128` ABI issues.
242240
using uint128_t = __uint128_t;
243241
244242
template<typename F>
@@ -374,7 +372,7 @@ struct __attribute__((packed)) {name} {{
374372
}}
375373
}};
376374
extern "C" {{
377-
void {exported_symbol}({name} *out, const FuzzOp<{name}> &op) {{
375+
void {exported_symbol}({name} *out, FuzzOp<{name}> op) {{
378376
*out = op.eval();
379377
}}
380378
}}"#

fuzz/src/main.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,11 @@ macro_rules! float_reprs {
168168

169169
fn cxx_apf_eval_fuzz_op(op: FuzzOp<Self>) -> Self {
170170
extern "C" {
171-
// HACK(eddyb) the warning is about `u128` ABI issues,
172-
// which is also why indirection is used.
173-
#[allow(improper_ctypes)]
174-
fn $cxx_apf_eval_fuzz_op(out: &mut MaybeUninit<$name>, op: &FuzzOp<$name>);
171+
fn $cxx_apf_eval_fuzz_op(out: &mut MaybeUninit<$name>, op: FuzzOp<$name>);
175172
}
176173
unsafe {
177174
let mut out = MaybeUninit::uninit();
178-
$cxx_apf_eval_fuzz_op(&mut out, &op);
175+
$cxx_apf_eval_fuzz_op(&mut out, op);
179176
out.assume_init()
180177
}
181178
}

0 commit comments

Comments
 (0)