]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gccrs: Added counting to check for asm_construct_outputs
authorbadumbatish <tanghocle456@gmail.com>
Wed, 24 Jul 2024 05:17:12 +0000 (22:17 -0700)
committerArthur Cohen <arthur.cohen@embecosm.com>
Wed, 19 Mar 2025 14:32:06 +0000 (15:32 +0100)
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 0dd4f6720085246502d4cd676720a134c3dcb947..9305a9088bb51992f1ee56c2f4da9fad8f69b2af 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;
 }