Add i486 toolchain support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3349 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
239b017ed4
commit
47f6b44c9a
@ -111,34 +111,34 @@ SYMBOL(up_fullcontextrestore):
|
||||
* stack pointer.
|
||||
*/
|
||||
|
||||
movl (REG_SP)(%eax), %esp
|
||||
movl (4*REG_SP)(%eax), %esp
|
||||
|
||||
/* Save the return address, EFLAGS, and the values as well the
|
||||
* values of EBX and EAC on the new stack.
|
||||
*/
|
||||
|
||||
movl (REG_EIP)(%eax), %ebx
|
||||
movl (4*REG_EIP)(%eax), %ebx
|
||||
push %ebx
|
||||
movl (REG_EFLAGS)(%eax), %ebx
|
||||
movl (4*REG_EFLAGS)(%eax), %ebx
|
||||
push %ebx
|
||||
movl (REG_EAX)(%eax), %ebx
|
||||
movl (4*REG_EAX)(%eax), %ebx
|
||||
push %ebx
|
||||
movl (REG_EBX)(%eax), %ebx
|
||||
movl (4*REG_EBX)(%eax), %ebx
|
||||
push %ebx
|
||||
|
||||
/* Now restore the remaining registers */
|
||||
|
||||
movl (REG_EDI)(%ebx), %edi
|
||||
movl (REG_ESI)(%ebx), %esi
|
||||
movl (REG_EBP)(%ebx), %ebp
|
||||
movl (REG_EDX)(%ebx), %edx
|
||||
movl (REG_ECX)(%ebx), %ecx
|
||||
movl (4*REG_EDI)(%ebx), %edi
|
||||
movl (4*REG_ESI)(%ebx), %esi
|
||||
movl (4*REG_EBP)(%ebx), %ebp
|
||||
movl (4*REG_EDX)(%ebx), %edx
|
||||
movl (4*REG_ECX)(%ebx), %ecx
|
||||
|
||||
/* Restore the segment registers */
|
||||
|
||||
mov (REG_DS)(%ebx), %ds
|
||||
mov (REG_CS)(%ebx), %cs
|
||||
mov (REG_SS)(%ebx), %ss
|
||||
mov (4*REG_DS)(%ebx), %ds
|
||||
mov (4*REG_CS)(%ebx), %cs
|
||||
mov (4*REG_SS)(%ebx), %ss
|
||||
|
||||
/* Restore the correct value of EAX, EBX, and the EFLAGS then return */
|
||||
|
||||
|
@ -121,37 +121,37 @@ SYMBOL(up_saveusercontext):
|
||||
* because it will be the return value from this function.
|
||||
*/
|
||||
|
||||
movl %ebx, (REG_EBX)(%eax)
|
||||
movl %esi, (REG_ESI)(%eax)
|
||||
movl %edi, (REG_EDI)(%eax)
|
||||
movl %ebx, (4*REG_EBX)(%eax)
|
||||
movl %esi, (4*REG_ESI)(%eax)
|
||||
movl %edi, (4*REG_EDI)(%eax)
|
||||
|
||||
/* Save the segment registers */
|
||||
|
||||
mov %ss, (REG_SS)(%eax)
|
||||
mov %cs, (REG_CS)(%eax)
|
||||
mov %ds, (REG_DS)(%eax)
|
||||
mov %ss, (4*REG_SS)(%eax)
|
||||
mov %cs, (4*REG_CS)(%eax)
|
||||
mov %ds, (4*REG_DS)(%eax)
|
||||
|
||||
/* Save the value of SP as will be after we return (don't bother to save
|
||||
* REG_ESP).
|
||||
*/
|
||||
|
||||
leal 4(%esp), %ecx
|
||||
movl %ecx, (REG_SP)(%eax)
|
||||
movl %ecx, (4*REG_SP)(%eax)
|
||||
|
||||
/* Fetch the PC from the stack and save it in the save block */
|
||||
|
||||
movl 0(%esp), %ecx
|
||||
movl %ecx, (REG_EIP)(%eax)
|
||||
movl %ecx, (4*REG_EIP)(%eax)
|
||||
|
||||
/* Save the framepointer */
|
||||
|
||||
movl %ebp, (REG_EBP)(%eax)
|
||||
movl %ebp, (4*REG_EBP)(%eax)
|
||||
|
||||
/* Get and save the interrupt state */
|
||||
|
||||
pushf
|
||||
pop %ecx
|
||||
movl %ecx, (REG_EFLAGS)(%eax)
|
||||
movl %ecx, (4*REG_EFLAGS)(%eax)
|
||||
|
||||
/* And return 0. 'ret' will remove the EIP from the top of the stack. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user