h8300, nds32, openrisc: simplify detection of memory extents