1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/cpu/native/tramp.S

56 lines
907 B
ArmAsm
Raw Normal View History

/*
* Copyright (C) 2014 Ludwig Ortmann
*
* This file is subject to the terms and conditions of the GNU Lesser General
* Public License. See the file LICENSE in the top level directory for more
* details.
*/
.text
2013-05-15 17:45:43 +02:00
#ifdef __MACH__
.globl __native_sig_leave_tramp
__native_sig_leave_tramp:
pushl __native_saved_eip
pushfl
pushal
2013-05-15 17:45:43 +02:00
2013-10-16 15:33:04 +02:00
pushl __native_isr_ctx
pushl __native_cur_ctx
2013-05-15 17:45:43 +02:00
call _swapcontext
2013-10-16 15:33:04 +02:00
addl $8, %esp
2013-05-15 17:45:43 +02:00
2014-01-21 12:22:55 +01:00
call _eINT
2013-10-16 15:33:04 +02:00
movl $0x0, __native_in_isr
popal
popfl
2013-05-15 17:45:43 +02:00
ret
2013-05-15 17:45:43 +02:00
#else
.extern $_native_saved_eip
.extern $_native_isr_ctx
.extern $_native_cur_ctx
.extern $_native_in_isr
.globl _native_sig_leave_tramp
_native_sig_leave_tramp:
pushl _native_saved_eip
pushfl
pushal
2013-10-16 15:33:04 +02:00
pushl _native_isr_ctx
pushl _native_cur_ctx
call swapcontext
2013-10-16 15:33:04 +02:00
addl $8, %esp
call eINT
2013-10-16 15:33:04 +02:00
movl $0x0, _native_in_isr
popal
popfl
ret
2013-05-15 17:45:43 +02:00
#endif