summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/alpha
diff options
context:
space:
mode:
Diffstat (limited to 'mdk-stage1/dietlibc/alpha')
-rw-r--r--mdk-stage1/dietlibc/alpha/Makefile.add5
-rw-r--r--mdk-stage1/dietlibc/alpha/__longjmp.S38
-rw-r--r--mdk-stage1/dietlibc/alpha/__time.c11
-rw-r--r--mdk-stage1/dietlibc/alpha/accept.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/bind.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/clone.S42
-rw-r--r--mdk-stage1/dietlibc/alpha/connect.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/divl.S101
-rw-r--r--mdk-stage1/dietlibc/alpha/divq.S102
-rw-r--r--mdk-stage1/dietlibc/alpha/getegid.S11
-rw-r--r--mdk-stage1/dietlibc/alpha/geteuid.S11
-rw-r--r--mdk-stage1/dietlibc/alpha/getgid.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/getpeername.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/getpid.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/getppid.S11
-rw-r--r--mdk-stage1/dietlibc/alpha/getsockname.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/getsockopt.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/getuid.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/listen.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/mmap.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/msgctl.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/msgget.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/msgrcv.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/msgsnd.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/pipe.S17
-rw-r--r--mdk-stage1/dietlibc/alpha/recv.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/recvfrom.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/recvmsg.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/reml.S101
-rw-r--r--mdk-stage1/dietlibc/alpha/remq.S97
-rw-r--r--mdk-stage1/dietlibc/alpha/semctl.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/semget.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/semop.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/send.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/sendmsg.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/sendto.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/seteuid.c7
-rw-r--r--mdk-stage1/dietlibc/alpha/setjmp.S46
-rw-r--r--mdk-stage1/dietlibc/alpha/setsockopt.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/shmat.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/shmctl.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/shmdt.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/shmget.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/shutdown.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/signal.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/sigprocmask.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/socket.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/socketcall.S5
-rw-r--r--mdk-stage1/dietlibc/alpha/start.S35
-rw-r--r--mdk-stage1/dietlibc/alpha/strlen.c32
-rw-r--r--mdk-stage1/dietlibc/alpha/time.S0
-rw-r--r--mdk-stage1/dietlibc/alpha/unified.S29
-rw-r--r--mdk-stage1/dietlibc/alpha/utime.S3
-rw-r--r--mdk-stage1/dietlibc/alpha/waitpid.S10
54 files changed, 0 insertions, 813 deletions
diff --git a/mdk-stage1/dietlibc/alpha/Makefile.add b/mdk-stage1/dietlibc/alpha/Makefile.add
deleted file mode 100644
index 10ff0faef..000000000
--- a/mdk-stage1/dietlibc/alpha/Makefile.add
+++ /dev/null
@@ -1,5 +0,0 @@
-
-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)
diff --git a/mdk-stage1/dietlibc/alpha/__longjmp.S b/mdk-stage1/dietlibc/alpha/__longjmp.S
deleted file mode 100644
index d86d76717..000000000
--- a/mdk-stage1/dietlibc/alpha/__longjmp.S
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifdef __alpha__
-
-#include <setjmp.h>
-
-.text
-.align 2
-
-.global __longjmp
-__longjmp:
- mov $17, $0 /* a1 -> v0 */
-
- ldq $9, (JB_S0*8) ($16) /* s0 */
- ldq $10, (JB_S1*8) ($16) /* s1 */
- ldq $11, (JB_S2*8) ($16) /* s2 */
- ldq $12, (JB_S3*8) ($16) /* s3 */
- ldq $13, (JB_S4*8) ($16) /* s4 */
- ldq $14, (JB_S5*8) ($16) /* s5 */
-
- ldq $26, (JB_PC*8) ($16) /* ra */
- ldq $fp, (JB_FP*8) ($16) /* fp */
- ldq $1, (JB_SP*8) ($16) /* sp */
-
- ldt $f2, (JB_F2*8) ($16) /* f2 */
- ldt $f3, (JB_F3*8) ($16) /* f3 */
- ldt $f4, (JB_F4*8) ($16) /* f4 */
- ldt $f5, (JB_F5*8) ($16) /* f5 */
- ldt $f6, (JB_F6*8) ($16) /* f6 */
- ldt $f7, (JB_F7*8) ($16) /* f7 */
- ldt $f8, (JB_F8*8) ($16) /* f8 */
- 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/__time.c b/mdk-stage1/dietlibc/alpha/__time.c
deleted file mode 100644
index 07275e0e3..000000000
--- a/mdk-stage1/dietlibc/alpha/__time.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <time.h>
-#include <sys/time.h>
-
-time_t time(time_t *foo) {
- struct timeval tv;
- time_t tmp=(time_t)-1;
- if (gettimeofday(&tv,0)==0)
- tmp=(time_t)tv.tv_sec;
- if (foo) *foo=tmp;
- return tmp;
-}
diff --git a/mdk-stage1/dietlibc/alpha/accept.S b/mdk-stage1/dietlibc/alpha/accept.S
deleted file mode 100644
index 459c45d7a..000000000
--- a/mdk-stage1/dietlibc/alpha/accept.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall_weak(accept,accept,__libc_accept)
diff --git a/mdk-stage1/dietlibc/alpha/bind.S b/mdk-stage1/dietlibc/alpha/bind.S
deleted file mode 100644
index 86a04cb70..000000000
--- a/mdk-stage1/dietlibc/alpha/bind.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(bind,bind)
diff --git a/mdk-stage1/dietlibc/alpha/clone.S b/mdk-stage1/dietlibc/alpha/clone.S
deleted file mode 100644
index b7e32d707..000000000
--- a/mdk-stage1/dietlibc/alpha/clone.S
+++ /dev/null
@@ -1,42 +0,0 @@
-#include "syscalls.h"
-#include <asm/errno.h>
-
-.text
-.align 2
-.weak clone
-clone:
-.global __clone
-.type __clone,@function
-__clone:
- ldiq $0, EINVAL
- beq $16, .Lerror
- beq $17, .Lerror
-
- subq $17, 16, $17
- stq $16, 0($17)
- stq $19, 8($17)
- mov $18, $16
-
- lda $0, __NR_clone($31)
- callsys
- bne $19, .Lerror
-
- beq $0, .Lstart_thread
-
- ret $31, ($26), 0x01
-
-.Lerror:
- jmp error_unified_syscall
-
-.Lstart_thread:
- clr $fp
-
- ldq $27, 0($sp)
- ldq $16, 8($sp)
-
- jsr $26, ($27), 0x04
-
- ldgp $gp, 0($26)
- mov $0, $16
- jsr $26, exit
-
diff --git a/mdk-stage1/dietlibc/alpha/connect.S b/mdk-stage1/dietlibc/alpha/connect.S
deleted file mode 100644
index c191ca808..000000000
--- a/mdk-stage1/dietlibc/alpha/connect.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall_weak(connect,connect,__libc_connect)
diff --git a/mdk-stage1/dietlibc/alpha/divl.S b/mdk-stage1/dietlibc/alpha/divl.S
deleted file mode 100644
index 3af22a5e8..000000000
--- a/mdk-stage1/dietlibc/alpha/divl.S
+++ /dev/null
@@ -1,101 +0,0 @@
-/* taken from glibc 2.2 */
-
- .set noreorder
- .set noat
-
- .ent __divlu
- .globl __divlu
-
- .align 3
-__divlu :
- lda $30 , - 48 ($30 )
- .frame $30 , 48 , $23 , 0
- .prologue 0
-.Ludiv:
- stq $1 , 0($30 )
- zapnot $25 ,15, $1
- stq $2 , 8($30 )
- zapnot $24 ,15, $2
- stq $0 , 16($30 )
- clr $27
- stq $3 , 24($30 )
- ldiq $0 , 1
- stq $4 ,32($30 )
- beq $1 , .Ldivbyzero
-
- .align 3
-
-
-1: cmpult $1 , $2 , $at
- s8addq $1 , $31 , $1
- s8addq $0 , $31 , $0
- bne $at , 1b
-
-
-
-3: addq $27 ,$0 , $4
- srl $0 , 1, $0
- cmpule $1 , $2 , $at
- subq $2 , $1 , $3
- cmovne $at ,$4 , $27
- srl $1 , 1, $1
- cmovne $at , $3 , $2
- bne $0 , 3b
-
-.Ldone: ldq $1 , 0($30 )
- ldq $2 , 8($30 )
- ldq $0 , 16($30 )
- ldq $3 , 24($30 )
- ldq $4 ,32($30 )
- lda $30 , 48 ($30 )
- ret $31 , ($23 ), 1
-
-.Ldivbyzero:
- mov $16 , $3
- ldiq $16 , -2
- call_pal 170
- mov $3 , $16
- clr $27
- br .Ldone
-
- .end __divlu
-
- .ent __divl
- .globl __divl
-
- .align 3
-__divl :
- lda $30 , - 48 ($30 )
- .frame $30 , 48 , $23 , 0
- .prologue 0
- or $24 , $25 , $at
- sextl $at , $at
- bge $at , .Ludiv
-
-
- stq $24 , 0($30 )
- negl $24 , $at
- stq $25 , 8($30 )
- cmovge $at , $at , $24
- stq $23 , 16($30 )
- negl $25 , $at
- stq $3 , 24($30 )
- cmovge $at , $at , $25
-
-
- bsr $23 , __divlu
-
-
- ldq $24 , 0($30 )
- ldq $25 , 8($30 )
- xor $24 , $25 , $at
- negl $27 , $3
- sextl $at , $at
- ldq $23 , 16($30 )
- cmovlt $at , $3 , $27
- ldq $3 , 24($30 )
-
- lda $30 , 48 ($30 )
- ret $31 , ($23 ), 1
-
- .end __divl
diff --git a/mdk-stage1/dietlibc/alpha/divq.S b/mdk-stage1/dietlibc/alpha/divq.S
deleted file mode 100644
index cf70862c4..000000000
--- a/mdk-stage1/dietlibc/alpha/divq.S
+++ /dev/null
@@ -1,102 +0,0 @@
-/* taken from glibc 2.2 */
-
- .set noreorder
- .set noat
-
- .ent __divqu
- .globl __divqu
-
- .align 3
-__divqu :
- lda $30 , - 48 ($30 )
- .frame $30 , 48 , $23 , 0
- .prologue 0
-$udiv:
- stq $1 , 0($30 )
- mov $25 , $1
- stq $2 , 8($30 )
- mov $24 , $2
- stq $0 , 16($30 )
- clr $27
- stq $3 , 24($30 )
- ldiq $0 , 1
- stq $4 ,32($30 )
- beq $1 , $divbyzero
-
- .align 3
-
-
-1: cmpult $1 , $2 , $at
- blt $1 , 2f
- addq $1 , $1 , $1
- addq $0 , $0 , $0
- bne $at , 1b
- unop
-2:
-3: addq $27 ,$0 , $4
- srl $0 , 1, $0
- cmpule $1 , $2 , $at
- subq $2 , $1 , $3
- cmovne $at ,$4 , $27
- srl $1 , 1, $1
- cmovne $at , $3 , $2
- bne $0 , 3b
-
-$done: ldq $1 , 0($30 )
- ldq $2 , 8($30 )
- ldq $0 , 16($30 )
- ldq $3 , 24($30 )
- ldq $4 ,32($30 )
- lda $30 , 48 ($30 )
- ret $31 , ($23 ), 1
-
-$divbyzero:
- mov $16 , $3
- ldiq $16 , -2
- call_pal 170
- mov $3 , $16
- clr $27
- br $done
-
- .end __divqu
-
- .ent __divq
- .globl __divq
-
- .align 3
-__divq :
- lda $30 , - 48 ($30 )
- .frame $30 , 48 , $23 , 0
- .prologue 0
- or $24 , $25 , $at
-
- bge $at , $udiv
-
-
- stq $24 , 0($30 )
- negq $24 , $at
- stq $25 , 8($30 )
- cmovge $at , $at , $24
- stq $23 , 16($30 )
- negq $25 , $at
- stq $3 , 24($30 )
- cmovge $at , $at , $25
-
-
- bsr $23 , __divqu
-
-
- ldq $24 , 0($30 )
- ldq $25 , 8($30 )
- xor $24 , $25 , $at
- negq $27 , $3
-
- ldq $23 , 16($30 )
- cmovlt $at , $3 , $27
- ldq $3 , 24($30 )
-
- lda $30 , 48 ($30 )
- ret $31 , ($23 ), 1
-
- .end __divq
-
diff --git a/mdk-stage1/dietlibc/alpha/getegid.S b/mdk-stage1/dietlibc/alpha/getegid.S
deleted file mode 100644
index 89c35d45e..000000000
--- a/mdk-stage1/dietlibc/alpha/getegid.S
+++ /dev/null
@@ -1,11 +0,0 @@
-.text
-.align 2
-.global getegid
-getegid:
- lda $sp,-8($sp)
- stq $26, 0($sp)
- jsr getgid
- ldq $26, 0($sp)
- lda $sp, 8($sp)
- cmovge $0, $20, $0
- ret
diff --git a/mdk-stage1/dietlibc/alpha/geteuid.S b/mdk-stage1/dietlibc/alpha/geteuid.S
deleted file mode 100644
index 087ca7348..000000000
--- a/mdk-stage1/dietlibc/alpha/geteuid.S
+++ /dev/null
@@ -1,11 +0,0 @@
-.text
-.align 2
-.global geteuid
-geteuid:
- lda $sp,-8($sp)
- stq $26, 0($sp)
- jsr getuid
- ldq $26, 0($sp)
- lda $sp, 8($sp)
- cmovge $0, $20, $0
- ret
diff --git a/mdk-stage1/dietlibc/alpha/getgid.S b/mdk-stage1/dietlibc/alpha/getgid.S
deleted file mode 100644
index 7350082f3..000000000
--- a/mdk-stage1/dietlibc/alpha/getgid.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(getxgid,getgid)
diff --git a/mdk-stage1/dietlibc/alpha/getpeername.S b/mdk-stage1/dietlibc/alpha/getpeername.S
deleted file mode 100644
index 3b3f48b1a..000000000
--- a/mdk-stage1/dietlibc/alpha/getpeername.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(getpeername,getpeername)
diff --git a/mdk-stage1/dietlibc/alpha/getpid.S b/mdk-stage1/dietlibc/alpha/getpid.S
deleted file mode 100644
index d8b3523b2..000000000
--- a/mdk-stage1/dietlibc/alpha/getpid.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(getxpid,getpid)
diff --git a/mdk-stage1/dietlibc/alpha/getppid.S b/mdk-stage1/dietlibc/alpha/getppid.S
deleted file mode 100644
index e181268c3..000000000
--- a/mdk-stage1/dietlibc/alpha/getppid.S
+++ /dev/null
@@ -1,11 +0,0 @@
-.text
-.align 2
-.global getppid
-getppid:
- lda $sp,-8($sp)
- stq $26, 0($sp)
- jsr getpid
- ldq $26, 0($sp)
- lda $sp, 8($sp)
- cmovge $0, $20, $0
- ret
diff --git a/mdk-stage1/dietlibc/alpha/getsockname.S b/mdk-stage1/dietlibc/alpha/getsockname.S
deleted file mode 100644
index 2727d88da..000000000
--- a/mdk-stage1/dietlibc/alpha/getsockname.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(getsockname,getsockname)
diff --git a/mdk-stage1/dietlibc/alpha/getsockopt.S b/mdk-stage1/dietlibc/alpha/getsockopt.S
deleted file mode 100644
index 44b4a910a..000000000
--- a/mdk-stage1/dietlibc/alpha/getsockopt.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(getsockopt,getsockopt)
diff --git a/mdk-stage1/dietlibc/alpha/getuid.S b/mdk-stage1/dietlibc/alpha/getuid.S
deleted file mode 100644
index fcb5570c2..000000000
--- a/mdk-stage1/dietlibc/alpha/getuid.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(getxuid,getuid)
diff --git a/mdk-stage1/dietlibc/alpha/listen.S b/mdk-stage1/dietlibc/alpha/listen.S
deleted file mode 100644
index 1102831d4..000000000
--- a/mdk-stage1/dietlibc/alpha/listen.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(listen,listen)
diff --git a/mdk-stage1/dietlibc/alpha/mmap.S b/mdk-stage1/dietlibc/alpha/mmap.S
deleted file mode 100644
index 2e57fbb74..000000000
--- a/mdk-stage1/dietlibc/alpha/mmap.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(mmap,mmap)
diff --git a/mdk-stage1/dietlibc/alpha/msgctl.S b/mdk-stage1/dietlibc/alpha/msgctl.S
deleted file mode 100644
index d7caed2cc..000000000
--- a/mdk-stage1/dietlibc/alpha/msgctl.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(msgctl,msgctl)
diff --git a/mdk-stage1/dietlibc/alpha/msgget.S b/mdk-stage1/dietlibc/alpha/msgget.S
deleted file mode 100644
index 518d67ac4..000000000
--- a/mdk-stage1/dietlibc/alpha/msgget.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(msgget,msgget)
diff --git a/mdk-stage1/dietlibc/alpha/msgrcv.S b/mdk-stage1/dietlibc/alpha/msgrcv.S
deleted file mode 100644
index ab62e6c30..000000000
--- a/mdk-stage1/dietlibc/alpha/msgrcv.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(msgrcv,msgrcv)
diff --git a/mdk-stage1/dietlibc/alpha/msgsnd.S b/mdk-stage1/dietlibc/alpha/msgsnd.S
deleted file mode 100644
index 890a996a2..000000000
--- a/mdk-stage1/dietlibc/alpha/msgsnd.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(msgsnd,msgsnd)
diff --git a/mdk-stage1/dietlibc/alpha/pipe.S b/mdk-stage1/dietlibc/alpha/pipe.S
deleted file mode 100644
index 3dfef10bf..000000000
--- a/mdk-stage1/dietlibc/alpha/pipe.S
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "syscalls.h"
-
-.text
-.align 2
-.global pipe
-.type pipe,@function
-pipe:
- lda $0, __NR_pipe($31)
- callsys
- bne $19, .Lerror
- stl $0, 0($16)
- stl $20, 4($16)
- clr $0
- ret $31, ($26), 0x01
-.Lerror:
- br error_unified_syscall
-
diff --git a/mdk-stage1/dietlibc/alpha/recv.S b/mdk-stage1/dietlibc/alpha/recv.S
deleted file mode 100644
index 17664f2e2..000000000
--- a/mdk-stage1/dietlibc/alpha/recv.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall_weak(recv,recv,__libc_recv)
diff --git a/mdk-stage1/dietlibc/alpha/recvfrom.S b/mdk-stage1/dietlibc/alpha/recvfrom.S
deleted file mode 100644
index d8e3922af..000000000
--- a/mdk-stage1/dietlibc/alpha/recvfrom.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall_weak(recvfrom,recvfrom,__libc_recvfrom)
diff --git a/mdk-stage1/dietlibc/alpha/recvmsg.S b/mdk-stage1/dietlibc/alpha/recvmsg.S
deleted file mode 100644
index 6ce87eebb..000000000
--- a/mdk-stage1/dietlibc/alpha/recvmsg.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(recvmsg,recvmsg)
diff --git a/mdk-stage1/dietlibc/alpha/reml.S b/mdk-stage1/dietlibc/alpha/reml.S
deleted file mode 100644
index 2d89e3280..000000000
--- a/mdk-stage1/dietlibc/alpha/reml.S
+++ /dev/null
@@ -1,101 +0,0 @@
-/* taken from glibc 2.2 */
-
- .set noreorder
- .set noat
-
- .ent __remlu
- .globl __remlu
-
- .align 3
-__remlu :
- lda $30 , -32($30)
- .frame $30 , 32 , $23 , 0
- .prologue 0
-.Ludiv:
- stq $1 , 0($30)
- zapnot $25 , 15 , $1
- stq $2 , 8($30)
- zapnot $24 , 15 , $27
- stq $0 , 16($30)
- clr $2
- stq $3 , 24($30)
- ldiq $0 , 1
-
- beq $1 , .Ldivbyzero
-
- .align 3
-
-
-1: cmpult $1 , $27 , $at
- s8addq $1 , $31 , $1
- s8addq $0 , $31 , $0
- bne $at , 1b
-
-
-
-3:
- srl $0 , 1 , $0
- cmpule $1 , $27 , $at
- subq $27 , $1 , $3
-
- srl $1 , 1 , $1
- cmovne $at , $3 , $27
- bne $0 , 3b
-
-.Ldone: ldq $1 , 0($30)
- ldq $2 , 8($30)
- ldq $0 , 16($30)
- ldq $3 , 24($30)
-
- lda $30 , 32($30)
- ret $31 , ($23), 1
-
-.Ldivbyzero:
- mov $16 , $3
- ldiq $16 , -2
- call_pal 170
- mov $3 , $16
- clr $27
- br .Ldone
-
- .end __remlu
-
- .ent __reml
- .globl __reml
-
- .align 3
-__reml :
- lda $30 , - 32 ($30 )
- .frame $30 , 32 , $23 , 0
- .prologue 0
- or $24 , $25 , $at
- sextl $at , $at
- bge $at , .Ludiv
-
-
- stq $24 , 0($30 )
- negl $24 , $at
- stq $25 , 8($30 )
- cmovge $at , $at , $24
- stq $23 , 16($30 )
- negl $25 , $at
- stq $3 , 24($30 )
- cmovge $at , $at , $25
-
-
- bsr $23 , __remlu
-
-
- ldq $24 , 0($30 )
- ldq $25 , 8($30 )
- mov $24 , $at
- negl $27 , $3
- sextl $at , $at
- ldq $23 , 16($30 )
- cmovlt $at , $3 , $27
- ldq $3 , 24($30 )
-
- lda $30 , 32 ($30 )
- ret $31 , ($23 ), 1
-
- .end __reml
diff --git a/mdk-stage1/dietlibc/alpha/remq.S b/mdk-stage1/dietlibc/alpha/remq.S
deleted file mode 100644
index 713484da3..000000000
--- a/mdk-stage1/dietlibc/alpha/remq.S
+++ /dev/null
@@ -1,97 +0,0 @@
-/* taken from glibc 2.2 */
-
- .set noreorder
- .set noat
-
- .ent __remqu
- .globl __remqu
-
- .align 3
-__remqu :
- lda $30 , - 32 ($30 )
- .frame $30 , 32 , $23 , 0
- .prologue 0
-.Ludiv:
- stq $1 , 0($30 )
- mov $25 , $1
- stq $2 , 8($30 )
- mov $24 , $27
- stq $0 , 16($30 )
- clr $2
- stq $3 , 24($30 )
- ldiq $0 , 1
-
- beq $1 , .Ldivbyzero
-
- .align 3
-
-1: cmpult $1 , $27 , $at
- blt $1 , 2f
- addq $1 , $1 , $1
- addq $0 , $0 , $0
- bne $at , 1b
- unop
-2:
-3:
- srl $0 , 1, $0
- cmpule $1 , $27 , $at
- subq $27 , $1 , $3
-
- srl $1 , 1, $1
- cmovne $at , $3 , $27
- bne $0 , 3b
-
-.Ldone: ldq $1 , 0($30 )
- ldq $2 , 8($30 )
- ldq $0 , 16($30 )
- ldq $3 , 24($30 )
-
- lda $30 , 32 ($30 )
- ret $31 , ($23 ), 1
-
-.Ldivbyzero:
- mov $16 , $3
- ldiq $16 , -2
- call_pal 170
- mov $3 , $16
- clr $27
- br .Ldone
-
- .end __remqu
-
- .ent __remq
- .globl __remq
-
- .align 3
-__remq :
- lda $30 , - 32 ($30 )
- .frame $30 , 32 , $23 , 0
- .prologue 0
- or $24 , $25 , $at
-
- bge $at , .Ludiv
-
- stq $24 , 0($30 )
- negq $24 , $at
- stq $25 , 8($30 )
- cmovge $at , $at , $24
- stq $23 , 16($30 )
- negq $25 , $at
- stq $3 , 24($30 )
- cmovge $at , $at , $25
-
- bsr $23 , __remqu
-
- ldq $24 , 0($30 )
- ldq $25 , 8($30 )
- mov $24 , $at
- negq $27 , $3
-
- ldq $23 , 16($30 )
- cmovlt $at , $3 , $27
- ldq $3 , 24($30 )
-
- lda $30 , 32 ($30 )
- ret $31 , ($23 ), 1
-
- .end __remq
diff --git a/mdk-stage1/dietlibc/alpha/semctl.S b/mdk-stage1/dietlibc/alpha/semctl.S
deleted file mode 100644
index e215ed955..000000000
--- a/mdk-stage1/dietlibc/alpha/semctl.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(semctl,semctl)
diff --git a/mdk-stage1/dietlibc/alpha/semget.S b/mdk-stage1/dietlibc/alpha/semget.S
deleted file mode 100644
index 67f488546..000000000
--- a/mdk-stage1/dietlibc/alpha/semget.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(semget,semget)
diff --git a/mdk-stage1/dietlibc/alpha/semop.S b/mdk-stage1/dietlibc/alpha/semop.S
deleted file mode 100644
index 81b6fc606..000000000
--- a/mdk-stage1/dietlibc/alpha/semop.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(semop,semop)
diff --git a/mdk-stage1/dietlibc/alpha/send.S b/mdk-stage1/dietlibc/alpha/send.S
deleted file mode 100644
index cfd11be2a..000000000
--- a/mdk-stage1/dietlibc/alpha/send.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall_weak(send,send,__libc_send)
diff --git a/mdk-stage1/dietlibc/alpha/sendmsg.S b/mdk-stage1/dietlibc/alpha/sendmsg.S
deleted file mode 100644
index 14646ad68..000000000
--- a/mdk-stage1/dietlibc/alpha/sendmsg.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(sendmsg,sendmsg)
diff --git a/mdk-stage1/dietlibc/alpha/sendto.S b/mdk-stage1/dietlibc/alpha/sendto.S
deleted file mode 100644
index 17a033011..000000000
--- a/mdk-stage1/dietlibc/alpha/sendto.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall_weak(sendto,sendto,__libc_sendto)
diff --git a/mdk-stage1/dietlibc/alpha/seteuid.c b/mdk-stage1/dietlibc/alpha/seteuid.c
deleted file mode 100644
index a7cf47893..000000000
--- a/mdk-stage1/dietlibc/alpha/seteuid.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sys/types.h>
-#include <unistd.h>
-
-#undef seteuid
-int seteuid(uid_t euid) {
- return setreuid(-1,euid);
-}
diff --git a/mdk-stage1/dietlibc/alpha/setjmp.S b/mdk-stage1/dietlibc/alpha/setjmp.S
deleted file mode 100644
index 3768056be..000000000
--- a/mdk-stage1/dietlibc/alpha/setjmp.S
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <setjmp.h>
-
-.text
-.global __sigsetjmp
-__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 */
- stq $12, (JB_S3*8) ($16) /* s3 */
- stq $13, (JB_S4*8) ($16) /* s4 */
- stq $14, (JB_S5*8) ($16) /* s5 */
-
- stq $26, (JB_PC*8) ($16) /* ra */
- stq $fp, (JB_FP*8) ($16) /* fp */
- stq $1, (JB_SP*8) ($16) /* sp */
-
- stt $f2, (JB_F2*8) ($16) /* f2 */
- stt $f3, (JB_F3*8) ($16) /* f3 */
- stt $f4, (JB_F4*8) ($16) /* f4 */
- stt $f5, (JB_F5*8) ($16) /* f5 */
- stt $f6, (JB_F6*8) ($16) /* f6 */
- stt $f7, (JB_F7*8) ($16) /* f7 */
- stt $f8, (JB_F8*8) ($16) /* f8 */
- stt $f9, (JB_F9*8) ($16) /* f9 */
-
- br $26, __sigjmp_save /* call __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/setsockopt.S b/mdk-stage1/dietlibc/alpha/setsockopt.S
deleted file mode 100644
index e3fe1d321..000000000
--- a/mdk-stage1/dietlibc/alpha/setsockopt.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(setsockopt,setsockopt)
diff --git a/mdk-stage1/dietlibc/alpha/shmat.S b/mdk-stage1/dietlibc/alpha/shmat.S
deleted file mode 100644
index 51248173d..000000000
--- a/mdk-stage1/dietlibc/alpha/shmat.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(shmat,shmat)
diff --git a/mdk-stage1/dietlibc/alpha/shmctl.S b/mdk-stage1/dietlibc/alpha/shmctl.S
deleted file mode 100644
index d56caace4..000000000
--- a/mdk-stage1/dietlibc/alpha/shmctl.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(shmctl,shmctl)
diff --git a/mdk-stage1/dietlibc/alpha/shmdt.S b/mdk-stage1/dietlibc/alpha/shmdt.S
deleted file mode 100644
index d9812a799..000000000
--- a/mdk-stage1/dietlibc/alpha/shmdt.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(shmdt,shmdt)
diff --git a/mdk-stage1/dietlibc/alpha/shmget.S b/mdk-stage1/dietlibc/alpha/shmget.S
deleted file mode 100644
index 82914223f..000000000
--- a/mdk-stage1/dietlibc/alpha/shmget.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(shmget,shmget)
diff --git a/mdk-stage1/dietlibc/alpha/shutdown.S b/mdk-stage1/dietlibc/alpha/shutdown.S
deleted file mode 100644
index 9b5139325..000000000
--- a/mdk-stage1/dietlibc/alpha/shutdown.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(shutdown,shutdown)
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/socket.S b/mdk-stage1/dietlibc/alpha/socket.S
deleted file mode 100644
index 85401f56e..000000000
--- a/mdk-stage1/dietlibc/alpha/socket.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(socket,socket)
diff --git a/mdk-stage1/dietlibc/alpha/socketcall.S b/mdk-stage1/dietlibc/alpha/socketcall.S
deleted file mode 100644
index b150bd5d5..000000000
--- a/mdk-stage1/dietlibc/alpha/socketcall.S
+++ /dev/null
@@ -1,5 +0,0 @@
-#include "syscalls.h"
-
-/*
- * Doesn't exist on alpha ( accept, bind, ... are SYSCALLS !?! )
- */
diff --git a/mdk-stage1/dietlibc/alpha/start.S b/mdk-stage1/dietlibc/alpha/start.S
deleted file mode 100644
index 00b8e950d..000000000
--- a/mdk-stage1/dietlibc/alpha/start.S
+++ /dev/null
@@ -1,35 +0,0 @@
-#include "start.h"
-
-#ifdef __alpha__
-
-.text
-.align 2
- .set noreorder
-
-.global __start
-__start:
-.global _start
-_start:
- clr $fp /* clear frame pointer */
-
- br $gp,.Lstart /* set global pointer */
-.Lstart:
- ldgp $gp, 0($gp)
-
-/* prepare to call main */
- ldl $16, 0($sp) /* argc */
-
- lda $17, 8($sp) /* argv */
-
- addq $16, 1, $18 /* argp */
- s8addq $18, $17, $18 /* (8*(argc+1))+argv -> argp */
-
- stq $18, environ
-
- mov $0, $21 /* mov v0(dynload) to a5 */
-
- jsr $26, main
- mov $0, $16
- jsr $26, exit /* YES, CALL! for threads and atexit ! (+4 byte) */
-
-#endif
diff --git a/mdk-stage1/dietlibc/alpha/strlen.c b/mdk-stage1/dietlibc/alpha/strlen.c
deleted file mode 100644
index ac532254a..000000000
--- a/mdk-stage1/dietlibc/alpha/strlen.c
+++ /dev/null
@@ -1,32 +0,0 @@
-#include <string.h>
-
-static const unsigned long long magic = 0x0101010101010101LL;
-
-size_t strlen(const char *s)
-{
- const char *t = s;
- unsigned long long word;
-
- if (!s) return 0;
-
- /* Byte compare up until 64 bit word boundary */
- for (; ((unsigned long long) t & 7); t++)
- if (!*t) return t - s;
-
- /* Word compare */
- do {
- word = *((unsigned long long *) t); t += 8;
- word = (word - magic) &~ word;
- word &= (magic << 7);
- } while (word == 0);
-
- /* word & 0x8080808080808080 == word */
- word = (word - 1) & (magic << 8);
- word += (word << 32);
- word += (word << 16);
- word += (word << 8);
- t += word >> 56;
- return ((const char *) t) - 8 - s;
-}
-
-
diff --git a/mdk-stage1/dietlibc/alpha/time.S b/mdk-stage1/dietlibc/alpha/time.S
deleted file mode 100644
index e69de29bb..000000000
--- a/mdk-stage1/dietlibc/alpha/time.S
+++ /dev/null
diff --git a/mdk-stage1/dietlibc/alpha/unified.S b/mdk-stage1/dietlibc/alpha/unified.S
deleted file mode 100644
index 02a1c9bcd..000000000
--- a/mdk-stage1/dietlibc/alpha/unified.S
+++ /dev/null
@@ -1,29 +0,0 @@
-#include <dietfeatures.h>
-
-.global __unified_syscall
-__unified_syscall:
- callsys
- bne $19, .Lerror
- ret $31, ($26), 0x01
-
-.Lerror:
-.global error_unified_syscall
-error_unified_syscall:
-#ifdef WANT_THREAD_SAVE
- 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 */
-
- jsr $26, __errno_location /* call __errno_location */
-
- ldq $1, 8($sp) /* write old v0 to errno */
- stl $1, 0($0)
-
- lda $0, -1($31) /* new return value is -1 */
- ldq $26, 0($sp) /* restore return address */
- lda $sp, 16($sp) /* free 2 qwords on stack */
-#else
- lda $1, errno
- stl $0, 0($1)
-#endif
- ret $31, ($26), 0x01 /* return */
diff --git a/mdk-stage1/dietlibc/alpha/utime.S b/mdk-stage1/dietlibc/alpha/utime.S
deleted file mode 100644
index a9a8aada6..000000000
--- a/mdk-stage1/dietlibc/alpha/utime.S
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "syscalls.h"
-
-syscall(utimes,utime)
diff --git a/mdk-stage1/dietlibc/alpha/waitpid.S b/mdk-stage1/dietlibc/alpha/waitpid.S
deleted file mode 100644
index 6dc1c99db..000000000
--- a/mdk-stage1/dietlibc/alpha/waitpid.S
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <syscalls.h>
-
-.text
-.align 2
-.weak waitpid
-waitpid:
-.global __libc_waitpid
-__libc_waitpid:
- clr $19
- br wait4