aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/expand
diff options
context:
space:
mode:
authorbadumbatish <tanghocle456@gmail.com>2024-09-04 23:59:36 -0700
committerArthur Cohen <arthur.cohen@embecosm.com>2025-03-19 15:32:17 +0100
commit81397a9f53440ed6fb816480784fd9b14a3fca57 (patch)
tree76a41d0ebf02be308f7262f3fd3c260fcd783a1f /gcc/rust/expand
parent9753ae307b89cc1e6934ecc16736abe2158a7333 (diff)
downloadgcc-81397a9f53440ed6fb816480784fd9b14a3fca57.zip
gcc-81397a9f53440ed6fb816480784fd9b14a3fca57.tar.gz
gcc-81397a9f53440ed6fb816480784fd9b14a3fca57.tar.bz2
gccrs: Provide input operand for gccrs
gcc/rust/ChangeLog: * backend/rust-compile-asm.cc (CompileAsm::asm_construct_inputs): Provide input operand for gccrs * expand/rust-macro-builtins-asm.cc (parse_reg_operand_in): Move expr to In (expand_inline_asm_strings): Add comments to debug strings gcc/testsuite/ChangeLog: * rust/compile/inline_asm_parse_operand.rs: Remove inout, functionality not supported. Remove redundant {} * rust/execute/torture/inline_asm_mov_x_5_ARM.rs: Add operand in * rust/execute/torture/inline_asm_mov_x_5_x86_64.rs: Likewise
Diffstat (limited to 'gcc/rust/expand')
-rw-r--r--gcc/rust/expand/rust-macro-builtins-asm.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/rust/expand/rust-macro-builtins-asm.cc b/gcc/rust/expand/rust-macro-builtins-asm.cc
index 1017d9f..e970f28 100644
--- a/gcc/rust/expand/rust-macro-builtins-asm.cc
+++ b/gcc/rust/expand/rust-macro-builtins-asm.cc
@@ -330,8 +330,8 @@ parse_reg_operand_in (InlineAsmContext inline_asm_ctx)
// TODO: When we've succesfully parse an expr, remember to clone_expr()
// instead of nullptr
- // struct AST::InlineAsmOperand::In in (reg, nullptr);
- // inline_asm_ctx.inline_asm.operands.push_back (in);
+ struct AST::InlineAsmOperand::In in (reg, std::move (expr));
+ inline_asm_ctx.inline_asm.operands.push_back (in);
return inline_asm_ctx;
}
return tl::unexpected<InlineAsmParseError> (NONCOMMITED);
@@ -792,8 +792,9 @@ expand_inline_asm_strings (InlineAsmContext inline_asm_ctx)
* trait});*/
transformed_template_str += "%" + std::to_string (idx);
- /*std::cout << "argument implicitly is: " << idx <<
- * std::endl;*/
+ // std::cout << "argument implicitly is: " << idx <<
+ // std::endl; std::cout << "transformed template str is:"
+ // << transformed_template_str << std::endl;
/*std::cout << "trait: " << trait.to_string () <<
* std::endl;*/
/*std::cout << "arg: " << arg.to_string () << std::endl;*/