Add registers macl and mach in save and restore context functions.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@228 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Alan Korr 2002-04-25 12:43:55 +00:00
parent 81df66031e
commit a06a3d0721

View file

@ -23,6 +23,8 @@ typedef union
struct regs_t
{
unsigned int r[7]; /* Registers r8 thru r14 */
unsigned int mach,
macl;
void *sp; /* Stack pointer (r15) */
unsigned int sr; /* Status register */
#if 0
@ -111,6 +113,8 @@ static inline void stctx(void* addr)
/* here a far better code */
asm volatile ("sts.l pr, @-%0\n\t"
"stc.l sr, @-%0\n\t"
"sts.l macl,@-%0\n\t"
"sts.l mach,@-%0\n\t"
"mov.l r15, @-%0\n\t"
"mov.l r14, @-%0\n\t"
"mov.l r13, @-%0\n\t"
@ -159,6 +163,8 @@ static inline void ldctx(void* addr)
"mov.l @%0+,r13\n\t"
"mov.l @%0+,r14\n\t"
"mov.l @%0+,r15\n\t"
"lds.l @%0+,mach\n\t"
"lds.l @%0+,macl\n\t"
"ldc.l @%0+,sr\n\t"
"lds.l @%0+,pr" : : "r" (addr));