The equilibrium geometries and electronic structures of hydrogen-passivated acceptors (B, Al, and Ga) and donors (P and As) in crystalline silicon are calculated in two clusters: XHSi7H18 and XHSi34H36, where X is the acceptor or donor. The results, obtained using the method of partial retention of diatomic differential overlap (PRDDO) and ab initio Hartree-Fock with various basis sets, show that all these complexes are metastable. In the case of passivated acceptors, the stable configuration corresponds to H close to the bond-centered site and the metastable one to H at the antibonding site of one of the Si atoms nearest to the acceptor. The configuration where H is antibonding to the acceptor is a saddle point of the energy. The effects of 111 uniaxial stress on the position of the H passivator are qualitatively analyzed. In the case of donors, the lowest-energy site for H is at the antibonding site to one of the Si atoms nearest to the donor. The configurations where H is at the bond-centered site or is antibonding to the donor are nearly energetically equivalent. The similarities and differences between the various complexes are discussed.