[source,sail]
--
//This is not SAIL, it's pseudo-code. The SAIL hasn't been written yet.

# target_address is temporary internal state, it doesn't represent a real register
# Mem is byte indexed

switch(XLEN) {
  32:  table_address[XLEN-1:0] = JVT.base + (index<<2);
  64:  table_address[XLEN-1:0] = JVT.base + (index<<3);
}

//fetch from the jump table
target_address[XLEN-1:0] = InstMemory[table_address][XLEN-1:0];

//jump to the target address
if (OPCODE=="cm.jalt") {
  jalr ra, target_address[XLEN-1:0]&~0x1;
} else {
  jr target_address[XLEN-1:0]&~0x1;
}

--


