pushl %ecx
pushl %edx
pushl %ebx
+ pushl %ebp
pushl %esi
pushl %edi
pushw %es
popw %es
popl %edi
popl %esi
+ popl %ebp
popl %ebx
popl %edx
popl %ecx
pushl %ecx
pushl %edx
pushl %ebx
+ pushl %ebp
pushl %esi
pushl %edi
pushw %es
movw %cx, %ds
movl %esp, %ebx // Backup %esp, then zero high bits
movzwl %sp, %esp
- movl 24(%esp), %ecx // Get calling function
- movl %eax, 24(%esp) // Save %eax
+ movl 28(%esp), %ecx // Get calling function
+ movl %eax, 28(%esp) // Save %eax
movl %esp, %eax // First arg is pointer to struct bregs
calll *%ecx
movl %ebx, %esp // Restore %esp (including high bits)
popw %es
popl %edi
popl %esi
+ popl %ebp
popl %ebx
popl %edx
popl %ecx
pushl %ecx
pushl %edx
pushl %ebx
+ pushl %ebp
pushl %esi
pushl %edi
pushw %es
popw %es
popl %edi
popl %esi
+ popl %ebp
popl %ebx
popl %edx
popl %ecx
xorw %ax, %ax
movw %ax, %ss
movl $ BUILD_STACK_ADDR , %esp
- pushl $ \cfunc
+ movl $ \cfunc , %edx
jmp transition32
.endm
.section .text.asm.\func
.global \func
.endm
+
+ // Declare an exported function
+ .macro EXPORTFUNC func
+ .section .text.asm.export.\func
+ .global \func
+ .endm