/* Get register value according to the system context, and register index. */
UINT64 GetRegisterValue(IN EFI_SYSTEM_CONTEXT SystemContext, IN UINT8 Index)
/* Get register value according to the system context, and register index. */
UINT64 GetRegisterValue(IN EFI_SYSTEM_CONTEXT SystemContext, IN UINT8 Index)
{
  switch (Index) {
    case 0:
      return SystemContext.SystemContextEbc->R0;
    case 1:
      return SystemContext.SystemContextEbc->R1;
    case 2:
      return SystemContext.SystemContextEbc->R2;
    case 3:
      return SystemContext.SystemContextEbc->R3;
    case 4:
      return SystemContext.SystemContextEbc->R4;
    case 5:
      return SystemContext.SystemContextEbc->R5;
    case 6:
      return SystemContext.SystemContextEbc->R6;
    case 7:
      return SystemContext.SystemContextEbc->R7;
    default:
      ASSERT (FALSE);
      break;
  }
  return 0;
}