If I pass two arguments to a function as follows:
loop:
mov my_array(,%r8d,4), %edi
mov $2, %esi
call some_function
...
Do I need to 're-add' the value 2 to %edi every time I call the function if it's static? In other words, can I assume that %esi will not change in a function, or do I need to re-set it before each time I call that function? What's the preferred way to do this in a System V ABI?