diff options
author | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
---|---|---|
committer | Mystery Man <unknown@mandriva.org> | 2003-10-29 16:07:11 +0000 |
commit | fa40f30b4253b1e05c46cc5e0c111176825b7623 (patch) | |
tree | 76cf2d26c0ce0ee7c6a2c1a1a2b65bc4d8e33029 /mdk-stage1/dietlibc/alpha | |
parent | 327bd24f8e4291bd1882de1990dd7339f781a9cb (diff) | |
download | drakx-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar drakx-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar.gz drakx-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar.bz2 drakx-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.tar.xz drakx-fa9b77142ea63ce782bd11d9a4ce0657d37747a0.zip |
This commit was manufactured by cvs2svn to create tag 'Corpo_2_1_1'.Corpo_2_1_1
Diffstat (limited to 'mdk-stage1/dietlibc/alpha')
-rw-r--r-- | mdk-stage1/dietlibc/alpha/Makefile.add | 2 | ||||
-rw-r--r-- | mdk-stage1/dietlibc/alpha/__longjmp.S | 9 | ||||
-rw-r--r-- | mdk-stage1/dietlibc/alpha/clone.S | 2 | ||||
-rw-r--r-- | mdk-stage1/dietlibc/alpha/setjmp.S | 31 | ||||
-rw-r--r-- | mdk-stage1/dietlibc/alpha/signal.S | 3 | ||||
-rw-r--r-- | mdk-stage1/dietlibc/alpha/sigprocmask.S | 3 | ||||
-rw-r--r-- | mdk-stage1/dietlibc/alpha/start.S | 20 | ||||
-rw-r--r-- | mdk-stage1/dietlibc/alpha/unified.S | 12 |
8 files changed, 34 insertions, 48 deletions
diff --git a/mdk-stage1/dietlibc/alpha/Makefile.add b/mdk-stage1/dietlibc/alpha/Makefile.add index 10ff0faef..68b10b43c 100644 --- a/mdk-stage1/dietlibc/alpha/Makefile.add +++ b/mdk-stage1/dietlibc/alpha/Makefile.add @@ -2,4 +2,4 @@ CFLAGS+=-Os -Iinclude -fomit-frame-pointer -fstrict-aliasing VPATH:=alpha:syscalls.s:$(VPATH) -LIBOBJ+=$(patsubst %,$(OBJDIR)/%,divq.o divl.o remq.o reml.o seteuid.o __time.o) +LIBOBJ+=$(patsubst %,$(OBJDIR)/%,divq.o divl.o remq.o reml.o __time.o __alarm.o) diff --git a/mdk-stage1/dietlibc/alpha/__longjmp.S b/mdk-stage1/dietlibc/alpha/__longjmp.S index d86d76717..31e374d0f 100644 --- a/mdk-stage1/dietlibc/alpha/__longjmp.S +++ b/mdk-stage1/dietlibc/alpha/__longjmp.S @@ -1,11 +1,10 @@ -#ifdef __alpha__ - #include <setjmp.h> .text .align 2 .global __longjmp +.type __longjmp,@function __longjmp: mov $17, $0 /* a1 -> v0 */ @@ -18,7 +17,7 @@ __longjmp: ldq $26, (JB_PC*8) ($16) /* ra */ ldq $fp, (JB_FP*8) ($16) /* fp */ - ldq $1, (JB_SP*8) ($16) /* sp */ + ldq $sp, (JB_SP*8) ($16) /* sp */ ldt $f2, (JB_F2*8) ($16) /* f2 */ ldt $f3, (JB_F3*8) ($16) /* f3 */ @@ -30,9 +29,5 @@ __longjmp: ldt $f9, (JB_F9*8) ($16) /* f9 */ cmoveq $0, 0x1, $0 - mov $1, $sp ret $31, ($26), 1 - - -#endif diff --git a/mdk-stage1/dietlibc/alpha/clone.S b/mdk-stage1/dietlibc/alpha/clone.S index b7e32d707..28e61a8bc 100644 --- a/mdk-stage1/dietlibc/alpha/clone.S +++ b/mdk-stage1/dietlibc/alpha/clone.S @@ -1,5 +1,5 @@ #include "syscalls.h" -#include <asm/errno.h> +#include <errno.h> .text .align 2 diff --git a/mdk-stage1/dietlibc/alpha/setjmp.S b/mdk-stage1/dietlibc/alpha/setjmp.S index 3768056be..04bfd3d94 100644 --- a/mdk-stage1/dietlibc/alpha/setjmp.S +++ b/mdk-stage1/dietlibc/alpha/setjmp.S @@ -1,15 +1,16 @@ #include <setjmp.h> .text +.weak setjmp +.type setjmp,@function +setjmp: +.weak __setjmp +.type __setjmp,@function +__setjmp: + mov 0, $17 .global __sigsetjmp +.type __sigsetjmp,@function __sigsetjmp: - ldgp $gp, 0($gp) - - mov $sp, $1 - lda $sp, -16($sp) - - stq $26, 0($sp) /* save ra */ - stq $9, (JB_S0*8) ($16) /* s0 */ stq $10, (JB_S1*8) ($16) /* s1 */ stq $11, (JB_S2*8) ($16) /* s2 */ @@ -19,7 +20,7 @@ __sigsetjmp: stq $26, (JB_PC*8) ($16) /* ra */ stq $fp, (JB_FP*8) ($16) /* fp */ - stq $1, (JB_SP*8) ($16) /* sp */ + stq $sp, (JB_SP*8) ($16) /* sp */ stt $f2, (JB_F2*8) ($16) /* f2 */ stt $f3, (JB_F3*8) ($16) /* f3 */ @@ -30,17 +31,5 @@ __sigsetjmp: stt $f8, (JB_F8*8) ($16) /* f8 */ stt $f9, (JB_F9*8) ($16) /* f9 */ - br $26, __sigjmp_save /* call __sigjmp_save */ + br $31, __sigjmp_save /* jmp __sigjmp_save */ - ldq $26, 0($sp) /* restore ra */ - - lda $sp, 16($sp) - ret $31, ($26), 1 /* back to caller */ - -.weak setjmp -setjmp: -.weak __setjmp -__setjmp: - ldgp $gp, 0($gp) - mov 0, $17 - br __sigsetjmp diff --git a/mdk-stage1/dietlibc/alpha/signal.S b/mdk-stage1/dietlibc/alpha/signal.S deleted file mode 100644 index ceca0f02d..000000000 --- a/mdk-stage1/dietlibc/alpha/signal.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall(osf_signal,signal) diff --git a/mdk-stage1/dietlibc/alpha/sigprocmask.S b/mdk-stage1/dietlibc/alpha/sigprocmask.S deleted file mode 100644 index d9da836c2..000000000 --- a/mdk-stage1/dietlibc/alpha/sigprocmask.S +++ /dev/null @@ -1,3 +0,0 @@ -#include "syscalls.h" - -syscall_weak(osf_sigprocmask,sigprocmask,__sigprocmask) diff --git a/mdk-stage1/dietlibc/alpha/start.S b/mdk-stage1/dietlibc/alpha/start.S index 00b8e950d..850ce2420 100644 --- a/mdk-stage1/dietlibc/alpha/start.S +++ b/mdk-stage1/dietlibc/alpha/start.S @@ -1,7 +1,3 @@ -#include "start.h" - -#ifdef __alpha__ - .text .align 2 .set noreorder @@ -17,19 +13,21 @@ _start: ldgp $gp, 0($gp) /* prepare to call main */ - ldl $16, 0($sp) /* argc */ + ldl $16, 0($sp) /* argc / a0 */ - lda $17, 8($sp) /* argv */ + lda $17, 8($sp) /* argv / a1 */ - addq $16, 1, $18 /* argp */ + addq $16, 1, $18 /* argp / a2 */ s8addq $18, $17, $18 /* (8*(argc+1))+argv -> argp */ stq $18, environ - mov $0, $21 /* mov v0(dynload) to a5 */ - +#ifdef WANT_DYNAMIC +/* in v0 ($0) is the ld.so _fini pointer */ + mov $0, $19 /* mov v0(dynload) to a3 */ + jsr $26, dyn_start +#else jsr $26, main +#endif mov $0, $16 jsr $26, exit /* YES, CALL! for threads and atexit ! (+4 byte) */ - -#endif diff --git a/mdk-stage1/dietlibc/alpha/unified.S b/mdk-stage1/dietlibc/alpha/unified.S index 02a1c9bcd..506bf7387 100644 --- a/mdk-stage1/dietlibc/alpha/unified.S +++ b/mdk-stage1/dietlibc/alpha/unified.S @@ -1,15 +1,25 @@ #include <dietfeatures.h> +#include "syscalls.h" +.weak exit +exit: +.global _exit +_exit: + lda $0, __NR_exit .global __unified_syscall __unified_syscall: callsys bne $19, .Lerror + +/* here we go and "reuse" the return for weak-void functions */ +#include "dietuglyweaks.h" + ret $31, ($26), 0x01 .Lerror: .global error_unified_syscall error_unified_syscall: -#ifdef WANT_THREAD_SAVE +#ifdef WANT_THREAD_SAFE lda $sp, -16($sp) /* alloc 2 qwords on stack */ stq $26, 0($sp) /* save ra to stack */ stq $0, 8($sp) /* save v0 to stack */ |