Skip to content

Commit 8427d4a

Browse files
committed
Implement Bitcast::I32ToP and PToI32 in more backends.
1 parent 7fdf8ca commit 8427d4a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

crates/c/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,9 @@ impl Bindgen for FunctionBindgen<'_, '_> {
22142214
Bitcast::I64ToP64 | Bitcast::P64ToI64 => {
22152215
results.push(format!("{}", op));
22162216
}
2217-
Bitcast::None => results.push(op.to_string()),
2217+
Bitcast::I32ToP | Bitcast::PToI32 | Bitcast::None => {
2218+
results.push(op.to_string())
2219+
}
22182220
}
22192221
}
22202222
}

crates/teavm-java/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1343,7 +1343,7 @@ impl Bindgen for FunctionBindgen<'_, '_> {
13431343
Bitcast::P64ToI64 => format!("{op}"),
13441344
Bitcast::PToP64 => format!("(long) ({op})"),
13451345
Bitcast::P64ToP => format!("(int) ({op})"),
1346-
Bitcast::None => op.to_owned(),
1346+
Bitcast::I32ToP | Bitcast::PToI32 | Bitcast::None => op.to_owned(),
13471347
}))
13481348
}
13491349

0 commit comments

Comments
 (0)