more mips16 puzzles

1. mips16 instructions (except for move) have a different encoding from normal mips32 instructions for two registers.

however in the move register 2 operand instruction, one register takes the mips16 encoding and the other the mips32 encoding (so that gives mips16 access to the full register set).

how does one deal with multiple encodings of the same register? can you change it on an instruction basis? in the case of the move instruction, each field has a different encoding.

2. the extra registers beyond the 8 basic ones in mips16 could be used to spill registers (as opposed to using the stack). can llvm do this?

tia.

reed

1. mips16 instructions (except for move) have a different encoding from
normal mips32 instructions for two registers.

however in the move register 2 operand instruction, one register takes
the mips16 encoding and the other the mips32 encoding (so that gives
mips16 access to the full register set).

it just occurred to me that since we are only talking about two cases of the move instruction, for registers s0 and s1, i could just invent an instruction variant of move which has s0 or s1 implicit
and hardcode the bit pattern for those registers.

moves0 ..
moves1