Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. @ Switch to FIQ mode and keep interrupts disabled (required to have access to SPSR register)
  2. @ NOTE: The code following this point cannot result in a change to the FIQ mode SP
  3.  
  4. MSR CPSR_c,#(ESAL_AR_ISR_CPSR_FIQ_MODE | ESAL_AR_ISR_CPSR_IRQ_BIT | ESAL_AR_ISR_CPSR_FIQ_BIT)
  5.  
  6. @ Get return address and SPSR from stack
  7.  
  8. LDR lr,[r0,#ESAL_AR_STK_MIN_PC_OFFSET]
  9. LDR r1,[r0,#ESAL_AR_STK_MIN_SPSR_OFFSET]
  10.  
  11. @ Update SPSR
  12.  
  13. MSR SPSR_cxsf, r1
  14.  
  15. @ Restore minimal registers
  16.  
  17. LDMIA r0,{r0-r3}
  18.  
  19. @ Return to point of interrupt
  20.  
  21. MOVS pc,lr
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement