The dynamics of the Earth's interior is largely controlled by mantle convection, which transports radiogenic and primordial heat towards the surface. Slow stirring of the deep mantle is achieved in the solid state through high-temperature creep of rocks, which are dominated by the mineral MgSiO3 perovskite. Transformation of MgSiO3 to a 'post-perovskite' phase may explain the peculiarities of the lowermost mantle, such as the observed seismic anisotropy, but the mechanical properties of these mineralogical phases are largely unknown. Plastic flow of solids involves the motion of a large number of crystal defects, named dislocations. A quantitative description of flow in the Earth's mantle requires information about dislocations in high-pressure minerals and their behaviour under stress. This property is currently out of reach of direct atomistic simulations using either empirical interatomic potentials or ab initio calculations. Here we report an alternative to direct atomistic simulations based on the framework of the Peierls-Nabarro model. Dislocation core models are proposed for MgSiO3 perovskite (at 100 GPa) and post-perovskite (at 120 GPa). We show that in perovskite, plastic deformation is strongly influenced by the orthorhombic distortions of the unit cell. In silicate post-perovskite, large dislocations are relaxed through core dissociation, with implications for the mechanical properties and seismic anisotropy of the lowermost mantle.