https://gcc.gnu.org/g:f0df55806933cda31af2abc3b666a6a2eec52875

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

    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 301da4001254..aa83fb751aa4 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