I have a function with in-line assembly language. I preceed this function with:
#pragma ASM $REGUSE _population_count( A, B, R4, R5, R6, R7, DPH, DPL ) #pragma ENDASM
This directive tells the toolchain the registers that are modified. So you need not to state the registers that are just read.