Skip to content
Commit 3093223a authored by cyrozap's avatar cyrozap
Browse files

Add function to set a register to an arbitrary 32-bit value

Unfortunately, while "sethi" can be approximated with a 16-bit imediate
load and a shift by immediate, there's no way to then OR the destination
register with a 16-bit immediate. This means if we want to set a
register without using any temporary registers, we need to load the
16-bit immediate, shift the destination left by 4, add the next nybble
to the destination, and then repeat that shift-by-4-and-add-nybble
sequence another three times to finish the 32-bit load.
parent 4118340c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment