Specifies registers that may be altered by functions specified by #pragma mc_func.
Ordinarily, code generated for functions specified by #pragma mc_func may alter any or all volatile registers available on your system. You can use #pragma reg_killed_by to explicitly list a specific set of volatile registers to be altered by such functions. Registers not in this list will not be altered.
.-,------------------------------. V | >>-#--pragma--reg_killed_by--function----+----------------------------+-+->< '-register -+--------------+-' '- ---register-'
You can identify a range of registers by providing the symbolic names of both starting and ending registers, separated by a dash.
If no register is specified, no volatile registers will be killed by the named function.
int add_logical(int, int);
#pragma mc_func add_logical {"7c632014" "7c630194"}
/* addc r3 <- r3, r4 */
/* addze r3 <- r3, carry bit */
#pragma reg_killed_by add_logical gr3, xer
/* only gpr3 and the xer are altered by this function */
main() {
int i,j,k;
i = 4;
k = -4;
j = add_logical(i,k);
printf("\n\nresult = %d\n\n",j);
}