https://gcc.gnu.org/g:8a33d0f222d5f6e234f5c9c5ae5a1f5e7f0cd084

commit r15-8346-g8a33d0f222d5f6e234f5c9c5ae5a1f5e7f0cd084
Author: badumbatish <tanghocle...@gmail.com>
Date:   Tue Jul 23 22:17:12 2024 -0700

    gccrs: Added counting to check for asm_construct_outputs
    
    gcc/rust/ChangeLog:
    
            * backend/rust-compile-asm.cc (CompileAsm::asm_construct_outputs):
            Set up counting to check

Diff:
---
 gcc/rust/backend/rust-compile-asm.cc | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/gcc/rust/backend/rust-compile-asm.cc 
b/gcc/rust/backend/rust-compile-asm.cc
index 0dd4f6720085..9305a9088bb5 100644
--- a/gcc/rust/backend/rust-compile-asm.cc
+++ b/gcc/rust/backend/rust-compile-asm.cc
@@ -96,6 +96,13 @@ tree
 CompileAsm::asm_construct_outputs (HIR::InlineAsm &expr)
 {
   // TODO: Do i need to do this?
+  int count = 0;
+
+  for (auto &output : expr.get_operands ())
+    {
+      if (output.register_type == AST::InlineAsmOperand::RegisterType::Out)
+       count++;
+    }
   return NULL_TREE;
 }

Reply via email to