Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
clang でインライン アセンブリを実行し (基本的には、さまざまな参照を使用して推測します)、 の内容を が%rdi指すアドレスに移動しようとしています%rdx。ただし、私の構文はどれも機能しません。これは次のとおりです。
%rdi
%rdx
mov %rdi, ptr %rdx
与えます:
error: expected relocatable expression
どうしたの?これを行うためのclangのインラインアセンブリの構文は何ですか? ありがとう。
clangのアセンブリ構文が正確に何であるかはわかりませんが、gcc / gasで使用されるAT&T構文は次のようになります。
movq %rdi, (%rdx)
Intel/Microsoftアセンブリ構文は次のようになります。
mov qword ptr [rdx], rdi