summaryrefslogtreecommitdiff
path: root/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-07 02:53:37 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2011-03-07 02:53:37 +0000
commitddd126cb2969bec42a4430b7d8fcdd45de4a42c1 (patch)
tree283523ab8c113f44f7cee4d75b7e8c4deac85b71 /nuttx/arch/x86/src/qemu/qemu_saveusercontext.S
parentdc9631bf8e809702235b43dbc2414eb4a09622f9 (diff)
downloadpx4-nuttx-ddd126cb2969bec42a4430b7d8fcdd45de4a42c1.tar.gz
px4-nuttx-ddd126cb2969bec42a4430b7d8fcdd45de4a42c1.tar.bz2
px4-nuttx-ddd126cb2969bec42a4430b7d8fcdd45de4a42c1.zip
Add i486 toolchain support
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3349 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/x86/src/qemu/qemu_saveusercontext.S')
-rw-r--r--nuttx/arch/x86/src/qemu/qemu_saveusercontext.S20
1 files changed, 10 insertions, 10 deletions
diff --git a/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S b/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S
index 841023b40..3da2d1491 100644
--- a/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S
+++ b/nuttx/arch/x86/src/qemu/qemu_saveusercontext.S
@@ -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. */