diff options
author | badumbatish <tanghocle456@gmail.com> | 2024-07-18 07:34:43 -0700 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2024-09-02 09:44:55 +0000 |
commit | d645c559125ed75fd19af749c62c51ecc032370a (patch) | |
tree | b9b9ea5c5b2f1c0a99894abc231be8532dd2a99f /gcc/rust/backend/rust-compile-asm.h | |
parent | 63bccfc7f19f95b198d1436630118c8f9473ba1b (diff) | |
download | gcc-d645c559125ed75fd19af749c62c51ecc032370a.zip gcc-d645c559125ed75fd19af749c62c51ecc032370a.tar.gz gcc-d645c559125ed75fd19af749c62c51ecc032370a.tar.bz2 |
Minor fix to asm codegen pr
gcc/rust/ChangeLog:
* backend/rust-compile-asm.cc (CompileAsm::asm_build_expr):
Use expr's is_simple_asm and is_inline_asm
(CompileAsm::asm_is_simple): removed
(CompileAsm::asm_is_inline): removed
* backend/rust-compile-asm.h: Add docs to ASM_TREE_ARRAY_LENGTH
* hir/tree/rust-hir-expr.h: Add is_simple_asm, is_inline_asm
and remove #include tree
Diffstat (limited to 'gcc/rust/backend/rust-compile-asm.h')
-rw-r--r-- | gcc/rust/backend/rust-compile-asm.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/rust/backend/rust-compile-asm.h b/gcc/rust/backend/rust-compile-asm.h index 15ffc70..8307d89 100644 --- a/gcc/rust/backend/rust-compile-asm.h +++ b/gcc/rust/backend/rust-compile-asm.h @@ -40,6 +40,14 @@ public: // static tree Compile (HIR::Expr *expr, Context *ctx); // RELEVANT MEMBER FUNCTIONS + + // The limit is 5 because it stands for the 5 things that the C version of + // build_asm_expr accepts: string, output, input, clobber and label. + // The function signature is + // + // tree + // build_asm_expr (location_t loc, tree string, tree outputs, tree inputs, + // tree clobbers, tree labels, bool simple, bool is_inline) static const int ASM_TREE_ARRAY_LENGTH = 5; static tree asm_build_expr (HIR::InlineAsm &); static tree asm_build_stmt (location_t, @@ -50,8 +58,6 @@ public: static tree asm_construct_inputs (HIR::InlineAsm &); static tree asm_construct_clobber_tree (HIR::InlineAsm &); static tree asm_construct_label_tree (HIR::InlineAsm &); - static bool asm_is_simple (HIR::InlineAsm &); - static bool asm_is_inline (HIR::InlineAsm &); CompileAsm (Context *ctx); |