1 # Blackfin testcase for returning to the right place while bouncing between
2 # multiple CEC levels (like in a Linux system call)
4 # sim: --environment operating
7 .include "testutils.inc"
9 # This test keeps P5 as the base of the EVT table
11 .macro set_evt lvl:req, sym:req
13 [P5 + 4 * \lvl\()] = R1;
18 # First mark all EVTs as fails (they shouldn't be activated)
23 LSETUP (1f, 1f) LC0 = P2;
26 # The OS exception handler
28 # The OS system call handler
31 # Lower ourselves to userspace
33 loadsym R2, _next_user;
45 # RETX should be pointing to the right place
50 # Lower ourselves to the system call handler
55 # RETI should be pointing to the right place
60 # Return to userspace now