3 ms·
"mov x5, x0" is the right way to copy from x0 to x5, so if that doesn't work for you then perhaps something is odd with whatever assembler you're using. Note t
by pm215 9y ago
"mov x5, x0" is the right way to copy from x0 to x5, so if that doesn't work for you then perhaps something is odd with whatever assembler you're using.
Note that under the hood "mov Xd, Xm" is a convenience alias for "orr Xd, XZR, Xm" -- the CPU itself will only see the logical-or, but the assembler and disassembler will understand the 'mov' syntax and should convert each way automatically. This is documented in the v8M ARM ARM in the "MOV (register)" instruction description. Perhaps whatever assembler you're using hasn't implemented that convenience syntax, but all the common ones (including the GNU assembler and LLVM assembler) should do, so it's surprising to encounter one that doesn't.