Study of compressed sulfur based on reliable first-principles calculations