How to relace byte of 32bit variable in inline assembly?
I want to replace the highest byte of 32bit value:
__asm__ __volatile__ (
" ldi %D0, %1" "\n\t"
: "=d" ((uint32_t)addr)
: "M" (op_code)
);
and after that inline assembly addr variable gets cluttered - compiler use
registers allocated for addr as temporary registers for other operation
and i lose original addr value. Any idea whats wrong with this code?
No comments:
Post a Comment