Returns an array of registers associated with
a given CPU arch.

@param cpu the CPU arch.
@returns {Array} an array of registers.
function get_registers(cpu) {
  cpu = cpu.toLowerCase();

  if (cpu.startsWith('arm')) {
    return REGISTERS.ARM;
  }

  if (~[ 'x86', 'i386', 'i486', 'i686' ].indexOf(cpu)) {
    return REGISTERS.X86;
  }

  if (cpu === 'x86_64') {
    return REGISTERS.X86_64;
  }

  return [];
}