There's no way to access memory without using load operations. If you want to use word-sized load operations (lw
) on a string, you'll be limited by the requirement to use aligned addresses for these instructions (on MIPS — other processors will do unaligned accesses with a minimal performance penalty).
Dealing with the alignment requirements is not so hard if we can rely on all strings starting on aligned boundaries and also always being multiples of 4 bytes long. Removing the length restriction (multiple of 4) adds complexity, as does removing the initial alignment restriction (multiple of 4). For a general purpose solution, both these alignment issues would need to be solved, which means differentiating between a multiplicity of cases in order to use word-sized operations.
If you did have 4 characters in a single register, and you want to adjust (i.e. uppercase) each of its distinct 4 bytes, you'll pretty much have to look at them individually. There's really no way to instantly compute the value to add that will uppercase each byte.
To be clear, for any given 4 byte value of 4 characters, there is exactly one single 32-bit adjustment value that could be added in order to upper case each of the 4 bytes all at once — but there's 16 possible such values, and no easy way to figure out which one of 16 is the right one for any given 4 byte value. So, you'd have to extract each byte and consider it individually, which would be almost as efficient as using lb
/sb
directly.