Convert library asm files to GAS syntax

This commit is contained in:
Arun Thomas
2010-03-03 14:27:30 +00:00
parent bf7397b64e
commit cbd276e4ce
302 changed files with 2544 additions and 2451 deletions

View File

@@ -2,5 +2,5 @@
.PATH: ${.CURDIR}/gnu/arch/${ARCH}/rts
SRCS+= \
__setjmp.gs \
longjmp.gs
__setjmp.S \
longjmp.S

View File

@@ -0,0 +1,31 @@
/ __setjmp.gnu.s
/
/ Created: Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
.text
.globl ___setjmp
___setjmp:
movl 4(%esp), %eax /* jmp_buf */
movl %edx, 28(%eax) /* save edx */
movl 0(%esp), %edx
movl %edx, 8(%eax) /* save program counter */
movl %esp, 12(%eax) /* save stack pointer */
movl %ebp, 16(%eax) /* save frame pointer */
movl %ebx, 20(%eax)
movl %ecx, 24(%eax)
movl %esi, 32(%eax)
movl %edi, 36(%eax)
movl 8(%esp), %edx /* save mask? */
movl %edx, 0(%eax) /* save whether to restore mask */
testl %edx, %edx
jz 1f
leal 4(%eax), %edx /* pointer to sigset_t */
push %edx
call __newsigset /* save mask */
addl $4, %esp
1:
movl $0, %eax
ret
/ $PchId: __setjmp.gnu.s,v 1.4 1996/03/12 19:30:54 philip Exp $

View File

@@ -1,31 +0,0 @@
/ __setjmp.gnu.s
/
/ Created: Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
.text
.globl ___setjmp
___setjmp:
movl 4(%esp), %eax # jmp_buf
movl %edx, 28(%eax) # save edx
movl 0(%esp), %edx
movl %edx, 8(%eax) # save program counter
movl %esp, 12(%eax) # save stack pointer
movl %ebp, 16(%eax) # save frame pointer
movl %ebx, 20(%eax)
movl %ecx, 24(%eax)
movl %esi, 32(%eax)
movl %edi, 36(%eax)
movl 8(%esp), %edx # save mask?
movl %edx, 0(%eax) # save whether to restore mask
testl %edx, %edx
jz 1f
leal 4(%eax), %edx # pointer to sigset_t
pushl %edx
call ___newsigset # save mask
addl $4, %esp
1:
movl $0, %eax
ret
/ $PchId: __setjmp.gnu.s,v 1.4 1996/03/12 19:30:54 philip Exp $

View File

@@ -0,0 +1,38 @@
/ longjmp.gnu.s
/
/ Created: Oct 15, 1993 by Philip Homburg <philip@cs.vu.nl>
.text
.globl _longjmp
_longjmp:
movl 4(%esp), %eax /* jmp_buf */
cmpl $0, 0(%eax) /* save mask? */
je 1f
leal 4(%eax), %edx /* pointer to sigset_t */
push %edx
call __oldsigset /* restore mask */
addl $4, %esp
movl 4(%esp), %eax /* jmp_buf */
1:
movl 8(%esp), %ecx /* result value */
movl 12(%eax), %esp /* restore stack pointer */
movl 8(%eax), %edx /* restore program counter */
movl %edx, 0(%esp)
push %ecx /* save result code */
movl 16(%eax), %ebp /* restore frame pointer */
movl 20(%eax), %ebx
movl 24(%eax), %ecx
movl 28(%eax), %edx
movl 32(%eax), %esi
movl 36(%eax), %edi
pop %eax
testl %eax, %eax
jz 1f
ret
1: movl $1, %eax
ret
/ $PchId: longjmp.gnu.s,v 1.4 1996/03/12 19:30:02 philip Exp $

View File

@@ -1,38 +0,0 @@
/ longjmp.gnu.s
/
/ Created: Oct 15, 1993 by Philip Homburg <philip@cs.vu.nl>
.text
.globl _longjmp
_longjmp:
movl 4(%esp), %eax # jmp_buf
cmpl $0, 0(%eax) # save mask?
je 1f
leal 4(%eax), %edx # pointer to sigset_t
pushl %edx
call ___oldsigset # restore mask
addl $4, %esp
movl 4(%esp), %eax # jmp_buf
1:
movl 8(%esp), %ecx # result value
movl 12(%eax), %esp # restore stack pointer
movl 8(%eax), %edx # restore program counter
movl %edx, 0(%esp)
pushl %ecx # save result code
movl 16(%eax), %ebp # restore frame pointer
movl 20(%eax), %ebx
movl 24(%eax), %ecx
movl 28(%eax), %edx
movl 32(%eax), %esi
movl 36(%eax), %edi
pop %eax
testl %eax, %eax
jz 1f
ret
1: movl $1, %eax
ret
/ $PchId: longjmp.gnu.s,v 1.4 1996/03/12 19:30:02 philip Exp $