All instances of type Register exhibit UB in the form of wild pointer (including null pointer) dereferences. This isn't very hard to fix: we should make Registers pointers to something rather than aliases of small integers.
JDK-8280497riscv: Undefined Behaviour in class Assembler
JDK-8276453Undefined behavior in C1 LIR_OprDesc causes SEGV in fastdebug build
JDK-8255840AArch64: undefined behaviour in HotSpot cpu-specific code