gcd_pf_mul: get rid of duplicate code.