ARC: [arcompact] entry.S: Elide extra check/branch in exception ret path
authorVineet Gupta <vgupta@synopsys.com>
Thu, 8 Oct 2015 12:22:27 +0000 (17:52 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Sat, 17 Oct 2015 12:18:23 +0000 (17:48 +0530)
commit9fabcc636bf57dcb9c6fc5b1f34861c548944fd4
treea3924e140769864304736e3f8354e62761bf693c
parent5f888087455c5199195c2ba17b91ac7285a33921
ARC: [arcompact] entry.S: Elide extra check/branch in exception ret path

This is done by improving the laddering logic !

Before:

   if Exception
      goto excep_or_pure_k_ret

   if !Interrupt(L2)
      goto l1_chk
   else
      INTERRUPT_EPILOGUE 2

 l1_chk:
   if !Interrupt(L1)  (i.e. pure kernel mode)
      goto excep_or_pure_k_ret
   else
      INTERRUPT_EPILOGUE 1

 excep_or_pure_k_ret:
   EXCEPTION_EPILOGUE

Now:

   if !Interrupt(L1 or L2) (i.e. exception or pure kernel mode)
      goto excep_or_pure_k_ret

  ; guaranteed to be an interrupt
   if !Interrupt(L2)
      goto l1_ret
   else
      INTERRUPT_EPILOGUE 2

 ; by virtue of above, no need to chk for L1 active
 l1_ret:
    INTERRUPT_EPILOGUE 1

 excep_or_pure_k_ret:
    EXCEPTION_EPILOGUE

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/kernel/entry-compact.S
This page took 0.026332 seconds and 5 git commands to generate.