1 /* This file is lisenced under LGPL
2 * Copyright (C) 2002-2003, George Thanos <george.thanos@gdt.gr>
3 * Yannis Mitsos <yannis.mitsos@gdt.gr>
11 #define __NR_e1newSP 224
12 static inline _syscall1(int, e1newSP, unsigned long, SavedSP )
14 unsigned long jmpbuf_ptr;
16 void longjmp(jmp_buf state, int value )
19 state->__jmpbuf->ReturnValue = 1;
21 state->__jmpbuf->ReturnValue = value;
23 jmpbuf_ptr = (unsigned long)state;
24 e1newSP(state->__jmpbuf->SavedSP);
26 #define _state_ ((struct __jmp_buf_tag*)jmpbuf_ptr)
27 asm volatile("mov L0, %0\n\t"
34 :"l"(_state_->__jmpbuf->ReturnValue),
35 "l"(_state_->__jmpbuf->SavedPC),
36 "l"(_state_->__jmpbuf->SavedSR),
37 "l"(_state_->__jmpbuf->G3),
38 "l"(_state_->__jmpbuf->G4)
39 :"%G3", "%G4", "%L0", "%L1" );
43 libc_hidden_proto(sigprocmask)
45 void siglongjmp(sigjmp_buf state, int value )
47 if( state->__mask_was_saved )
48 sigprocmask(SIG_SETMASK, &state->__saved_mask, NULL);
51 state->__jmpbuf->ReturnValue = 1;
53 state->__jmpbuf->ReturnValue = value;
55 jmpbuf_ptr = (unsigned long)state;
56 e1newSP(state->__jmpbuf->SavedSP);
59 #define _state_ ((struct __jmp_buf_tag*)jmpbuf_ptr)
60 asm volatile("mov L0, %0\n\t"
67 :"l"(_state_->__jmpbuf->ReturnValue),
68 "l"(_state_->__jmpbuf->SavedPC),
69 "l"(_state_->__jmpbuf->SavedSR),
70 "l"(_state_->__jmpbuf->G3),
71 "l"(_state_->__jmpbuf->G4)
72 :"%G3", "%G4", "%L0", "%L1" );