Structural performance of masonry walls under compression and flexure