[ECOS] get arm7 registers

trollepi jj jackoaway@hotmail.com
Mon Jun 23 15:11:00 GMT 2008


Hi,
I want to get the general registers (r0 to r15 in supervisor mode) at anytime.
With the synthetic target I do it with 
#define __get_thread_context(__context__){\
asm(    "mov %%edi,%0 \n\t"\
"mov %%esi,%1 \n\t"\
"mov %%ebp,%2 \n\t"\
"mov %%esp,%3 \n\t"\
"mov %%ebx,%4 \n\t"\
 : "=m" (__context__[S_REG_EDI]),"=m" (__context__[S_REG_ESI]),\
 "=m" (__context__[S_REG_EBP]),"=m" (__context__[S_REG_ESP]),\
 "=m" (__context__[S_REG_EBX]));\
}
because there was not a lot of registers to save. I would know if anybody have an
idea to get those with a more proper method (like get all registers and store it, with
a specific arm instructions, in memory - in fact in a HAL_SavedRegisters structure).

Thanks a lot for your future help and answers.
Best regards jjp. 
_________________________________________________________________
Lancez des recherches en toute sécurité depuis n'importe quelle page Web. Téléchargez GRATUITEMENT Windows Live Toolbar aujourd'hui !
http://toolbar.live.com

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list