]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Added counting to check for asm_construct_outputs
authorbadumbatish <tanghocle456@gmail.com>
Wed, 24 Jul 2024 05:17:12 +0000 (22:17 -0700)
committerCohenArthur <arthur.cohen@embecosm.com>
Mon, 2 Sep 2024 09:44:55 +0000 (09:44 +0000)
gcc/rust/ChangeLog:

* backend/rust-compile-asm.cc (CompileAsm::asm_construct_outputs):
Set up counting to check

gcc/rust/backend/rust-compile-asm.cc

index 301da4001254d420ff1a38b37a663233c884b4b1..aa83fb751aa4aad6b867ac410f7d4c4cb0b74141 100644 (file)
@@ -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;
 }