Support different sizes for load from mem.