summaryrefslogtreecommitdiff
path: root/lang/schemetoc/files/x86.s
blob: 1cedbc50ce29d09f37350ee89c5226a24a517268 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
 * SCHEME->C
 *
 * x86 assembly code.
 *
 * This code originally came from the Linux port, so someone else gets
 * the credit for writing it.
 *
 */

#ifdef	__i486__
	.align 4
#else
	.align 2
#endif
.globl	_sc_geti386regs

_sc_geti386regs:
	pushl %ebp
	movl %esp,%ebp
	pushl %ecx
	movl %eax,%ecx
	movl 8(%ebp),%eax
	movl %ecx,(%eax)
	popl %ecx
	movl %ecx,4(%eax)
	movl %edx,8(%eax)
	movl %ebx,12(%eax)
	movl %esi,16(%eax)
	movl %edi,20(%eax)
	movl %ebp,%esp
	popl %ebp
	ret