mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-12 22:31:25 -07:00
Clean up big int to LLVM integer code
This commit is contained in:
@@ -55,6 +55,8 @@ void big_int_mul_eq(BigInt *dst, BigInt const *x);
|
||||
void big_int_quo_eq(BigInt *dst, BigInt const *x);
|
||||
void big_int_rem_eq(BigInt *dst, BigInt const *x);
|
||||
|
||||
bool big_int_is_neg(BigInt const *x);
|
||||
|
||||
|
||||
void big_int_add_eq(BigInt *dst, BigInt const *x) {
|
||||
BigInt res = {};
|
||||
@@ -450,6 +452,13 @@ void big_int_not(BigInt *dst, BigInt const *x, i32 bit_count, bool is_signed) {
|
||||
big_int_dealloc(&v);
|
||||
}
|
||||
|
||||
bool big_int_is_neg(BigInt const *x) {
|
||||
if (x == nullptr) {
|
||||
return false;
|
||||
}
|
||||
return x->sign != MP_ZPOS;
|
||||
}
|
||||
|
||||
|
||||
char digit_to_char(u8 digit) {
|
||||
GB_ASSERT(digit < 16);
|
||||
|
||||
Reference in New Issue
Block a user