A novel model based on the Peierls framework of dislocations is developed. The new theory can deal with a dislocation spreading at more than one slip planes. As an example, we study dislocation cross-slip and constriction process of two fcc metals, Al and Ag. The energetic parameters entering the model are determined from ab initio calculations. We find that the screw dislocation in Al can cross-slip spontaneously in contrast with that in Ag, which splits into partials and cannot cross-slip without first being constricted. The dislocation response to an external stress is examined in detail. We determine dislocation constriction energy and critical stress for cross-slip, and from the latter, we estimate the cross-slip energy barrier for the straight screw dislocations.