Okay?
Yes, just make it a little bit more robust. The i386 does this:
/* This will hopefully provoke a warning. */
return NUM_REGS + NUM_PSEUDO_REGS;
when it doesn't know what to do with a register.
Rather than hoping that returning an out of range register number will
provoke a warning (at some indeterminate point in the future),
wouldn't it be better to call complaint() directly? Or, alternatively,
define a return value (e.g. -1) which callers of *_REG_TO_REGNUM would
then check so that an appropriate complaint could be registered?