How to ask gcc to reset an asm inline input value? %0
in the following example is not reset to 42
after the first loop. So when i = 1, %0
value is still 0
.
for (int i = 0; i < N; ++i)
asm("label: substract_immediate_value %0,%0,1;"
"compare_immediate_value %0,0;"
"branch_not_equal label"
: /* no outputs */
: /* input */ "r" (42));