summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/vax/__longjmp.S38
-rw-r--r--libc/sysdeps/linux/vax/_setjmp.S1
-rw-r--r--libc/sysdeps/linux/vax/brk.c2
-rw-r--r--libc/sysdeps/linux/vax/crt1.S20
-rw-r--r--libc/sysdeps/linux/vax/crti.S17
-rw-r--r--libc/sysdeps/linux/vax/crtn.S12
-rw-r--r--libc/sysdeps/linux/vax/setjmp.S35
7 files changed, 58 insertions, 67 deletions
diff --git a/libc/sysdeps/linux/vax/__longjmp.S b/libc/sysdeps/linux/vax/__longjmp.S
index a48581fa9..61b37a3b9 100644
--- a/libc/sysdeps/linux/vax/__longjmp.S
+++ b/libc/sysdeps/linux/vax/__longjmp.S
@@ -1,24 +1,28 @@
#include <features.h>
-# longjmp.S atp sept 2001
-# restore regs and info and jmp back to a previous setjmp
+/*
+ * longjmp.S atp sept 2001
+ * Jan-Benedict Glaw <jbglaw@lug-owl.de> 2006
+ *
+ * Restore regs and info and jmp back to a previous setjmp
+ */
-.globl __longjmp
-.align 4
+.globl __longjmp
+.align 4
__longjmp:
- .word 0x0040 # this matches setjmp and PLT
- movl 0x4(%ap), %r0 # our scratch reg
-# movl $0, %r0
-# movl (%r0), %r0
- # we are going to modify our stack frame
- # to the same as that of the setjmp we called earlier
- movl (%r0), (%fp) # cond handler
- movl 0x4(%r0), 0x4(%fp) # psw
- movl 0x8(%r0), 0x8(%fp) # ap
- movl 0xc(%r0), 0xc(%fp) # fp
- movl 0x10(%r0), 0x10(%fp) # pc
+ .word 0x0040 /* This matches setjmp and PLT */
+ movl 0x4(%ap), %r0 /* Our scratch reg */
+/* movl $0, %r0 */
+/* movl (%r0), %r0 */
+ /* We are going to modify our stack frame */
+ /* to the same as that of the setjmp we called earlier */
+ movl (%r0), (%fp) /* cond handler */
+ movl 0x4(%r0), 0x4(%fp) /* psw */
+ movl 0x8(%r0), 0x8(%fp) /* ap */
+ movl 0xc(%r0), 0xc(%fp) /* fp */
+ movl 0x10(%r0), 0x10(%fp) /* pc */
- # restore the regs
+ /* Restore the regs */
movl 0x14(%r0), %r1
movl 0x18(%r0), %r2
movl 0x1c(%r0), %r3
@@ -31,7 +35,7 @@ __longjmp:
movl 0x38(%r0), %r10
movl 0x3c(%r0), %r11
- # check val and set to 1 if set to zero
+ /* Check val and set to 1 if set to zero */
movl 0x8(%ap), %r0
tstl %r0
bneq exit_ok
diff --git a/libc/sysdeps/linux/vax/_setjmp.S b/libc/sysdeps/linux/vax/_setjmp.S
index 17d3160d8..680ddd729 100644
--- a/libc/sysdeps/linux/vax/_setjmp.S
+++ b/libc/sysdeps/linux/vax/_setjmp.S
@@ -1,4 +1,3 @@
-
.globl _setjmp
.align 4
_setjmp:
diff --git a/libc/sysdeps/linux/vax/brk.c b/libc/sysdeps/linux/vax/brk.c
index bd49e19fe..5b23f6075 100644
--- a/libc/sysdeps/linux/vax/brk.c
+++ b/libc/sysdeps/linux/vax/brk.c
@@ -30,7 +30,7 @@ brk (void *addr)
{
register unsigned long int result __asm__ ("%%r0");
- asm (
+ __asm__ (
" pushl %%ap \n" /* Start frame */
" pushl %2 \n" /* New top address we wish to get */
" pushl $1 \n" /* One argument */
diff --git a/libc/sysdeps/linux/vax/crt1.S b/libc/sysdeps/linux/vax/crt1.S
index ea9c105d6..70960988d 100644
--- a/libc/sysdeps/linux/vax/crt1.S
+++ b/libc/sysdeps/linux/vax/crt1.S
@@ -35,16 +35,16 @@ _start:
movl %sp, %r3 /* R3 = argv = &argv[0] */
#if (defined L_crt1 || defined L_gcrt1) && defined __UCLIBC_CTOR_DTOR__
- pushl %r0 # stack_end
- pushl $0 # rtld_fini. This is probably needed for the case
- # where a dynamic linker is involved. So this is
- # an open FIXME that needs to be addressed at some
- # time...
+ pushl %r0 /* stack_end */
+ pushl $0 /* rtld_fini. This is probably needed for the */
+ /* case where a dynamic linker is involved. So */
+ /* this is an open FIXME that needs to be */
+ /* addressed at some time... */
pushl $_fini
pushl $_init
- pushl %r3 /* Argument pointer */
- pushl %r4 /* And the argument count */
- pushl $main /* main() */
+ pushl %r3 /* Argument pointer */
+ pushl %r4 /* And the argument count */
+ pushl $main /* main() */
/* We need to call __uClibc_main which should not return.
* __uClibc_main (int (*main) (int, char **, char **),
@@ -66,8 +66,8 @@ _start:
calls $3, __uClibc_main
#endif
- /* The above __uClibc_start_main() shouldn't ever return. If it
- does, we just crash. */
+ /* The above __uClibc_start_main() shouldn't ever return. If it */
+ /* does, we just crash. */
halt
.align 2
diff --git a/libc/sysdeps/linux/vax/crti.S b/libc/sysdeps/linux/vax/crti.S
index e75eb5ca1..0056478bb 100644
--- a/libc/sysdeps/linux/vax/crti.S
+++ b/libc/sysdeps/linux/vax/crti.S
@@ -2,29 +2,20 @@
.version "01.01"
gcc2_compiled.:
__gnu_compiled_c:
-#APP
-
.section .init
-#NO_APP
.align 1
.globl _init
.type _init,@function
_init:
- .word 0x0
-#APP
-
+ .word 0x0000
+
.align 1
-
-
+
.section .fini
-#NO_APP
.align 1
.globl _fini
.type _fini,@function
_fini:
- .word 0x0
-#APP
+ .word 0x0000
.align 1
-
-
.ident "GCC: (GNU) 2.95.2 19991024 (release) (Linux/VAX CVS)"
diff --git a/libc/sysdeps/linux/vax/crtn.S b/libc/sysdeps/linux/vax/crtn.S
index f028947b4..6ca5c4fcd 100644
--- a/libc/sysdeps/linux/vax/crtn.S
+++ b/libc/sysdeps/linux/vax/crtn.S
@@ -2,28 +2,20 @@
.version "01.01"
gcc2_compiled.:
__gnu_compiled_c:
-#APP
-
+
.section .init
-#NO_APP
.align 1
.globl _init
.type _init,@function
-#NO_APP
ret
.Lfe2:
.size _init,.Lfe2-_init
-#APP
-
+
.section .fini
-#NO_APP
.align 1
.globl _fini
.type _fini,@function
-#NO_APP
ret
.Lfe3:
.size _fini,.Lfe3-_fini
-#APP
-
.ident "GCC: (GNU) 2.95.2 19991024 (release) (Linux/VAX CVS)"
diff --git a/libc/sysdeps/linux/vax/setjmp.S b/libc/sysdeps/linux/vax/setjmp.S
index f81be9330..bdbde4b13 100644
--- a/libc/sysdeps/linux/vax/setjmp.S
+++ b/libc/sysdeps/linux/vax/setjmp.S
@@ -1,14 +1,19 @@
-# setjmp.S atp. Sept. 2001
-# save regs and info needed for a longjmp
+
+/*
+ * setjmp.S atp. Sept. 2001
+ * Jan-Benedict Glaw <jbglaw@lug-owl.de> 2006
+ *
+ * Save regs and info needed for a longjmp
+ */
.globl __sigsetjmp
.align 4
__sigsetjmp:
- .word 0x0000 # we look after reg saving here - this must
- # match longjmp
- movl 0x4(%ap), %r0 # our scratch reg
- # kenn would probably use movq here. :-)
- movl %r1, 0x14(%r0) # save regs
+ .word 0x0000 /* We look after reg saving here - this */
+ /* must match longjmp. */
+ movl 0x4(%ap), %r0 /* Our scratch reg */
+ /* kenn would probably use movq here. :-) */
+ movl %r1, 0x14(%r0) /* save regs */
movl %r2, 0x18(%r0)
movl %r3, 0x1c(%r0)
movl %r4, 0x20(%r0)
@@ -19,16 +24,16 @@ __sigsetjmp:
movl %r9, 0x34(%r0)
movl %r10, 0x38(%r0)
movl %r11, 0x3c(%r0)
- # now save our call frame
- movl (%fp), (%r0) # condition handler (for VMS emulation)
- movl 0x4(%fp), 0x4(%r0) # psw
- movl 0x8(%fp), 0x8(%r0) # ap
- movl 0xc(%fp), 0xc(%r0) # fp
- movl 0x10(%fp), 0x10(%r0) # pc
- # call the sigjmp save routine
+ /* Now save our call frame */
+ movl (%fp), (%r0) /* Condition handler (for VMS emulation) */
+ movl 0x4(%fp), 0x4(%r0) /* psw */
+ movl 0x8(%fp), 0x8(%r0) /* ap */
+ movl 0xc(%fp), 0xc(%r0) /* fp */
+ movl 0x10(%fp), 0x10(%r0) /* pc */
+ /* Call the sigjmp save routine */
pushl 8(%ap)
pushl %r0
calls $2, __sigjmp_save
- # done
+ /* Done */
ret