diff --git a/rust/binaryninja-derive/src/lib.rs b/rust/binaryninja-derive/src/lib.rs index 0024d11a7..551212ac2 100644 --- a/rust/binaryninja-derive/src/lib.rs +++ b/rust/binaryninja-derive/src/lib.rs @@ -124,11 +124,11 @@ impl Repr { let content; parenthesized!(content in meta.input); align = Some(content.parse::()?); - } else if ident_in_list(ident, ["u8", "u16", "u32", "u64"]) { + } else if ident_in_list(ident, ["u8", "u16", "u32", "u64", "u128"]) { primitive = Some((meta.path.clone(), false)); - } else if ident_in_list(ident, ["i8", "i16", "i32", "i64"]) { + } else if ident_in_list(ident, ["i8", "i16", "i32", "i64", "i128"]) { primitive = Some((meta.path.clone(), true)); - } else if ident_in_list(ident, ["usize", "isize", "u128", "i128"]) { + } else if ident_in_list(ident, ["usize", "isize"]) { return Err(ident .span() .error(format!("`repr({ident})` types are not supported")) diff --git a/rust/src/types.rs b/rust/src/types.rs index 755d857ec..ac0020dad 100644 --- a/rust/src/types.rs +++ b/rust/src/types.rs @@ -716,10 +716,12 @@ abstract_type! { u16 => Type::int(2, false), u32 => Type::int(4, false), u64 => Type::int(8, false), + u128 => Type::int(16, false), i8 => Type::int(1, true), i16 => Type::int(2, true), i32 => Type::int(4, true), i64 => Type::int(8, true), + i128 => Type::int(16, true), f32 => Type::float(4), f64 => Type::float(8) }