diff options
author | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-11-17 15:59:34 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2022-12-06 16:07:12 +0100 |
commit | 277497f77cdbd85e4aad4a52bce3ea442a44cdc0 (patch) | |
tree | 27d437c587ff26572c91953bcdc6cf6a54d9d798 /gcc | |
parent | 9666f2b169b5192b5c827d605cc80e6987e1aac5 (diff) | |
download | gcc-277497f77cdbd85e4aad4a52bce3ea442a44cdc0.zip gcc-277497f77cdbd85e4aad4a52bce3ea442a44cdc0.tar.gz gcc-277497f77cdbd85e4aad4a52bce3ea442a44cdc0.tar.bz2 |
backend: Replace double_int_to_tree -> wide_int_to_tree
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/backend/rust-compile-expr.cc | 9 | ||||
-rw-r--r-- | gcc/rust/rust-gcc.cc | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc index e50df63..22f24db 100644 --- a/gcc/rust/backend/rust-compile-expr.cc +++ b/gcc/rust/backend/rust-compile-expr.cc @@ -2135,7 +2135,14 @@ CompileExpr::compile_integer_literal (const HIR::LiteralExpr &expr, tyty->get_name ().c_str ()); return error_mark_node; } - return double_int_to_tree (type, mpz_get_double_int (type, ival, true)); + + tree result = wide_int_to_tree (type, wi::from_mpz (type, ival, true)); + + mpz_clear (type_min); + mpz_clear (type_max); + mpz_clear (ival); + + return result; } tree diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index e5dc6da..319c581 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -1028,7 +1028,7 @@ Gcc_backend::integer_constant_expression (tree t, mpz_t val) if (t == error_mark_node) return error_mark_node; - tree ret = double_int_to_tree (t, mpz_get_double_int (t, val, true)); + tree ret = wide_int_to_tree (t, wi::from_mpz (t, val, true)); return ret; } |