This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

get arm7 registers


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]