]> Zhao Yanbai Git Server - minix.git/commitdiff
Convert library asm files to GAS syntax
authorArun Thomas <arun@minix3.org>
Wed, 3 Mar 2010 14:27:30 +0000 (14:27 +0000)
committerArun Thomas <arun@minix3.org>
Wed, 3 Mar 2010 14:27:30 +0000 (14:27 +0000)
302 files changed:
commands/i386/gas2ack/asm86.h
commands/i386/gas2ack/asmconv.h
commands/i386/gas2ack/emit_ack.c
commands/i386/gas2ack/gas2ack.c
commands/i386/gas2ack/parse_gnu.c
docs/UPDATING
etc/mk/minix.ack.mk
etc/mk/minix.gcc.mk
kernel/arch/i386/Makefile
kernel/arch/i386/apic_asm.S
kernel/arch/i386/klib386.S
lib/csu/Makefile
lib/csu/i386/crtso.S [new file with mode: 0644]
lib/csu/i386/crtso.s [deleted file]
lib/libc/arch/i386/int64/Makefile.inc
lib/libc/arch/i386/int64/add64.S [new file with mode: 0644]
lib/libc/arch/i386/int64/add64.s [deleted file]
lib/libc/arch/i386/int64/add64u.S [new file with mode: 0644]
lib/libc/arch/i386/int64/add64u.s [deleted file]
lib/libc/arch/i386/int64/cmp64.S [new file with mode: 0644]
lib/libc/arch/i386/int64/cmp64.s [deleted file]
lib/libc/arch/i386/int64/cv64u.S [new file with mode: 0644]
lib/libc/arch/i386/int64/cv64u.s [deleted file]
lib/libc/arch/i386/int64/cvu64.S [new file with mode: 0644]
lib/libc/arch/i386/int64/cvu64.s [deleted file]
lib/libc/arch/i386/int64/diff64.S [new file with mode: 0644]
lib/libc/arch/i386/int64/diff64.s [deleted file]
lib/libc/arch/i386/int64/div64u.S [new file with mode: 0644]
lib/libc/arch/i386/int64/div64u.s [deleted file]
lib/libc/arch/i386/int64/ex64.S [new file with mode: 0644]
lib/libc/arch/i386/int64/ex64.s [deleted file]
lib/libc/arch/i386/int64/make64.S [new file with mode: 0644]
lib/libc/arch/i386/int64/make64.s [deleted file]
lib/libc/arch/i386/int64/mul64u.S [new file with mode: 0644]
lib/libc/arch/i386/int64/mul64u.s [deleted file]
lib/libc/arch/i386/int64/sub64.S [new file with mode: 0644]
lib/libc/arch/i386/int64/sub64.s [deleted file]
lib/libc/arch/i386/int64/sub64u.S [new file with mode: 0644]
lib/libc/arch/i386/int64/sub64u.s [deleted file]
lib/libc/arch/i386/math/Makefile.inc
lib/libc/arch/i386/math/fpu_cw.S [new file with mode: 0644]
lib/libc/arch/i386/math/fpu_cw.s [deleted file]
lib/libc/arch/i386/math/fpu_round.S [new file with mode: 0644]
lib/libc/arch/i386/math/fpu_round.s [deleted file]
lib/libc/arch/i386/math/fpu_sw.S [new file with mode: 0644]
lib/libc/arch/i386/math/fpu_sw.s [deleted file]
lib/libc/arch/i386/misc/Makefile.inc
lib/libc/arch/i386/misc/_cpuid.S [new file with mode: 0644]
lib/libc/arch/i386/misc/_cpuid.s [deleted file]
lib/libc/arch/i386/misc/alloca.S [new file with mode: 0644]
lib/libc/arch/i386/misc/alloca.s [deleted file]
lib/libc/arch/i386/misc/get_bp.S [new file with mode: 0644]
lib/libc/arch/i386/misc/get_bp.s [deleted file]
lib/libc/arch/i386/misc/getprocessor.S [new file with mode: 0644]
lib/libc/arch/i386/misc/getprocessor.s [deleted file]
lib/libc/arch/i386/misc/io_inb.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_inb.s [deleted file]
lib/libc/arch/i386/misc/io_inl.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_inl.s [deleted file]
lib/libc/arch/i386/misc/io_insb.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_insb.s [deleted file]
lib/libc/arch/i386/misc/io_insl.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_insl.s [deleted file]
lib/libc/arch/i386/misc/io_insw.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_insw.s [deleted file]
lib/libc/arch/i386/misc/io_intr.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_intr.s [deleted file]
lib/libc/arch/i386/misc/io_inw.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_inw.s [deleted file]
lib/libc/arch/i386/misc/io_outb.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_outb.s [deleted file]
lib/libc/arch/i386/misc/io_outl.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_outl.s [deleted file]
lib/libc/arch/i386/misc/io_outsb.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_outsb.s [deleted file]
lib/libc/arch/i386/misc/io_outsl.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_outsl.s [deleted file]
lib/libc/arch/i386/misc/io_outsw.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_outsw.s [deleted file]
lib/libc/arch/i386/misc/io_outw.S [new file with mode: 0644]
lib/libc/arch/i386/misc/io_outw.s [deleted file]
lib/libc/arch/i386/misc/oneC_sum.S [new file with mode: 0644]
lib/libc/arch/i386/misc/oneC_sum.s [deleted file]
lib/libc/arch/i386/rts/Makefile.inc
lib/libc/arch/i386/rts/__sigreturn.S [new file with mode: 0644]
lib/libc/arch/i386/rts/__sigreturn.s [deleted file]
lib/libc/arch/i386/rts/_ipc.S [new file with mode: 0644]
lib/libc/arch/i386/rts/_ipc.s [deleted file]
lib/libc/arch/i386/rts/_senda.S [new file with mode: 0644]
lib/libc/arch/i386/rts/_senda.s [deleted file]
lib/libc/arch/i386/rts/brksize.S [new file with mode: 0644]
lib/libc/arch/i386/rts/brksize.s [deleted file]
lib/libc/arch/i386/string/Makefile.inc
lib/libc/arch/i386/string/_memmove.S [new file with mode: 0644]
lib/libc/arch/i386/string/_memmove.s [deleted file]
lib/libc/arch/i386/string/_strncat.S [new file with mode: 0644]
lib/libc/arch/i386/string/_strncat.s [deleted file]
lib/libc/arch/i386/string/_strncmp.S [new file with mode: 0644]
lib/libc/arch/i386/string/_strncmp.s [deleted file]
lib/libc/arch/i386/string/_strncpy.S [new file with mode: 0644]
lib/libc/arch/i386/string/_strncpy.s [deleted file]
lib/libc/arch/i386/string/_strnlen.S [new file with mode: 0644]
lib/libc/arch/i386/string/_strnlen.s [deleted file]
lib/libc/arch/i386/string/bcmp.S [new file with mode: 0644]
lib/libc/arch/i386/string/bcmp.s [deleted file]
lib/libc/arch/i386/string/bcopy.S [new file with mode: 0644]
lib/libc/arch/i386/string/bcopy.s [deleted file]
lib/libc/arch/i386/string/bzero.S [new file with mode: 0644]
lib/libc/arch/i386/string/bzero.s [deleted file]
lib/libc/arch/i386/string/index.S [new file with mode: 0644]
lib/libc/arch/i386/string/index.s [deleted file]
lib/libc/arch/i386/string/memchr.S [new file with mode: 0644]
lib/libc/arch/i386/string/memchr.s [deleted file]
lib/libc/arch/i386/string/memcmp.S [new file with mode: 0644]
lib/libc/arch/i386/string/memcmp.s [deleted file]
lib/libc/arch/i386/string/memcpy.S [new file with mode: 0644]
lib/libc/arch/i386/string/memcpy.s [deleted file]
lib/libc/arch/i386/string/memmove.S [new file with mode: 0644]
lib/libc/arch/i386/string/memmove.s [deleted file]
lib/libc/arch/i386/string/memset.S [new file with mode: 0644]
lib/libc/arch/i386/string/memset.s [deleted file]
lib/libc/arch/i386/string/rindex.S [new file with mode: 0644]
lib/libc/arch/i386/string/rindex.s [deleted file]
lib/libc/arch/i386/string/strcat.S [new file with mode: 0644]
lib/libc/arch/i386/string/strcat.s [deleted file]
lib/libc/arch/i386/string/strchr.S [new file with mode: 0644]
lib/libc/arch/i386/string/strchr.s [deleted file]
lib/libc/arch/i386/string/strcmp.S [new file with mode: 0644]
lib/libc/arch/i386/string/strcmp.s [deleted file]
lib/libc/arch/i386/string/strcpy.S [new file with mode: 0644]
lib/libc/arch/i386/string/strcpy.s [deleted file]
lib/libc/arch/i386/string/strlen.S [new file with mode: 0644]
lib/libc/arch/i386/string/strlen.s [deleted file]
lib/libc/arch/i386/string/strncat.S [new file with mode: 0644]
lib/libc/arch/i386/string/strncat.s [deleted file]
lib/libc/arch/i386/string/strncmp.S [new file with mode: 0644]
lib/libc/arch/i386/string/strncmp.s [deleted file]
lib/libc/arch/i386/string/strncpy.S [new file with mode: 0644]
lib/libc/arch/i386/string/strncpy.s [deleted file]
lib/libc/arch/i386/string/strnlen.S [new file with mode: 0644]
lib/libc/arch/i386/string/strnlen.s [deleted file]
lib/libc/arch/i386/string/strrchr.S [new file with mode: 0644]
lib/libc/arch/i386/string/strrchr.s [deleted file]
lib/libc/gnu/arch/i386/rts/Makefile.inc
lib/libc/gnu/arch/i386/rts/__setjmp.S [new file with mode: 0644]
lib/libc/gnu/arch/i386/rts/__setjmp.gs [deleted file]
lib/libc/gnu/arch/i386/rts/longjmp.S [new file with mode: 0644]
lib/libc/gnu/arch/i386/rts/longjmp.gs [deleted file]
lib/libc/syscall/Makefile.inc
lib/libc/syscall/_exit.S [moved from lib/libc/syscall/_exit.s with 51% similarity]
lib/libc/syscall/_pm_findproc.S [moved from lib/libc/syscall/_pm_findproc.s with 57% similarity]
lib/libc/syscall/access.S [moved from lib/libc/syscall/access.s with 52% similarity]
lib/libc/syscall/adddma.S [moved from lib/libc/syscall/adddma.s with 52% similarity]
lib/libc/syscall/alarm.S [moved from lib/libc/syscall/alarm.s with 51% similarity]
lib/libc/syscall/brk.S [new file with mode: 0644]
lib/libc/syscall/brk.s [deleted file]
lib/libc/syscall/cfgetispeed.S [moved from lib/libc/syscall/cfgetispeed.s with 57% similarity]
lib/libc/syscall/cfgetospeed.S [moved from lib/libc/syscall/cfgetospeed.s with 57% similarity]
lib/libc/syscall/cfsetispeed.S [moved from lib/libc/syscall/cfsetispeed.s with 57% similarity]
lib/libc/syscall/cfsetospeed.S [moved from lib/libc/syscall/cfsetospeed.s with 57% similarity]
lib/libc/syscall/chdir.S [moved from lib/libc/syscall/chdir.s with 60% similarity]
lib/libc/syscall/chmod.S [moved from lib/libc/syscall/chmod.s with 51% similarity]
lib/libc/syscall/chown.S [moved from lib/libc/syscall/chown.s with 51% similarity]
lib/libc/syscall/chroot.S [moved from lib/libc/syscall/chroot.s with 52% similarity]
lib/libc/syscall/close.S [moved from lib/libc/syscall/close.s with 51% similarity]
lib/libc/syscall/closedir.S [moved from lib/libc/syscall/closedir.s with 54% similarity]
lib/libc/syscall/cprofile.S [moved from lib/libc/syscall/cprofile.s with 54% similarity]
lib/libc/syscall/creat.S [moved from lib/libc/syscall/creat.s with 51% similarity]
lib/libc/syscall/deldma.S [moved from lib/libc/syscall/deldma.s with 52% similarity]
lib/libc/syscall/dup.S [new file with mode: 0644]
lib/libc/syscall/dup.s [deleted file]
lib/libc/syscall/dup2.S [moved from lib/libc/syscall/dup2.s with 50% similarity]
lib/libc/syscall/execl.S [moved from lib/libc/syscall/execl.s with 51% similarity]
lib/libc/syscall/execle.S [moved from lib/libc/syscall/execle.s with 52% similarity]
lib/libc/syscall/execlp.S [moved from lib/libc/syscall/execlp.s with 52% similarity]
lib/libc/syscall/execv.S [moved from lib/libc/syscall/execv.s with 51% similarity]
lib/libc/syscall/execve.S [moved from lib/libc/syscall/execve.s with 52% similarity]
lib/libc/syscall/execvp.S [moved from lib/libc/syscall/execvp.s with 52% similarity]
lib/libc/syscall/fchmod.S [moved from lib/libc/syscall/fchmod.s with 52% similarity]
lib/libc/syscall/fchown.S [moved from lib/libc/syscall/fchown.s with 52% similarity]
lib/libc/syscall/fcntl.S [moved from lib/libc/syscall/fcntl.s with 51% similarity]
lib/libc/syscall/fork.S [moved from lib/libc/syscall/fork.s with 50% similarity]
lib/libc/syscall/fpathconf.S [moved from lib/libc/syscall/fpathconf.s with 55% similarity]
lib/libc/syscall/fstat.S [moved from lib/libc/syscall/fstat.s with 51% similarity]
lib/libc/syscall/fstatfs.S [moved from lib/libc/syscall/fstatfs.s with 53% similarity]
lib/libc/syscall/getcwd.S [moved from lib/libc/syscall/getcwd.s with 52% similarity]
lib/libc/syscall/getdents.S [moved from lib/libc/syscall/getdents.s with 54% similarity]
lib/libc/syscall/getdma.S [moved from lib/libc/syscall/getdma.s with 52% similarity]
lib/libc/syscall/getegid.S [moved from lib/libc/syscall/getegid.s with 53% similarity]
lib/libc/syscall/geteuid.S [moved from lib/libc/syscall/geteuid.s with 53% similarity]
lib/libc/syscall/getgid.S [moved from lib/libc/syscall/getgid.s with 52% similarity]
lib/libc/syscall/getgroups.S [moved from lib/libc/syscall/getgroups.s with 55% similarity]
lib/libc/syscall/getitimer.S [new file with mode: 0644]
lib/libc/syscall/getitimer.s [deleted file]
lib/libc/syscall/getngid.S [moved from lib/libc/syscall/getngid.s with 53% similarity]
lib/libc/syscall/getnpid.S [moved from lib/libc/syscall/getnpid.s with 53% similarity]
lib/libc/syscall/getnprocnr.S [moved from lib/libc/syscall/getnprocnr.s with 56% similarity]
lib/libc/syscall/getnuid.S [moved from lib/libc/syscall/getnuid.s with 53% similarity]
lib/libc/syscall/getpgrp.S [moved from lib/libc/syscall/getpgrp.s with 53% similarity]
lib/libc/syscall/getpid.S [moved from lib/libc/syscall/getpid.s with 52% similarity]
lib/libc/syscall/getppid.S [moved from lib/libc/syscall/getppid.s with 53% similarity]
lib/libc/syscall/getpprocnr.S [moved from lib/libc/syscall/getpprocnr.s with 56% similarity]
lib/libc/syscall/getprocnr.S [moved from lib/libc/syscall/getprocnr.s with 55% similarity]
lib/libc/syscall/getsigset.S [moved from lib/libc/syscall/getsigset.s with 55% similarity]
lib/libc/syscall/getsysinfo.S [moved from lib/libc/syscall/getsysinfo.s with 64% similarity]
lib/libc/syscall/getuid.S [moved from lib/libc/syscall/getuid.s with 52% similarity]
lib/libc/syscall/ioctl.S [moved from lib/libc/syscall/ioctl.s with 51% similarity]
lib/libc/syscall/isatty.S [moved from lib/libc/syscall/isatty.s with 52% similarity]
lib/libc/syscall/kill.S [moved from lib/libc/syscall/kill.s with 50% similarity]
lib/libc/syscall/killpg.S [moved from lib/libc/syscall/killpg.s with 52% similarity]
lib/libc/syscall/link.S [moved from lib/libc/syscall/link.s with 50% similarity]
lib/libc/syscall/lseek.S [moved from lib/libc/syscall/lseek.s with 51% similarity]
lib/libc/syscall/lseek64.S [moved from lib/libc/syscall/lseek64.s with 53% similarity]
lib/libc/syscall/lstat.S [moved from lib/libc/syscall/lstat.s with 51% similarity]
lib/libc/syscall/mapdriver.S [moved from lib/libc/syscall/mapdriver.s with 55% similarity]
lib/libc/syscall/mkdir.S [moved from lib/libc/syscall/mkdir.s with 51% similarity]
lib/libc/syscall/mkfifo.S [moved from lib/libc/syscall/mkfifo.s with 52% similarity]
lib/libc/syscall/mknod.S [moved from lib/libc/syscall/mknod.s with 51% similarity]
lib/libc/syscall/mmap.S [moved from lib/libc/syscall/mmap.s with 64% similarity]
lib/libc/syscall/mount.S [moved from lib/libc/syscall/mount.s with 51% similarity]
lib/libc/syscall/nanosleep.S [moved from lib/libc/syscall/nanosleep.s with 61% similarity]
lib/libc/syscall/open.S [moved from lib/libc/syscall/open.s with 50% similarity]
lib/libc/syscall/opendir.S [moved from lib/libc/syscall/opendir.s with 53% similarity]
lib/libc/syscall/pathconf.S [moved from lib/libc/syscall/pathconf.s with 54% similarity]
lib/libc/syscall/pause.S [moved from lib/libc/syscall/pause.s with 51% similarity]
lib/libc/syscall/pipe.S [moved from lib/libc/syscall/pipe.s with 50% similarity]
lib/libc/syscall/ptrace.S [moved from lib/libc/syscall/ptrace.s with 52% similarity]
lib/libc/syscall/read.S [moved from lib/libc/syscall/read.s with 50% similarity]
lib/libc/syscall/readdir.S [moved from lib/libc/syscall/readdir.s with 53% similarity]
lib/libc/syscall/readlink.S [moved from lib/libc/syscall/readlink.s with 54% similarity]
lib/libc/syscall/reboot.S [moved from lib/libc/syscall/reboot.s with 52% similarity]
lib/libc/syscall/rename.S [moved from lib/libc/syscall/rename.s with 52% similarity]
lib/libc/syscall/rewinddir.S [moved from lib/libc/syscall/rewinddir.s with 55% similarity]
lib/libc/syscall/rmdir.S [moved from lib/libc/syscall/rmdir.s with 51% similarity]
lib/libc/syscall/sbrk.S [moved from lib/libc/syscall/sbrk.s with 50% similarity]
lib/libc/syscall/seekdir.S [moved from lib/libc/syscall/seekdir.s with 53% similarity]
lib/libc/syscall/select.S [moved from lib/libc/syscall/select.s with 52% similarity]
lib/libc/syscall/setgid.S [moved from lib/libc/syscall/setgid.s with 55% similarity]
lib/libc/syscall/setgroups.S [moved from lib/libc/syscall/setgroups.s with 55% similarity]
lib/libc/syscall/setitimer.S [new file with mode: 0644]
lib/libc/syscall/setitimer.s [deleted file]
lib/libc/syscall/setsid.S [moved from lib/libc/syscall/setsid.s with 52% similarity]
lib/libc/syscall/setuid.S [moved from lib/libc/syscall/setuid.s with 55% similarity]
lib/libc/syscall/sigaction.S [moved from lib/libc/syscall/sigaction.s with 55% similarity]
lib/libc/syscall/sigaddset.S [moved from lib/libc/syscall/sigaddset.s with 55% similarity]
lib/libc/syscall/sigdelset.S [moved from lib/libc/syscall/sigdelset.s with 55% similarity]
lib/libc/syscall/sigemptyset.S [moved from lib/libc/syscall/sigemptyset.s with 57% similarity]
lib/libc/syscall/sigfillset.S [moved from lib/libc/syscall/sigfillset.s with 56% similarity]
lib/libc/syscall/sigismember.S [moved from lib/libc/syscall/sigismember.s with 57% similarity]
lib/libc/syscall/sigpending.S [moved from lib/libc/syscall/sigpending.s with 56% similarity]
lib/libc/syscall/sigprocmask.S [moved from lib/libc/syscall/sigprocmask.s with 57% similarity]
lib/libc/syscall/sigreturn.S [moved from lib/libc/syscall/sigreturn.s with 55% similarity]
lib/libc/syscall/sigsuspend.S [moved from lib/libc/syscall/sigsuspend.s with 56% similarity]
lib/libc/syscall/sleep.S [moved from lib/libc/syscall/sleep.s with 50% similarity]
lib/libc/syscall/sprofile.S [moved from lib/libc/syscall/sprofile.s with 54% similarity]
lib/libc/syscall/stat.S [moved from lib/libc/syscall/stat.s with 50% similarity]
lib/libc/syscall/stime.S [moved from lib/libc/syscall/stime.s with 51% similarity]
lib/libc/syscall/svrctl.S [moved from lib/libc/syscall/svrctl.s with 52% similarity]
lib/libc/syscall/symlink.S [moved from lib/libc/syscall/symlink.s with 53% similarity]
lib/libc/syscall/sync.S [moved from lib/libc/syscall/sync.s with 50% similarity]
lib/libc/syscall/sysuname.S [moved from lib/libc/syscall/sysuname.s with 54% similarity]
lib/libc/syscall/tcdrain.S [moved from lib/libc/syscall/tcdrain.s with 53% similarity]
lib/libc/syscall/tcflow.S [moved from lib/libc/syscall/tcflow.s with 52% similarity]
lib/libc/syscall/tcflush.S [moved from lib/libc/syscall/tcflush.s with 53% similarity]
lib/libc/syscall/tcgetattr.S [moved from lib/libc/syscall/tcgetattr.s with 55% similarity]
lib/libc/syscall/tcsendbreak.S [moved from lib/libc/syscall/tcsendbreak.s with 57% similarity]
lib/libc/syscall/tcsetattr.S [moved from lib/libc/syscall/tcsetattr.s with 55% similarity]
lib/libc/syscall/time.S [moved from lib/libc/syscall/time.s with 50% similarity]
lib/libc/syscall/times.S [moved from lib/libc/syscall/times.s with 51% similarity]
lib/libc/syscall/truncate.S [moved from lib/libc/syscall/truncate.s with 59% similarity]
lib/libc/syscall/umask.S [moved from lib/libc/syscall/umask.s with 51% similarity]
lib/libc/syscall/umount.S [moved from lib/libc/syscall/umount.s with 52% similarity]
lib/libc/syscall/uname.S [moved from lib/libc/syscall/uname.s with 51% similarity]
lib/libc/syscall/unlink.S [moved from lib/libc/syscall/unlink.s with 52% similarity]
lib/libc/syscall/utime.S [moved from lib/libc/syscall/utime.s with 51% similarity]
lib/libc/syscall/vm_dmacalls.S [moved from lib/libc/syscall/vm_dmacalls.s with 65% similarity]
lib/libc/syscall/vm_getphys.S [moved from lib/libc/syscall/vm_getphys.s with 56% similarity]
lib/libc/syscall/vm_getrefcount.S [moved from lib/libc/syscall/vm_getrefcount.s with 59% similarity]
lib/libc/syscall/vm_query_exit.S [new file with mode: 0644]
lib/libc/syscall/vm_query_exit.s [deleted file]
lib/libc/syscall/vm_remap.S [moved from lib/libc/syscall/vm_remap.s with 54% similarity]
lib/libc/syscall/vm_set_priv.S [new file with mode: 0644]
lib/libc/syscall/vm_set_priv.s [deleted file]
lib/libc/syscall/vm_unmap.S [moved from lib/libc/syscall/vm_unmap.s with 54% similarity]
lib/libc/syscall/wait.S [moved from lib/libc/syscall/wait.s with 50% similarity]
lib/libc/syscall/waitpid.S [moved from lib/libc/syscall/waitpid.s with 53% similarity]
lib/libc/syscall/write.S [moved from lib/libc/syscall/write.s with 51% similarity]
lib/libend/Makefile
lib/libend/edata.S [new file with mode: 0644]
lib/libend/edata.s [deleted file]
lib/libend/em_end.S [new file with mode: 0644]
lib/libend/em_end.s [deleted file]
lib/libend/end.S [new file with mode: 0644]
lib/libend/end.s [deleted file]
lib/libend/etext.S [new file with mode: 0644]
lib/libend/etext.s [deleted file]
lib/libend/gnu/Makefile.inc
lib/libend/gnu/gnu_end.S [moved from lib/libend/gnu/gnu_end.gs with 100% similarity]
lib/libsys/Makefile
lib/libsys/read_tsc.S [new file with mode: 0644]
lib/libsys/read_tsc.s [deleted file]
servers/hgfs/libhgfs/Makefile

index a71bc811bc5b79293505e57dbcfe2e2e75acb23e..80a1b2857dd04220a3e6fa39737341c1d02841c4 100644 (file)
@@ -97,7 +97,7 @@ typedef enum opcode { /* 80486 opcodes, from the i486 reference manual.
        FSIN,
        FSINCOS,
        FSQRT,
-       FSTD,   FSTS,   FSTPX,  FSTPD,  FSTPS,
+       FSTD,   FSTS,   FSTP,   FSTPX,  FSTPD,  FSTPS,
        FSTCW,
        FSTENV,
        FSTSW,
index 4ef2eaae204cc3b6d4b51ff3c049000758c7020d..061551e5ad18eec6f405cf1ba0b26b2b4d3d966b 100644 (file)
@@ -14,11 +14,15 @@ char *copystr(const char *s);
 int isanumber(const char *s);
 
 extern int asm_mode32; /* In 32 bit mode if true. */
+extern int prepend_underscores; /* Prepend underscores to symbols */
 
 #define use16()                (!asm_mode32)
 #define use32()                ((int) asm_mode32)
 #define set_use16()    ((void) (asm_mode32= 0))
 #define set_use32()    ((void) (asm_mode32= 1))
 
+#define underscore_mode() (prepend_underscores)
+#define enable_underscore_mode() ((void)(prepend_underscores= 1))
+
 extern int err_code;   /* Exit code. */
 #define set_error()    ((void) (err_code= EXIT_FAILURE))
index 0dd8789047a63af5459d40abf5f734147948069a..dac676da3a575f7165aa0d4b70f43389b7f034eb 100644 (file)
@@ -160,6 +160,7 @@ static mnemonic_t mnemtab[] = {
        { FSTCW,        "fstcw"         },
        { FSTD,         "fstd"          },
        { FSTENV,       "fstenv"        },
+       { FSTP,         "fstp"          },
        { FSTPD,        "fstpd"         },
        { FSTPS,        "fstps"         },
        { FSTPX,        "fstpx"         },
@@ -311,6 +312,8 @@ static mnemonic_t mnemtab[] = {
 };
 
 #define farjmp(o)      ((o) == JMPF || (o) == CALLF)
+#define data_op(o) ((o) == DOT_DATA1 || (o) == DOT_DATA2 || (o) == DOT_DATA4)
+#define define_op(o) ((o) == DOT_DEFINE)
 
 static FILE *ef;
 static long eline= 1;
@@ -393,11 +396,15 @@ static void ack_put_expression(asm86_t *a, expression_t *e, int deref)
 
        assert(e != nil);
 
-       isglob = syms_is_global(e->name);
+   if (underscore_mode())
+      isglob = syms_is_global(e->name);
+   else
+      isglob = 0;
 
        switch (e->operator) {
        case ',':
-               if (dialect == NCC && farjmp(a->opcode)) {
+      if (data_op(a->opcode) || define_op(a->opcode)
+                 || (dialect == NCC && farjmp(a->opcode))) {
                        /* ACK jmpf seg:off  ->  NCC jmpf off,seg */
                        ack_put_expression(a, e->right, deref);
                        ack_printf(", ");
@@ -546,7 +553,7 @@ void ack_emit_instruction(asm86_t *a)
        } else
        if (a->opcode == DOT_LABEL) {
                assert(a->args->operator == ':');
-               if (syms_is_global(a->args->name))
+               if (underscore_mode() && syms_is_global(a->args->name))
                        ack_printf("_%s:", a->args->name);
                else
                        ack_printf("%s:", a->args->name);
@@ -599,7 +606,7 @@ void ack_emit_instruction(asm86_t *a)
                        && a->args->operator == ','
                        && a->args->left->operator == 'W'
                ) {
-                       if (syms_is_global(a->args->left->name))
+                       if (underscore_mode() && syms_is_global(a->args->left->name))
                                ack_printf(".define\t_%s; ", a->args->left->name);
                        else
                                ack_printf(".define\t%s; ", a->args->left->name);
@@ -668,7 +675,9 @@ void ack_emit_instruction(asm86_t *a)
                /* we are translating from GNU */
                if (a->args && a->args->operator == ','
                                /* don't swap ljmp prefixed with segment */
-                               && a->opcode != JMPF) {
+                               && a->opcode != JMPF
+                               && !data_op(a->opcode)
+                               && !define_op(a->opcode)) {
                        expression_t * tmp;
 
                        tmp = a->args->right;
index 422e50a6672090402e34f1f10d93152197ecde5b..2b6088d1644e403b36ca16295e3acf835b7a0f14 100644 (file)
@@ -10,6 +10,7 @@ static char version[] = "1.11";
 #include <string.h>
 #include <errno.h>
 #include <assert.h>
+#include <getopt.h>
 #include "asmconv.h"
 #include "asm86.h"
 #include "languages.h"
@@ -55,6 +56,8 @@ int isanumber(const char *s)
 /* "Invisible" globals. */
 int asm_mode32= (sizeof(int) == 4);
 int err_code= EXIT_SUCCESS;
+/* Prepend underscores to symbols */
+int prepend_underscores = 0;
 
 int main(int argc, char **argv)
 {
@@ -65,28 +68,40 @@ int main(int argc, char **argv)
        char *lang_parse, *lang_emit, *input_file, *output_file;
        asm86_t *instr;
        char banner[80];
-
-       if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'm') {
-               if (strcmp(argv[1], "-mi86") == 0) {
-                       set_use16();
-               } else
-               if (strcmp(argv[1], "-mi386") == 0) {
-                       set_use32();
-               } else {
-                       fprintf(stderr, "asmconv: '%s': unknown machine\n",
-                               argv[1]+2);
-               }
-               argc--;
-               argv++;
-       }
-
-       if (argc > 3) {
+       char c;
+       opterr = 0;
+
+   while ((c = getopt (argc, argv, "m:u")) != -1)
+      switch (c)
+      {
+      case 'm':
+         if (strcmp(optarg, "i86") == 0) {
+            set_use16();
+         } else
+         if (strcmp(optarg, "i386") == 0) {
+            set_use32();
+         }
+         else {
+            fprintf(stderr, "asmconv: '%s': unknown machine\n",
+                    optarg);
+            exit(EXIT_FAILURE);
+         }
+         break;
+      case 'u':
+         enable_underscore_mode();
+         break;
+      default:
+         fprintf(stderr, "Usage: gas2ack [input-file [output-file]]\n");
+         exit(EXIT_FAILURE);
+      }
+
+       if ((argc - optind < 1) || (argc - optind  > 2)) {
                fprintf(stderr, "Usage: gas2ack [input-file [output-file]]\n");
                exit(EXIT_FAILURE);
        }
 
-       input_file= argc < 1 ? nil : argv[1];
-       output_file= argc < 2 ? nil : argv[2];
+       input_file= (argc - optind) < 1 ? nil : argv[optind];
+       output_file= (argc - optind) < 2 ? nil : argv[optind+1];
 
        parse_init= gnu_parse_init;
        get_instruction= gnu_get_instruction;
index 07a16563201b6447d2bcfe55bd457e2071726f95..4d7f5c4f5acd00a48af0b4e3ada18412a91eedfe 100644 (file)
@@ -20,7 +20,12 @@ typedef struct mnemonic {    /* GNU as86 mnemonics translation table. */
        optype_t        optype;
 } mnemonic_t;
 
-static mnemonic_t mnemtab[] = {                        /* This array is sorted. */
+/***************************************************************
+  *                                                            *
+  * NOTE: You MUST keep this array sorted by the first column. *
+  *                                                            *
+  **************************************************************/
+static mnemonic_t mnemtab[] = {
        { ".ascii",     DOT_ASCII,      PSEUDO },
        { ".asciz",     DOT_ASCIZ,      PSEUDO },
        { ".assert",    DOT_ASSERT,     PSEUDO },
@@ -30,9 +35,6 @@ static mnemonic_t mnemtab[] = {                       /* This array is sorted. */
        { ".byte",      DOT_DATA1,      PSEUDO },
        { ".comm",      DOT_COMM,       PSEUDO },
        { ".data",      DOT_DATA,       PSEUDO },
-       { ".data1",     DOT_DATA1,      PSEUDO },
-       { ".data2",     DOT_DATA2,      PSEUDO },
-       { ".data4",     DOT_DATA4,      PSEUDO },
        { ".end",       DOT_END,        PSEUDO },
        { ".extern",    DOT_EXTERN,     PSEUDO },
        { ".file",      DOT_FILE,       PSEUDO },
@@ -85,10 +87,9 @@ static mnemonic_t mnemtab[] = {                      /* This array is sorted. */
        { "cmc",        CMC,            WORD },
        { "cmpb",       CMP,            BYTE },
        { "cmpl",       CMP,            WORD },
-       { "cmps",       CMPS,           WORD },
        { "cmpsb",      CMPS,           BYTE },
-       { "cmpsl",      CMPS,           OWORD },
-       { "cmpsw",      CMPS,           WORD },
+       { "cmpsl",      CMPS,           WORD },
+       { "cmpsw",      CMPS,           OWORD },
        { "cmpw",       CMP,            OWORD },
        { "cmpxchg",    CMPXCHG,        WORD },
        { "cpuid",      CPUID,          WORD },
@@ -152,8 +153,8 @@ static mnemonic_t mnemtab[] = {                     /* This array is sorted. */
        { "fisubs",     FISUBS,         WORD },
        { "fld1",       FLD1,           WORD },
        { "fldcw",      FLDCW,          WORD },
-       { "fldd",       FLDD,           WORD },
        { "fldenv",     FLDENV,         WORD },
+       { "fldl",       FLDD,           WORD },
        { "fldl2e",     FLDL2E,         WORD },
        { "fldl2t",     FLDL2T,         WORD },
        { "fldlg2",     FLDLG2,         WORD },
@@ -170,8 +171,8 @@ static mnemonic_t mnemtab[] = {                     /* This array is sorted. */
        { "fnop",       FNOP,           WORD },
        { "fnsave",     FNSAVE,         WORD },
        { "fnstcw",     FNSTCW,         WORD },
-       { "fnstsw",     FNSTSW,         WORD },
        { "fnstenv",    FSTENV,         WORD },
+       { "fnstsw",     FNSTSW,         WORD },
        { "fpatan",     FPATAN,         WORD },
        { "fprem",      FPREM,          WORD },
        { "fprem1",     FPREM1,         WORD },
@@ -183,12 +184,13 @@ static mnemonic_t mnemtab[] = {                   /* This array is sorted. */
        { "fsin",       FSIN,           WORD },
        { "fsincos",    FSINCOS,        WORD },
        { "fsqrt",      FSQRT,          WORD },
+       { "fstcw",      FSTCW,          WORD },
        { "fstd",       FSTD,           WORD },
-       { "fstpd",      FSTPD,          WORD },
+       { "fstp",       FSTP,           WORD },
+       { "fstpl",      FSTPD,          WORD },
        { "fstps",      FSTPS,          WORD },
        { "fstpx",      FSTPX,          WORD },
        { "fsts",       FSTS,           WORD },
-       { "fstcw",      FSTCW,          WORD },
        { "fstsw",      FSTSW,          WORD },
        { "fsubd",      FSUBD,          WORD },
        { "fsubp",      FSUBP,          WORD },
@@ -697,6 +699,7 @@ static expression_t *gnu_get_oplist(asm86_t * a, int *pn, int deref)
        token_t *t;
        int sreg;
 
+
        if ((e= gnu_get_operand(a, pn, deref)) == nil) return nil;
 
        t = get_token(*pn);
@@ -862,13 +865,16 @@ static asm86_t *gnu_get_statement(void)
                break;
        case DOT_DEFINE:
        case DOT_EXTERN:
-               syms_add_global_csl(a->args);
+      if (underscore_mode())
+         syms_add_global_csl(a->args);
                break;
        case DOT_COMM:
-               syms_add_global(a->args->left->name);
+      if (underscore_mode())
+          syms_add_global(a->args->left->name);
                break;
        case DOT_LCOMM:
-               syms_add(a->args->left->name);
+      if(underscore_mode())
+         syms_add(a->args->left->name);
                break;
        case JMPF:
        case CALLF:
@@ -940,7 +946,8 @@ asm86_t *gnu_get_instruction(void)
                a->args= e= new_expr();
                e->operator= ':';
                e->name= copystr(t->name);
-               syms_add(t->name);
+      if (underscore_mode())
+         syms_add(t->name);
                skip_token(2);
        } else
        if (t->type == T_WORD && get_token(1)->symbol == '=') {
@@ -971,7 +978,8 @@ asm86_t *gnu_get_instruction(void)
                        a->args= new_expr();
                        a->args->operator= '=';
                        a->args->name= copystr(t->name);
-                       syms_add(t->name);
+         if (underscore_mode())
+            syms_add(t->name);
                        a->args->middle= e;
                        skip_token(n+1);
                }
index a5e84ed315da67ddf015a57380def4a3dc3a2ca0..40dbef8d48e4fe609566cc1fe6bf2ac1f1c870bf 100644 (file)
@@ -1,3 +1,5 @@
+20100303:
+        Gas2ack updates: Run 'make install' in commands/i386/gas2ack
 20100215:
         Make(1) has been replaced: Run 'make install' in commands/make
         Mkdep updates: Copy commands/scripts/mkdep.sh to /usr/bin/mkdep
index d2fef931f8261bdce1bb27f3df3e2f398ca17bd2..1e5f310a1e3deaa708d6f0836a63f7f8332612f4 100644 (file)
@@ -1,4 +1,4 @@
-.SUFFIXES:     .o .e
+.SUFFIXES:     .o .e .S
 
 # Treated like a C file
 .e.o:
@@ -8,3 +8,15 @@
 #      ${OBJCOPY} -x ${.TARGET}
 # .endif
 
+ASMCONV=gas2ack
+AFLAGS+=-D__ASSEMBLY__ -D_EM_WSIZE=4 -D__minix -I/usr/src/include -w -wo
+CPP.s=${CC} -E ${AFLAGS}
+ASMCONVFLAGS+=-mi386
+
+# Need to convert ACK assembly files to GNU assembly before building
+.S.o:
+       ${_MKTARGET_COMPILE}
+       ${CPP.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.PREFIX}.gnu.s
+       ${ASMCONV} ${ASMCONVFLAGS} ${.PREFIX}.gnu.s ${.PREFIX}.ack.s
+       ${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.PREFIX}.ack.s -o ${.TARGET}
+       rm -rf ${.PREFIX}.ack.s ${.PREFIX}.gnu.s
index 02ce960c45a5059e1088c2f1983a9f4a4d49640b..e08d92fd8a659b3730379f0a9158fa60d3a64998 100644 (file)
@@ -1,9 +1,8 @@
-.SUFFIXES:     .o .s .gs
+.SUFFIXES:     .o .s
 
 ASMCONV=asmconv
 CPP.s=${CC} ${AFLAGS} -E -x assembler-with-cpp
 ASMCONVFLAGS+=-mi386 ack gnu
-ASSEMBLE=gas ${AFLAGS}
 
 # Need to convert ACK assembly files to GNU assembly before building
 .s.o:
@@ -12,8 +11,3 @@ ASSEMBLE=gas ${AFLAGS}
        ${ASMCONV} ${ASMCONVFLAGS} ${.PREFIX}.ack.s ${.PREFIX}.gnu.s
        ${COMPILE.s} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.PREFIX}.gnu.s -o ${.TARGET}
        rm -rf ${.PREFIX}.ack.s ${.PREFIX}.gnu.s
-
-# GNU Assembly file
-.gs.o:
-       ${_MKTARGET_COMPILE}
-       ${ASSEMBLE} ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC} -o ${.TARGET}
index 770fe661f718c51e7e7a2ae7f303b224d3533c0b..69eb7601715e3b64a64ec9c335f7ff492a997bb9 100644 (file)
@@ -43,17 +43,17 @@ clean:
 # How to build it
 klib386.o: klib386.S
        $(CC) $(CFLAGS)  -E -D__ASSEMBLY__ -o $@.tmp $<
-       gas2ack $@.tmp $@.s
+       gas2ack -u $@.tmp $@.s
        $(CC) $(CFLAGS) -c -o $@ $@.s
 
 mpx386.o: mpx386.S
        $(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
-       gas2ack $@.tmp $@.s
+       gas2ack -u $@.tmp $@.s
        $(CC) $(CFLAGS) -c -o $@ $@.s
 
 apic_asm.o: apic_asm.S
        $(CC) $(CFLAGS) -E -D__ASSEMBLY__ -o $@.tmp $<
-       gas2ack $@.tmp $@.s
+       gas2ack -u $@.tmp $@.s
        $(CC) $(CFLAGS) -c -o $@ $@.s
 
 $(HEAD): mpx386.o
index 4025b56db3d71e66726f5d0ccde9048e115ea81f..6c2cef6ac1dedb9e76a370572390998c53c26d4f 100644 (file)
@@ -20,6 +20,7 @@
 .globl apic_hwint14
 .globl apic_hwint15
 
+.text
 #define APIC_IRQ_HANDLER(irq)  \
        push    $irq                                                            ;\
        call    irq_handle              /* intr_handle(irq_handlers[irq]) */    ;\
index 065c62de2c0c766c94561207b0ac470bb36eb29c..93b8a8f571bdbf6be59d54d86c6d253e0c4debfc 100644 (file)
@@ -1,6 +1,5 @@
 /* sections */
 
-.text; .data; .data; .bss
 
 #include <minix/config.h>
 #include <minix/const.h>
index ee4a75b385705ba6f37a643bd97cef5021cb57e8..038865eda74d3dd426698257ad965501b7d2bce7 100644 (file)
@@ -4,7 +4,7 @@
 
 AFLAGS+=       -O -D_MINIX -D_POSIX_SOURCE
 
-SRCS=  crtso.s
+SRCS=  crtso.S
 OBJS=  crtso.o
 
 realall: ${OBJS}
diff --git a/lib/csu/i386/crtso.S b/lib/csu/i386/crtso.S
new file mode 100644 (file)
index 0000000..1938532
--- /dev/null
@@ -0,0 +1,121 @@
+/* This is the C run-time start-off routine.  It's job is to take the */
+/* arguments as put on the stack by EXEC, and to parse them and set them up the */
+/* way _main expects them. */
+/* It also initializes environ when this variable isn't defined by the */
+/* programmer.  The detection of whether environ belong to us is rather */
+/* simplistic.  We simply check for some magic value, but there is no other */
+/* way. */
+
+#include <sys/vm_i386.h>
+
+
+.globl begtext, begdata, begbss
+.text
+begtext:
+#ifdef __ACK__
+.rom
+#else
+.data
+#endif
+begrom:
+.data
+begdata:
+.bss
+begbss:
+
+.globl crtso, __penviron, __penvp, __fpu_present
+.globl __minix_datastart, __minix_mainjump, __minix_unmapzero
+.extern        _main, _exit
+
+#if defined(__ELF__)
+.section .init
+#else
+.text
+#endif
+
+#if defined(__ELF__)
+.globl __start
+__start:
+#endif
+crtso:
+       xorl    %ebp, %ebp      /* clear for backtrace of core files */
+       movl    (%esp), %eax    /* argc */
+       leal    4(%esp), %edx   /* argv */
+       leal    8(%esp,%eax,4), %ecx    /* envp */
+
+/* Test if environ is in the initialized data area and is set to our */
+/* magic number.  If so then it is not redefined by the user. */
+       movl    $_environ, %ebx
+       cmpl    $__edata, %ebx  /* within initialized data? */
+       jae     0f
+       testb   $3, %bl /* aligned? */
+       jne     0f
+       cmpl    $0x53535353, (%ebx)     /* is it our environ? */
+       jne     0f
+       movl    %ebx, __penviron        /* _penviron = &environ; */
+0:
+       movl    __penviron, %ebx
+       movl    %ecx, (%ebx)    /* *_penviron = envp; */
+
+       push    %ecx    /* push envp */
+       push    %edx    /* push argv */
+       push    %eax    /* push argc */
+
+/* Test the EM bit of the MSW to determine if an FPU is present and */
+/* set __fpu_present if one is found. */
+       smsw    %ax
+       testb   $0x4, %al       /* EM bit in MSW */
+       sete    __fpu_present   /* True if not set */
+       jmp     __minix_mainjump
+
+.balign I386_PAGE_SIZE
+__minix_mainjump:
+       /* unmap zero pages */
+       call    __minix_unmapzero
+
+       call    _main   /* main(argc, argv, envp) */
+
+       push    %eax    /* push exit status */
+       call    _exit
+
+       hlt     /* force a trap if exit fails */
+
+__minix_unmapzero:
+
+       /* unmap 0-page code */
+       push    $I386_PAGE_SIZE
+       push    $crtso
+       call    _munmap_text            /* unmap_text(crtso, I386_PAGE_SIZE) */
+       add     $8, %esp
+
+#ifdef __ACK__
+       /*
+        * ack uses separate segments for text and data by default. We have a
+        * common segment when compiling using any other compiler
+        */
+
+       /* unmap 0-page data */
+       push    $I386_PAGE_SIZE
+       push    $romstart
+       call    _munmap                 /* munmap(romstart, I386_PAGE_SIZE) */
+       add     $8, %esp
+#endif
+
+       ret
+
+#ifdef __ACK__
+.rom
+romstart:
+.space I386_PAGE_SIZE
+__minix_datastart:
+.space 4
+#endif
+.data
+__penviron:
+.long  __penvp /* Pointer to environ, or hidden pointer */
+
+.bss
+.lcomm __penvp, 4      /* Hidden environment vector */
+.lcomm __fpu_present, 4        /* FPU present flag */
+
+.extern        endtext /* Force loading of end labels. */
diff --git a/lib/csu/i386/crtso.s b/lib/csu/i386/crtso.s
deleted file mode 100644 (file)
index c78cab1..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-#
-! This is the C run-time start-off routine.  It's job is to take the
-! arguments as put on the stack by EXEC, and to parse them and set them up the
-! way _main expects them.
-! It also initializes _environ when this variable isn't defined by the
-! programmer.  The detection of whether _environ belong to us is rather
-! simplistic.  We simply check for some magic value, but there is no other
-! way.
-
-#include <sys/vm_i386.h>
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.define begtext, begdata, begbss
-.sect .text
-begtext:
-.sect .rom
-begrom:
-.sect .data
-begdata:
-.sect .bss
-begbss:
-
-.define crtso, __penviron, __penvp, __fpu_present
-.define __minix_datastart, __minix_mainjump, __minix_unmapzero
-.extern _main, _exit
-.sect .text
-crtso:
-       xor     ebp, ebp                ! clear for backtrace of core files
-       mov     eax, (esp)              ! argc
-       lea     edx, 4(esp)             ! argv
-       lea     ecx, 8(esp)(eax*4)      ! envp
-
-       ! Test if environ is in the initialized data area and is set to our
-       ! magic number.  If so then it is not redefined by the user.
-       mov     ebx, _environ
-       cmp     ebx, __edata            ! within initialized data?
-       jae     0f
-       testb   bl, 3                   ! aligned?
-       jnz     0f
-       cmp     (ebx), 0x53535353       ! is it our _environ?
-       jne     0f
-       mov     (__penviron), ebx       ! _penviron = &environ;
-0:     mov     ebx, (__penviron)
-       mov     (ebx), ecx              ! *_penviron = envp;
-
-       push    ecx                     ! push envp
-       push    edx                     ! push argv
-       push    eax                     ! push argc
-
-       ! Test the EM bit of the MSW to determine if an FPU is present and
-       ! set __fpu_present if one is found.
-       smsw    ax
-       testb   al, 0x4                 ! EM bit in MSW
-       setz    (__fpu_present)         ! True if not set
-       jmp __minix_mainjump
-
-.align I386_PAGE_SIZE
-__minix_mainjump:
-       ! unmap zero pages
-       call    __minix_unmapzero
-
-       call    _main                   ! main(argc, argv, envp)
-
-       push    eax                     ! push exit status
-       call    _exit
-
-       hlt                             ! force a trap if exit fails
-
-__minix_unmapzero:
-
-       ! unmap 0-page code
-       push    I386_PAGE_SIZE
-       push    crtso
-       call    _munmap_text            ! munmap_text(crtso, I386_PAGE_SIZE)
-       add     esp, 8
-
-       ! unmap 0-page data
-       push    I386_PAGE_SIZE
-       push    romstart
-       call    _munmap                 ! munmap(romstart, I386_PAGE_SIZE)
-       add     esp, 8
-
-       ret
-
-.sect .rom
-romstart:
-       .space  I386_PAGE_SIZE
-__minix_datastart:
-       .space  4
-.sect .data
-__penviron:
-       .data4  __penvp                 ! Pointer to environ, or hidden pointer
-
-.sect .bss
-       .comm   __penvp, 4              ! Hidden environment vector
-       .comm   __fpu_present, 4        ! FPU present flag
-
-.extern endtext                                ! Force loading of end labels.
index 259af772c9a871dc1b631ff5943eebfb9417174f..60e5a72487bd1a50de30cd92c3b9b8373f786211 100644 (file)
@@ -2,15 +2,15 @@
 .PATH: ${.CURDIR}/arch/${ARCH}/int64
 
 SRCS+=  \
-       add64.s \
-       add64u.s \
-       cmp64.s \
-       cv64u.s \
-       cvu64.s \
-       diff64.s \
-       div64u.s \
-       ex64.s \
-       make64.s \
-       mul64u.s \
-       sub64.s \
-       sub64u.s
+       add64.S \
+       add64u.S \
+       cmp64.S \
+       cv64u.S \
+       cvu64.S \
+       diff64.S \
+       div64u.S \
+       ex64.S \
+       make64.S \
+       mul64u.S \
+       sub64.S \
+       sub64u.S
diff --git a/lib/libc/arch/i386/int64/add64.S b/lib/libc/arch/i386/int64/add64.S
new file mode 100644 (file)
index 0000000..0518b8d
--- /dev/null
@@ -0,0 +1,18 @@
+/*     add64() - 64 bit addition                       Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _add64
+
+_add64:
+/* u64_t add64(u64_t i, u64_t j); */
+       movl    4(%esp), %eax
+       movl    8(%esp), %edx
+       addl    16(%esp), %edx
+       movl    %edx, (%eax)
+       movl    12(%esp), %edx
+       adcl    20(%esp), %edx
+       movl    %edx, 4(%eax)
+       ret
+
+/* */
+/* $PchId: add64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/add64.s b/lib/libc/arch/i386/int64/add64.s
deleted file mode 100644 (file)
index 3cc994f..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-!      add64() - 64 bit addition                       Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _add64
-
-_add64:                                ! u64_t add64(u64_t i, u64_t j);
-       mov     eax, 4(esp)
-       mov     edx, 8(esp)
-       add     edx, 16(esp)
-       mov     (eax), edx
-       mov     edx, 12(esp)
-       adc     edx, 20(esp)
-       mov     4(eax), edx
-       ret
-
-!
-! $PchId: add64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/add64u.S b/lib/libc/arch/i386/int64/add64u.S
new file mode 100644 (file)
index 0000000..5a63df8
--- /dev/null
@@ -0,0 +1,20 @@
+/*     add64u() - unsigned to 64 bit addition          Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _add64u, _add64ul
+
+_add64u:
+/* u64_t add64u(u64_t i, unsigned j); */
+_add64ul:
+/* u64_t add64ul(u64_t i, unsigned long j); */
+       movl    4(%esp), %eax
+       movl    8(%esp), %edx
+       addl    16(%esp), %edx
+       movl    %edx, (%eax)
+       movl    12(%esp), %edx
+       adcl    $0, %edx
+       movl    %edx, 4(%eax)
+       ret
+
+/* */
+/* $PchId: add64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/add64u.s b/lib/libc/arch/i386/int64/add64u.s
deleted file mode 100644 (file)
index 58c71fd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-!      add64u() - unsigned to 64 bit addition          Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _add64u, _add64ul
-
-_add64u:                       ! u64_t add64u(u64_t i, unsigned j);
-_add64ul:                      ! u64_t add64ul(u64_t i, unsigned long j);
-       mov     eax, 4(esp)
-       mov     edx, 8(esp)
-       add     edx, 16(esp)
-       mov     (eax), edx
-       mov     edx, 12(esp)
-       adc     edx, 0
-       mov     4(eax), edx
-       ret
-
-!
-! $PchId: add64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/cmp64.S b/lib/libc/arch/i386/int64/cmp64.S
new file mode 100644 (file)
index 0000000..cdcaab3
--- /dev/null
@@ -0,0 +1,35 @@
+/*     cmp64*() - 64 bit compare                       Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _cmp64, _cmp64u, _cmp64ul
+
+_cmp64:
+/* int cmp64(u64_t i, u64_t j); */
+       movl    %esp, %ecx
+0:
+       xorl    %eax, %eax
+       movl    4(%ecx), %edx
+       subl    12(%ecx), %edx
+       movl    8(%ecx), %edx
+       sbbl    16(%ecx), %edx
+       sbbl    %eax, %eax      /* eax = - (i < j) */
+       movl    12(%ecx), %edx
+       subl    4(%ecx), %edx
+       movl    16(%ecx), %edx
+       sbbl    8(%ecx), %edx
+       adcl    $0, %eax        /* eax = (i > j) - (i < j) */
+       ret
+
+_cmp64u:
+/* int cmp64u(u64_t i, unsigned j); */
+_cmp64ul:
+/* int cmp64ul(u64_t i, unsigned long j); */
+       movl    %esp, %ecx
+       push    16(%ecx)
+       movl    $0, 16(%ecx)
+       call    0b
+       pop     16(%ecx)
+       ret
+
+/* */
+/* $PchId: cmp64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/cmp64.s b/lib/libc/arch/i386/int64/cmp64.s
deleted file mode 100644 (file)
index d3ba6bf..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-!      cmp64*() - 64 bit compare                       Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _cmp64, _cmp64u, _cmp64ul
-
-_cmp64:                                ! int cmp64(u64_t i, u64_t j);
-       mov     ecx, esp
-cmp64: xor     eax, eax
-       mov     edx, 4(ecx)
-       sub     edx, 12(ecx)
-       mov     edx, 8(ecx)
-       sbb     edx, 16(ecx)
-       sbb     eax, eax                ! eax = - (i < j)
-       mov     edx, 12(ecx)
-       sub     edx, 4(ecx)
-       mov     edx, 16(ecx)
-       sbb     edx, 8(ecx)
-       adc     eax, 0                  ! eax = (i > j) - (i < j)
-       ret
-
-_cmp64u:                       ! int cmp64u(u64_t i, unsigned j);
-_cmp64ul:                      ! int cmp64ul(u64_t i, unsigned long j);
-       mov     ecx, esp
-       push    16(ecx)
-       mov     16(ecx), 0
-       call    cmp64
-       pop     16(ecx)
-       ret
-
-!
-! $PchId: cmp64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/cv64u.S b/lib/libc/arch/i386/int64/cv64u.S
new file mode 100644 (file)
index 0000000..ac8e445
--- /dev/null
@@ -0,0 +1,18 @@
+/*     cv64u() - 64 bit converted to unsigned          Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _cv64u, _cv64ul
+
+_cv64u:
+/* unsigned cv64u(u64_t i); */
+_cv64ul:
+/* unsigned long cv64ul(u64_t i); */
+       movl    4(%esp), %eax
+       cmpl    $0, 8(%esp)     /* return ULONG_MAX if really big */
+       je      0f
+       movl    $-1, %eax
+0:
+       ret
+
+/* */
+/* $PchId: cv64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/cv64u.s b/lib/libc/arch/i386/int64/cv64u.s
deleted file mode 100644 (file)
index a4b41f3..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-!      cv64u() - 64 bit converted to unsigned          Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _cv64u, _cv64ul
-
-_cv64u:                                ! unsigned cv64u(u64_t i);
-_cv64ul:                       ! unsigned long cv64ul(u64_t i);
-       mov     eax, 4(esp)
-       cmp     8(esp), 0               ! return ULONG_MAX if really big
-       jz      0f
-       mov     eax, -1
-0:     ret
-
-!
-! $PchId: cv64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/cvu64.S b/lib/libc/arch/i386/int64/cvu64.S
new file mode 100644 (file)
index 0000000..13fa832
--- /dev/null
@@ -0,0 +1,17 @@
+/*     cvu64() - unsigned converted to 64 bit          Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _cvu64, _cvul64
+
+_cvu64:
+/* u64_t cvu64(unsigned i); */
+_cvul64:
+/* u64_t cvul64(unsigned long i); */
+       movl    4(%esp), %eax
+       movl    8(%esp), %edx
+       movl    %edx, (%eax)
+       movl    $0, 4(%eax)
+       ret
+
+/* */
+/* $PchId: cvu64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/cvu64.s b/lib/libc/arch/i386/int64/cvu64.s
deleted file mode 100644 (file)
index a35441e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-!      cvu64() - unsigned converted to 64 bit          Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _cvu64, _cvul64
-
-_cvu64:                                ! u64_t cvu64(unsigned i);
-_cvul64:                       ! u64_t cvul64(unsigned long i);
-       mov     eax, 4(esp)
-       mov     edx, 8(esp)
-       mov     (eax), edx
-       mov     4(eax), 0
-       ret
-
-!
-! $PchId: cvu64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/diff64.S b/lib/libc/arch/i386/int64/diff64.S
new file mode 100644 (file)
index 0000000..818459b
--- /dev/null
@@ -0,0 +1,13 @@
+/*     diff64() - 64 bit subtraction giving unsigned   Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _diff64
+
+_diff64:
+/* unsigned diff64(u64_t i, u64_t j); */
+       movl    4(%esp), %eax
+       subl    12(%esp), %eax
+       ret
+
+/* */
+/* $PchId: diff64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/diff64.s b/lib/libc/arch/i386/int64/diff64.s
deleted file mode 100644 (file)
index e895a75..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-!      diff64() - 64 bit subtraction giving unsigned   Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _diff64
-
-_diff64:                       ! unsigned diff64(u64_t i, u64_t j);
-       mov     eax, 4(esp)
-       sub     eax, 12(esp)
-       ret
-
-!
-! $PchId: diff64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/div64u.S b/lib/libc/arch/i386/int64/div64u.S
new file mode 100644 (file)
index 0000000..c669794
--- /dev/null
@@ -0,0 +1,24 @@
+/*     div64u() - 64 bit divided by unsigned giving unsigned long */
+/*                                                     Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _div64u, _rem64u
+
+_div64u:
+/* unsigned long div64u(u64_t i, unsigned j); */
+       xorl    %edx, %edx
+       movl    8(%esp), %eax   /* i = (ih<<32) + il */
+       divl    12(%esp)        /* ih = q * j + r */
+       movl    4(%esp), %eax
+       divl    12(%esp)        /* i / j = (q<<32) + ((r<<32) + il) / j */
+       ret
+
+_rem64u:
+/* unsigned rem64u(u64_t i, unsigned j); */
+       pop     %ecx
+       call    _div64u
+       movl    %edx, %eax
+       jmp     *%ecx
+
+/* */
+/* $PchId: div64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/div64u.s b/lib/libc/arch/i386/int64/div64u.s
deleted file mode 100644 (file)
index 5d3629d..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-!      div64u() - 64 bit divided by unsigned giving unsigned long
-!                                                      Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _div64u, _rem64u
-
-_div64u:                       ! unsigned long div64u(u64_t i, unsigned j);
-       xor     edx, edx
-       mov     eax, 8(esp)             ! i = (ih<<32) + il
-       div     12(esp)                 ! ih = q * j + r
-       mov     eax, 4(esp)
-       div     12(esp)                 ! i / j = (q<<32) + ((r<<32) + il) / j
-       ret
-
-_rem64u:                       ! unsigned rem64u(u64_t i, unsigned j);
-       pop     ecx
-       call    _div64u
-       mov     eax, edx
-       jmp     ecx
-
-!
-! $PchId: div64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/ex64.S b/lib/libc/arch/i386/int64/ex64.S
new file mode 100644 (file)
index 0000000..bd224fb
--- /dev/null
@@ -0,0 +1,18 @@
+/*     ex64*() - extract low or high 32 bits of a 64 bit number */
+/*                                                     Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _ex64lo, _ex64hi
+
+_ex64lo:
+/* unsigned long ex64lo(u64_t i); */
+       movl    4(%esp), %eax
+       ret
+
+_ex64hi:
+/* unsigned long ex64hi(u64_t i); */
+       movl    8(%esp), %eax
+       ret
+
+/* */
+/* $PchId: ex64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/ex64.s b/lib/libc/arch/i386/int64/ex64.s
deleted file mode 100644 (file)
index 1bfc90d..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-!      ex64*() - extract low or high 32 bits of a 64 bit number
-!                                                      Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _ex64lo, _ex64hi
-
-_ex64lo:                       ! unsigned long ex64lo(u64_t i);
-       mov     eax, 4(esp)
-       ret
-
-_ex64hi:                       ! unsigned long ex64hi(u64_t i);
-       mov     eax, 8(esp)
-       ret
-
-!
-! $PchId: ex64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/make64.S b/lib/libc/arch/i386/int64/make64.S
new file mode 100644 (file)
index 0000000..c53474b
--- /dev/null
@@ -0,0 +1,17 @@
+/*     make64() - make a 64 bit number from two 32 bit halves */
+/*                                                     Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _make64
+
+_make64:
+/* u64_t make64(unsigned long lo, unsigned long hi); */
+       movl    4(%esp), %eax
+       movl    8(%esp), %edx
+       movl    %edx, (%eax)
+       movl    12(%esp), %edx
+       movl    %edx, 4(%eax)
+       ret
+
+/* */
+/* $PchId: make64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/make64.s b/lib/libc/arch/i386/int64/make64.s
deleted file mode 100644 (file)
index 7e57727..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-!      make64() - make a 64 bit number from two 32 bit halves
-!                                                      Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _make64
-
-_make64:                   ! u64_t make64(unsigned long lo, unsigned long hi);
-       mov     eax, 4(esp)
-       mov     edx, 8(esp)
-       mov     (eax), edx
-       mov     edx, 12(esp)
-       mov     4(eax), edx
-       ret
-
-!
-! $PchId: make64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/mul64u.S b/lib/libc/arch/i386/int64/mul64u.S
new file mode 100644 (file)
index 0000000..60e8c48
--- /dev/null
@@ -0,0 +1,18 @@
+/*     mul64u() - unsigned long by unsigned multiply giving 64 bit result */
+/*                                                     Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _mul64u
+
+_mul64u:
+/* u64_t mul64u(unsigned long i, unsigned j); */
+       movl    4(%esp), %ecx
+       movl    8(%esp), %eax
+       mull    12(%esp)
+       movl    %eax, (%ecx)
+       movl    %edx, 4(%ecx)
+       movl    %ecx, %eax
+       ret
+
+/* */
+/* $PchId: mul64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/mul64u.s b/lib/libc/arch/i386/int64/mul64u.s
deleted file mode 100644 (file)
index f28ecf0..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-!      mul64u() - unsigned long by unsigned multiply giving 64 bit result
-!                                                      Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _mul64u
-
-_mul64u:                       ! u64_t mul64u(unsigned long i, unsigned j);
-       mov     ecx, 4(esp)
-       mov     eax, 8(esp)
-       mul     12(esp)
-       mov     (ecx), eax
-       mov     4(ecx), edx
-       mov     eax, ecx
-       ret
-
-!
-! $PchId: mul64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/sub64.S b/lib/libc/arch/i386/int64/sub64.S
new file mode 100644 (file)
index 0000000..5100311
--- /dev/null
@@ -0,0 +1,18 @@
+/*     sub64() - 64 bit subtraction                    Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _sub64
+
+_sub64:
+/* u64_t sub64(u64_t i, u64_t j); */
+       movl    4(%esp), %eax
+       movl    8(%esp), %edx
+       subl    16(%esp), %edx
+       movl    %edx, (%eax)
+       movl    12(%esp), %edx
+       sbbl    20(%esp), %edx
+       movl    %edx, 4(%eax)
+       ret
+
+/* */
+/* $PchId: sub64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/sub64.s b/lib/libc/arch/i386/int64/sub64.s
deleted file mode 100644 (file)
index 15c7c12..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-!      sub64() - 64 bit subtraction                    Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _sub64
-
-_sub64:                                ! u64_t sub64(u64_t i, u64_t j);
-       mov     eax, 4(esp)
-       mov     edx, 8(esp)
-       sub     edx, 16(esp)
-       mov     (eax), edx
-       mov     edx, 12(esp)
-       sbb     edx, 20(esp)
-       mov     4(eax), edx
-       ret
-
-!
-! $PchId: sub64.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
diff --git a/lib/libc/arch/i386/int64/sub64u.S b/lib/libc/arch/i386/int64/sub64u.S
new file mode 100644 (file)
index 0000000..84314f2
--- /dev/null
@@ -0,0 +1,20 @@
+/*     sub64() - unsigned from 64 bit subtraction      Author: Kees J. Bot */
+/*                                                             7 Dec 1995 */
+.text
+.globl _sub64u, _sub64ul
+
+_sub64u:
+/* u64_t sub64u(u64_t i, unsigned j); */
+_sub64ul:
+/* u64_t sub64ul(u64_t i, unsigned long j); */
+       movl    4(%esp), %eax
+       movl    8(%esp), %edx
+       subl    16(%esp), %edx
+       movl    %edx, (%eax)
+       movl    12(%esp), %edx
+       sbbl    $0, %edx
+       movl    %edx, 4(%eax)
+       ret
+
+/* */
+/* $PchId: sub64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $ */
diff --git a/lib/libc/arch/i386/int64/sub64u.s b/lib/libc/arch/i386/int64/sub64u.s
deleted file mode 100644 (file)
index 52e2092..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-!      sub64() - unsigned from 64 bit subtraction      Author: Kees J. Bot
-!                                                              7 Dec 1995
-.sect .text
-.define _sub64u, _sub64ul
-
-_sub64u:                       ! u64_t sub64u(u64_t i, unsigned j);
-_sub64ul:                      ! u64_t sub64ul(u64_t i, unsigned long j);
-       mov     eax, 4(esp)
-       mov     edx, 8(esp)
-       sub     edx, 16(esp)
-       mov     (eax), edx
-       mov     edx, 12(esp)
-       sbb     edx, 0
-       mov     4(eax), edx
-       ret
-
-!
-! $PchId: sub64u.ack.s,v 1.2 1996/04/11 18:59:57 philip Exp $
index ad06245766ec2f4146fab2f34e6866c0a091ce0a..f682d67b812cb3339e775823754ea88756e287f7 100644 (file)
@@ -4,9 +4,9 @@
 SRCS+=   \
        arch_compare.c \
        arch_round.c   \
-       fpu_cw.s       \
-       fpu_sw.s       \
-       fpu_round.s    \
+       fpu_cw.S       \
+       fpu_sw.S       \
+       fpu_round.S    \
        fegetround.c   \
        feholdexcept.c \
        fesetround.c
diff --git a/lib/libc/arch/i386/math/fpu_cw.S b/lib/libc/arch/i386/math/fpu_cw.S
new file mode 100644 (file)
index 0000000..8046523
--- /dev/null
@@ -0,0 +1,20 @@
+/*     fpu_cw_get() - get FPU control word     Author: Erik van der Kouwe */
+/*     fpu_cw_set() - set FPU control word     9 Dec 2009 */
+.text
+.globl _fpu_cw_get
+.globl _fpu_cw_set
+
+/* u16_t fpu_cw_get(void) */
+_fpu_cw_get:
+/* clear unused bits just to be sure */
+       xor     %eax, %eax
+       push    %eax
+       fstcw   (%esp)
+       pop     %eax
+       ret
+
+/* void fpu_cw_set(u16_t fpu_cw) */
+_fpu_cw_set:
+/* load control word from parameter */
+       fldcw   4(%esp)
+       ret
diff --git a/lib/libc/arch/i386/math/fpu_cw.s b/lib/libc/arch/i386/math/fpu_cw.s
deleted file mode 100644 (file)
index f637497..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-!      fpu_cw_get() - get FPU control word     Author: Erik van der Kouwe
-!      fpu_cw_set() - set FPU control word     9 Dec 2009
-.sect .text
-.define _fpu_cw_get
-.define _fpu_cw_set
-
-! u16_t fpu_cw_get(void)
-_fpu_cw_get:
-       ! clear unused bits just to be sure
-       xor     eax,    eax
-       push    eax
-       fstcw   (esp)
-       pop     eax
-       ret
-
-! void fpu_cw_set(u16_t fpu_cw)
-_fpu_cw_set:
-       ! load control word from parameter
-       fldcw   4(esp)
-       ret
diff --git a/lib/libc/arch/i386/math/fpu_round.S b/lib/libc/arch/i386/math/fpu_round.S
new file mode 100644 (file)
index 0000000..0561dd0
--- /dev/null
@@ -0,0 +1,37 @@
+/*     fpu_rndint() - round integer    Author: Erik van der Kouwe */
+/*                                     17 Dec 2009 */
+.text
+.globl _fpu_rndint
+.globl _fpu_remainder
+
+/* void fpu_rndint(double *value) */
+_fpu_rndint:
+/* move the value onto the floating point stack */
+       mov     4(%esp), %eax
+       fldl    (%eax)
+
+/* round it (beware of precision exception!) */
+       frndint
+
+/* store the result */
+       fstpl   (%eax)
+       ret
+
+/* void fpu_remainder(double *x, double y) */
+_fpu_remainder:
+/* move the values onto the floating point stack */
+       fldl    8(%esp)
+       mov     4(%esp), %edx
+       fldl    (%edx)
+
+/* compute remainder, multiple iterations may be needed */
+1:
+       fprem1
+.byte  0xdf, 0xe0      /* fnstsw       ax */
+       sahf
+       jp      1b
+
+/* store the result and pop the divisor */
+       fstpl   (%edx)
+       fstp    %st
+       ret
diff --git a/lib/libc/arch/i386/math/fpu_round.s b/lib/libc/arch/i386/math/fpu_round.s
deleted file mode 100644 (file)
index 404f2fd..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-!      fpu_rndint() - round integer    Author: Erik van der Kouwe
-!                                      17 Dec 2009
-.sect .text
-.define _fpu_rndint
-.define _fpu_remainder
-
-! void fpu_rndint(double *value)
-_fpu_rndint:
-       ! move the value onto the floating point stack
-       mov     eax,    4(esp)
-       fldd    (eax)
-
-       ! round it (beware of precision exception!)
-       frndint
-
-       ! store the result
-       fstpd   (eax)
-       ret
-
-! void fpu_remainder(double *x, double y)
-_fpu_remainder:
-       ! move the values onto the floating point stack
-       fldd    8(esp)
-       mov     edx,    4(esp)
-       fldd    (edx)
-
-       ! compute remainder, multiple iterations may be needed
-1:     fprem1
-       .data1  0xdf, 0xe0      ! fnstsw        ax      
-       sahf
-       jp      1b
-
-       ! store the result and pop the divisor
-       fstpd   (edx)
-       fstp    st
-       ret
diff --git a/lib/libc/arch/i386/math/fpu_sw.S b/lib/libc/arch/i386/math/fpu_sw.S
new file mode 100644 (file)
index 0000000..ce36aca
--- /dev/null
@@ -0,0 +1,37 @@
+/* fpu_compare() - compare doubles     Author: Erik van der Kouwe */
+/* fpu_sw_get() - get FPU status       17 Dec 2009 */
+/* fpu_xam() - examine double */
+.text
+.globl _fpu_compare
+.globl _fpu_sw_get
+.globl _fpu_xam
+
+/* u16_t fpu_compare(double x, double y) */
+_fpu_compare:
+/* move the values onto the floating point stack */
+       fldl    12(%esp)
+       fldl    4(%esp)
+
+/* compare values and return status word */
+       fcompp
+       jmp     _fpu_sw_get
+
+/* u16_t fpu_sw_get(void) */
+_fpu_sw_get:
+/* clear unused high-order word and get status word */
+       xor     %eax, %eax
+.byte  0xdf, 0xe0      /* fnstsw       ax */
+       ret
+
+/* u16_t fpu_xam(double value) */
+_fpu_xam:
+/* move the value onto the floating point stack */
+       fldl    4(%esp)
+
+/* examine value and get status word */
+       fxam
+       call    _fpu_sw_get
+
+/* pop the value */
+       fstp    %st
+       ret
diff --git a/lib/libc/arch/i386/math/fpu_sw.s b/lib/libc/arch/i386/math/fpu_sw.s
deleted file mode 100644 (file)
index 3d6f30d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-! fpu_compare() - compare doubles      Author: Erik van der Kouwe
-! fpu_sw_get() - get FPU status        17 Dec 2009
-! fpu_xam() - examine double
-.sect .text
-.define _fpu_compare
-.define _fpu_sw_get
-.define _fpu_xam
-
-! u16_t fpu_compare(double x, double y)
-_fpu_compare:
-       ! move the values onto the floating point stack
-       fldd    12(esp)
-       fldd    4(esp)
-
-       ! compare values and return status word
-       fcompp
-       jmp     _fpu_sw_get
-
-! u16_t fpu_sw_get(void)
-_fpu_sw_get:
-       ! clear unused high-order word and get status word
-       xor     eax,    eax
-       .data1  0xdf, 0xe0      ! fnstsw        ax
-       ret
-       
-! u16_t fpu_xam(double value)
-_fpu_xam:
-       ! move the value onto the floating point stack
-       fldd    4(esp)
-
-       ! examine value and get status word
-       fxam
-       call    _fpu_sw_get
-
-       ! pop the value
-       fstp    st
-       ret
-
index 8530d8017530634974b387560d3d982a3e27a3c8..d915c3a942a5e7b4ac43800a2960d71d67395a4c 100644 (file)
@@ -2,22 +2,22 @@
 .PATH: ${.CURDIR}/arch/${ARCH}/misc
 
 SRCS+=  \
-       _cpuid.s \
+       _cpuid.S \
        _cpufeature.c \
-       alloca.s \
-       get_bp.s \
-       getprocessor.s \
-       io_inb.s \
-       io_inl.s \
-       io_insb.s \
-       io_insl.s \
-       io_insw.s \
-       io_intr.s \
-       io_inw.s \
-       io_outb.s \
-       io_outl.s \
-       io_outsb.s \
-       io_outsl.s \
-       io_outsw.s \
-       io_outw.s \
-       oneC_sum.s
+       alloca.S \
+       get_bp.S \
+       getprocessor.S \
+       io_inb.S \
+       io_inl.S \
+       io_insb.S \
+       io_insl.S \
+       io_insw.S \
+       io_intr.S \
+       io_inw.S \
+       io_outb.S \
+       io_outl.S \
+       io_outsb.S \
+       io_outsl.S \
+       io_outsw.S \
+       io_outw.S \
+       oneC_sum.S
diff --git a/lib/libc/arch/i386/misc/_cpuid.S b/lib/libc/arch/i386/misc/_cpuid.S
new file mode 100644 (file)
index 0000000..92d7ca9
--- /dev/null
@@ -0,0 +1,41 @@
+/* _cpuid() - interface to cpuid instruction */
+
+
+/* void _cpuid(u32_t *eax, u32_t *ebx, u32_t *ecx, u32_t *edx); */
+/* 0 for OK, nonzero for unsupported */
+
+.globl __cpuid
+
+.text
+__cpuid:
+/* save work registers */
+       push    %ebp
+       push    %ebx
+
+/* set eax parameter to cpuid and execute cpuid */
+       movl    12(%esp), %ebp
+       mov     (%ebp), %eax
+       movl    16(%esp), %ebp
+       mov     (%ebp), %ebx
+       movl    20(%esp), %ebp
+       mov     (%ebp), %ecx
+       movl    24(%esp), %ebp
+       mov     (%ebp), %edx
+
+.byte  0x0F, 0xA2      /* CPUID */
+
+/* store results in pointer arguments */
+       movl    12(%esp), %ebp
+       movl    %eax, (%ebp)
+       movl    16(%esp), %ebp
+       movl    %ebx, (%ebp)
+       movl    20(%esp), %ebp
+       movl    %ecx, (%ebp)
+       movl    24(%esp), %ebp
+       movl    %edx, (%ebp)
+
+/* restore registers */
+       pop     %ebx
+       pop     %ebp
+
+       ret
diff --git a/lib/libc/arch/i386/misc/_cpuid.s b/lib/libc/arch/i386/misc/_cpuid.s
deleted file mode 100644 (file)
index c967fe0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-! _cpuid() - interface to cpuid instruction
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-
-! void _cpuid(u32_t *eax, u32_t *ebx, u32_t *ecx, u32_t *edx);
-
-.define        __cpuid
-
-__cpuid:
-       ! save registers
-       push    ebp
-       push    ebx
-
-       ! set parameters to cpuid and execute cpuid
-       mov     ebp,  12(esp)
-       mov     eax, (ebp)
-       mov     ebp,  16(esp)
-       mov     ebx, (ebp)
-       mov     ebp,  20(esp)
-       mov     ecx, (ebp)
-       mov     ebp,  24(esp)
-       mov     edx, (ebp)
-       .data1  0x0F, 0xA2      ! CPUID
-
-       ! store results in pointer arguments
-       mov     ebp, 12(esp)
-       mov     (ebp), eax
-       mov     ebp, 16(esp)
-       mov     (ebp), ebx
-       mov     ebp, 20(esp)
-       mov     (ebp), ecx
-       mov     ebp, 24(esp)
-       mov     (ebp), edx
-
-       ! restore registers
-       pop     ebx
-       pop     ebp
-
-       ret
diff --git a/lib/libc/arch/i386/misc/alloca.S b/lib/libc/arch/i386/misc/alloca.S
new file mode 100644 (file)
index 0000000..24de081
--- /dev/null
@@ -0,0 +1,32 @@
+/* */
+/*     alloca() - allocate space on the stack          Author: Kees J. Bot */
+/*                                                             2 Dec 1993 */
+
+.text
+.balign        16
+.globl _alloca
+_alloca:
+#if __ACK__
+       pop     %ecx    /* Return address */
+       pop     %eax    /* Bytes to allocate */
+       addl    $2*4+3, %eax    /* Add space for two saved register variables */
+       andb    $0xFC, %al      /* Align */
+       movl    %esp, %ebx      /* Keep current esp */
+       subl    %eax, %esp      /* Lower stack */
+       movl    %esp, %eax      /* Return value */
+       push    4(%ebx) /* Push what is probably the saved esi */
+       push    (%ebx)  /* Saved edi */
+/* Now ACK can still do: */
+/*     pop edi; pop esi; leave; ret */
+       push    %eax    /* Dummy argument */
+       jmp     *%ecx
+#else
+       pop     %ecx    /* Return address */
+       pop     %eax    /* Bytes to allocate */
+       addl    $3, %eax
+       andb    $0xFC, %al      /* Align */
+       subl    %eax, %esp      /* Lower stack */
+       movl    %esp, %eax      /* Return value */
+       push    %eax    /* Dummy argument */
+       jmp     *%ecx
+#endif
diff --git a/lib/libc/arch/i386/misc/alloca.s b/lib/libc/arch/i386/misc/alloca.s
deleted file mode 100644 (file)
index 8147ac6..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#
-!      alloca() - allocate space on the stack          Author: Kees J. Bot
-!                                                              2 Dec 1993
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.sect .text
-       .align  16
-.define _alloca
-_alloca:
-#if __ACK__
-       pop     ecx             ! Return address
-       pop     eax             ! Bytes to allocate
-       add     eax, 2*4+3      ! Add space for two saved register variables
-       andb    al, 0xFC        ! Align
-       mov     ebx, esp        ! Keep current esp
-       sub     esp, eax        ! Lower stack
-       mov     eax, esp        ! Return value
-       push    4(ebx)          ! Push what is probably the saved esi
-       push    (ebx)           ! Saved edi
-                               ! Now ACK can still do:
-                               !       pop edi; pop esi; leave; ret
-       push    eax             ! Dummy argument
-       jmp     ecx
-#else
-       pop     ecx             ! Return address
-       pop     eax             ! Bytes to allocate
-       add     eax, 3
-       andb    al, 0xFC        ! Align
-       sub     esp, eax        ! Lower stack
-       mov     eax, esp        ! Return value
-       push    eax             ! Dummy argument
-       jmp     ecx
-#endif
diff --git a/lib/libc/arch/i386/misc/get_bp.S b/lib/libc/arch/i386/misc/get_bp.S
new file mode 100644 (file)
index 0000000..0da4e61
--- /dev/null
@@ -0,0 +1,14 @@
+/* get_bp.s */
+/* */
+/* return EBP in EAX */
+/* */
+/* Created:    Sep 7, 1992 by Philip Homburg */
+
+
+.text
+.globl _get_bp
+_get_bp:
+       movl    %ebp, %eax
+       ret
+
+/* $PchId: get_bp.ack.s,v 1.3 1996/02/23 08:30:52 philip Exp $ */
diff --git a/lib/libc/arch/i386/misc/get_bp.s b/lib/libc/arch/i386/misc/get_bp.s
deleted file mode 100644 (file)
index 1ba81dc..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-! get_bp.s
-!
-! return EBP in EAX
-!
-! Created:     Sep 7, 1992 by Philip Homburg
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.sect .text
-.define _get_bp
-_get_bp:
-       mov     eax, ebp
-       ret
-
-! $PchId: get_bp.ack.s,v 1.3 1996/02/23 08:30:52 philip Exp $
-
diff --git a/lib/libc/arch/i386/misc/getprocessor.S b/lib/libc/arch/i386/misc/getprocessor.S
new file mode 100644 (file)
index 0000000..f4b893b
--- /dev/null
@@ -0,0 +1,55 @@
+/*     getprocessor() - determine processor type       Author: Kees J. Bot */
+/*                                                             26 Jan 1994 */
+
+.text
+
+/* int getprocessor(void); */
+/*     Return 386, 486, 586, ... */
+
+.globl _getprocessor
+
+_getprocessor:
+       push    %ebp
+       movl    %esp, %ebp
+       andl    $0xFFFFFFFC, %esp       /* Align stack to avoid AC fault */
+       movl    $0x00040000, %ecx       /* Try to flip the AC bit introduced on the 486 */
+       call    flip
+       movl    $386, %eax      /* 386 if it didn't react to "flipping" */
+       je      gotprocessor
+       movl    $0x00200000, %ecx       /* Try to flip the ID bit introduced on the 586 */
+       call    flip
+       movl    $486, %eax      /* 486 if it didn't react */
+       je      gotprocessor
+       pushf
+       pusha   /* Save the world */
+       movl    $1, %eax
+.byte  0x0F, 0xA2      /* CPUID instruction tells the processor type */
+       andb    $0x0F, %ah      /* Extract the family (5, 6, ...) */
+       movzbl  %ah, %eax
+       cmpl    $15, %eax       /* 15: extended family */
+       jne     direct
+       movl    $6, %eax        /* Make it 686 */
+direct:
+       imull   $100, %eax      /* 500, 600, ... */
+       addl    $86, %eax       /* 586, 686, ... */
+       movl    %eax, 7*4(%esp) /* Pass eax through */
+       popa
+       popf
+gotprocessor:
+       leave
+       ret
+
+flip:
+       pushf   /* Push eflags */
+       pop     %eax    /* eax = eflags */
+       movl    %eax, %edx      /* Save original eflags */
+       xorl    %ecx, %eax      /* Flip the bit to test */
+       push    %eax    /* Push modified eflags value */
+       popf    /* Load modified eflags register */
+       pushf
+       pop     %eax    /* Get it again */
+       push    %edx
+       popf    /* Restore original eflags register */
+       xorl    %edx, %eax      /* See if the bit changed */
+       testl   %ecx, %eax
+       ret
diff --git a/lib/libc/arch/i386/misc/getprocessor.s b/lib/libc/arch/i386/misc/getprocessor.s
deleted file mode 100644 (file)
index 2b00a39..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-!      getprocessor() - determine processor type       Author: Kees J. Bot
-!                                                              26 Jan 1994
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-
-! int getprocessor(void);
-!      Return 386, 486, 586, ...
-
-.define        _getprocessor
-
-_getprocessor:
-       push    ebp
-       mov     ebp, esp
-       and     esp, 0xFFFFFFFC ! Align stack to avoid AC fault
-       mov     ecx, 0x00040000 ! Try to flip the AC bit introduced on the 486
-       call    flip
-       mov     eax, 386        ! 386 if it didn't react to "flipping"
-       jz      gotprocessor
-       mov     ecx, 0x00200000 ! Try to flip the ID bit introduced on the 586
-       call    flip
-       mov     eax, 486        ! 486 if it didn't react
-       jz      gotprocessor
-       pushf
-       pusha                   ! Save the world
-       mov     eax, 1
-       .data1  0x0F, 0xA2      ! CPUID instruction tells the processor type
-       andb    ah, 0x0F        ! Extract the family (5, 6, ...)
-       movzxb  eax, ah
-       cmp     eax, 15         ! 15: extended family
-       jne     direct
-       mov     eax, 6          ! Make it 686
-direct:
-       imul    eax, 100        ! 500, 600, ...
-       add     eax, 86         ! 586, 686, ...
-       mov     7*4(esp), eax   ! Pass eax through
-       popa
-       popf
-gotprocessor:
-       leave
-       ret
-
-flip:
-       pushf                   ! Push eflags
-       pop     eax             ! eax = eflags
-       mov     edx, eax        ! Save original eflags
-       xor     eax, ecx        ! Flip the bit to test
-       push    eax             ! Push modified eflags value
-       popf                    ! Load modified eflags register
-       pushf
-       pop     eax             ! Get it again
-       push    edx
-       popf                    ! Restore original eflags register
-       xor     eax, edx        ! See if the bit changed
-       test    eax, ecx
-       ret
diff --git a/lib/libc/arch/i386/misc/io_inb.S b/lib/libc/arch/i386/misc/io_inb.S
new file mode 100644 (file)
index 0000000..f7e4f7a
--- /dev/null
@@ -0,0 +1,14 @@
+/*     inb() - Input one byte                          Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     unsigned inb(U16_t port); */
+
+.text
+.globl _inb
+_inb:
+       push    %ebp
+       movl    %esp, %ebp
+       movl    8(%ebp), %edx   /* port */
+       xorl    %eax, %eax
+       inb     %dx     /* read 1 byte */
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_inb.s b/lib/libc/arch/i386/misc/io_inb.s
deleted file mode 100644 (file)
index ab59d73..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-!      inb() - Input one byte                          Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      unsigned inb(U16_t port);
-
-.sect .text
-.define _inb
-_inb:
-       push    ebp
-       mov     ebp, esp
-       mov     edx, 8(ebp)             ! port
-       xor     eax, eax
-       inb     dx                      ! read 1 byte
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_inl.S b/lib/libc/arch/i386/misc/io_inl.S
new file mode 100644 (file)
index 0000000..cae064f
--- /dev/null
@@ -0,0 +1,13 @@
+/*     inl() - Input one dword                         Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     unsigned inl(U16_t port); */
+
+.text
+.globl _inl
+_inl:
+       push    %ebp
+       movl    %esp, %ebp
+       movl    8(%ebp), %edx   /* port */
+       inl     %dx     /* read 1 dword */
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_inl.s b/lib/libc/arch/i386/misc/io_inl.s
deleted file mode 100644 (file)
index f09cf5c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      inl() - Input one dword                         Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      unsigned inl(U16_t port);
-
-.sect .text
-.define _inl
-_inl:
-       push    ebp
-       mov     ebp, esp
-       mov     edx, 8(ebp)             ! port
-       in      dx                      ! read 1 dword
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_insb.S b/lib/libc/arch/i386/misc/io_insb.S
new file mode 100644 (file)
index 0000000..ac9ba19
--- /dev/null
@@ -0,0 +1,18 @@
+/*     insb() - Input a byte array                     Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void insb(U16_t port, void *buf, size_t count); */
+
+.text
+.globl _insb
+_insb:
+       push    %ebp
+       movl    %esp, %ebp
+       cld
+       push    %edi
+       movl    8(%ebp), %edx   /* port */
+       movl    12(%ebp), %edi  /* buf */
+       movl    16(%ebp), %ecx  /* byte count */
+       rep insb        /* input many bytes */
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_insb.s b/lib/libc/arch/i386/misc/io_insb.s
deleted file mode 100644 (file)
index 91b20dc..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-!      insb() - Input a byte array                     Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void insb(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insb
-_insb:
-       push    ebp
-       mov     ebp, esp
-       cld
-       push    edi
-       mov     edx, 8(ebp)             ! port
-       mov     edi, 12(ebp)            ! buf
-       mov     ecx, 16(ebp)            ! byte count
-   rep insb                            ! input many bytes
-       pop     edi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_insl.S b/lib/libc/arch/i386/misc/io_insl.S
new file mode 100644 (file)
index 0000000..3c68611
--- /dev/null
@@ -0,0 +1,19 @@
+/*     insl() - Input a dword array                    Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void insl(U16_t port, void *buf, size_t count); */
+
+.text
+.globl _insl
+_insl:
+       push    %ebp
+       movl    %esp, %ebp
+       cld
+       push    %edi
+       movl    8(%ebp), %edx   /* port */
+       movl    12(%ebp), %edi  /* buf */
+       movl    16(%ebp), %ecx  /* byte count */
+       shrl    $2, %ecx        /* dword count */
+       rep insl        /* input many dwords */
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_insl.s b/lib/libc/arch/i386/misc/io_insl.s
deleted file mode 100644 (file)
index 2931682..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-!      insl() - Input a dword array                    Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void insl(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insl
-_insl:
-       push    ebp
-       mov     ebp, esp
-       cld
-       push    edi
-       mov     edx, 8(ebp)             ! port
-       mov     edi, 12(ebp)            ! buf
-       mov     ecx, 16(ebp)            ! byte count
-       shr     ecx, 2                  ! dword count
-   rep ins                             ! input many dwords
-       pop     edi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_insw.S b/lib/libc/arch/i386/misc/io_insw.S
new file mode 100644 (file)
index 0000000..58719fd
--- /dev/null
@@ -0,0 +1,19 @@
+/*     insw() - Input a word array                     Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void insw(U16_t port, void *buf, size_t count); */
+
+.text
+.globl _insw
+_insw:
+       push    %ebp
+       movl    %esp, %ebp
+       cld
+       push    %edi
+       movl    8(%ebp), %edx   /* port */
+       movl    12(%ebp), %edi  /* buf */
+       movl    16(%ebp), %ecx  /* byte count */
+       shrl    $1, %ecx        /* word count */
+       rep insw        /* input many words */
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_insw.s b/lib/libc/arch/i386/misc/io_insw.s
deleted file mode 100644 (file)
index 039f8d8..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-!      insw() - Input a word array                     Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void insw(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _insw
-_insw:
-       push    ebp
-       mov     ebp, esp
-       cld
-       push    edi
-       mov     edx, 8(ebp)             ! port
-       mov     edi, 12(ebp)            ! buf
-       mov     ecx, 16(ebp)            ! byte count
-       shr     ecx, 1                  ! word count
-rep o16        ins                             ! input many words
-       pop     edi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_intr.S b/lib/libc/arch/i386/misc/io_intr.S
new file mode 100644 (file)
index 0000000..7d210c0
--- /dev/null
@@ -0,0 +1,16 @@
+/*     intr_disable(), intr_enable - Disable/Enable hardware interrupts. */
+/*                                                     Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void intr_disable(void); */
+/*     void intr_enable(void); */
+
+.text
+.globl _intr_disable
+_intr_disable:
+       cli
+       ret
+
+.globl _intr_enable
+_intr_enable:
+       sti
+       ret
diff --git a/lib/libc/arch/i386/misc/io_intr.s b/lib/libc/arch/i386/misc/io_intr.s
deleted file mode 100644 (file)
index f292770..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-!      intr_disable(), intr_enable - Disable/Enable hardware interrupts.
-!                                                      Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void intr_disable(void);
-!      void intr_enable(void);
-
-.sect .text
-.define _intr_disable
-_intr_disable:
-       cli
-       ret
-
-.define _intr_enable
-_intr_enable:
-       sti
-       ret
diff --git a/lib/libc/arch/i386/misc/io_inw.S b/lib/libc/arch/i386/misc/io_inw.S
new file mode 100644 (file)
index 0000000..8bfdc1f
--- /dev/null
@@ -0,0 +1,14 @@
+/*     inw() - Input one word                          Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     unsigned inw(U16_t port); */
+
+.text
+.globl _inw
+_inw:
+       push    %ebp
+       movl    %esp, %ebp
+       movl    8(%ebp), %edx   /* port */
+       xorl    %eax, %eax
+       inw     %dx     /* read 1 word */
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_inw.s b/lib/libc/arch/i386/misc/io_inw.s
deleted file mode 100644 (file)
index 7739437..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-!      inw() - Input one word                          Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      unsigned inw(U16_t port);
-
-.sect .text
-.define _inw
-_inw:
-       push    ebp
-       mov     ebp, esp
-       mov     edx, 8(ebp)             ! port
-       xor     eax, eax
-    o16        in      dx                      ! read 1 word
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_outb.S b/lib/libc/arch/i386/misc/io_outb.S
new file mode 100644 (file)
index 0000000..302868a
--- /dev/null
@@ -0,0 +1,14 @@
+/*     outb() - Output one byte                        Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void outb(U16_t port, U8_t value); */
+
+.text
+.globl _outb
+_outb:
+       push    %ebp
+       movl    %esp, %ebp
+       movl    8(%ebp), %edx   /* port */
+       movl    8+4(%ebp), %eax /* value */
+       outb    %dx     /* output 1 byte */
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_outb.s b/lib/libc/arch/i386/misc/io_outb.s
deleted file mode 100644 (file)
index 0ae7b06..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-!      outb() - Output one byte                        Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void outb(U16_t port, U8_t value);
-
-.sect .text
-.define _outb
-_outb:
-       push    ebp
-       mov     ebp, esp
-       mov     edx, 8(ebp)             ! port
-       mov     eax, 8+4(ebp)           ! value
-       outb    dx                      ! output 1 byte
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_outl.S b/lib/libc/arch/i386/misc/io_outl.S
new file mode 100644 (file)
index 0000000..0b67fa1
--- /dev/null
@@ -0,0 +1,14 @@
+/*     outl() - Output one dword                       Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void outl(U16_t port, u32_t value); */
+
+.text
+.globl _outl
+_outl:
+       push    %ebp
+       movl    %esp, %ebp
+       movl    8(%ebp), %edx   /* port */
+       movl    8+4(%ebp), %eax /* value */
+       outl    %dx     /* output 1 dword */
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_outl.s b/lib/libc/arch/i386/misc/io_outl.s
deleted file mode 100644 (file)
index 1a41444..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-!      outl() - Output one dword                       Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void outl(U16_t port, u32_t value);
-
-.sect .text
-.define _outl
-_outl:
-       push    ebp
-       mov     ebp, esp
-       mov     edx, 8(ebp)             ! port
-       mov     eax, 8+4(ebp)           ! value
-       out     dx                      ! output 1 dword
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_outsb.S b/lib/libc/arch/i386/misc/io_outsb.S
new file mode 100644 (file)
index 0000000..cee7e39
--- /dev/null
@@ -0,0 +1,18 @@
+/*     outsb() - Output a byte array           Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void outsb(U16_t port, void *buf, size_t count); */
+
+.text
+.globl _outsb
+_outsb:
+       push    %ebp
+       movl    %esp, %ebp
+       cld
+       push    %esi
+       movl    8(%ebp), %edx   /* port */
+       movl    12(%ebp), %esi  /* buf */
+       movl    16(%ebp), %ecx  /* byte count */
+       rep outsb       /* output many bytes */
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_outsb.s b/lib/libc/arch/i386/misc/io_outsb.s
deleted file mode 100644 (file)
index d3789cc..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-!      outsb() - Output a byte array           Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void outsb(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsb
-_outsb:
-       push    ebp
-       mov     ebp, esp
-       cld
-       push    esi
-       mov     edx, 8(ebp)             ! port
-       mov     esi, 12(ebp)            ! buf
-       mov     ecx, 16(ebp)            ! byte count
-   rep outsb                           ! output many bytes
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_outsl.S b/lib/libc/arch/i386/misc/io_outsl.S
new file mode 100644 (file)
index 0000000..e2e640d
--- /dev/null
@@ -0,0 +1,19 @@
+/*     outsl() - Output a dword array          Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void outsl(U16_t port, void *buf, size_t count); */
+
+.text
+.globl _outsl
+_outsl:
+       push    %ebp
+       movl    %esp, %ebp
+       cld
+       push    %esi
+       movl    8(%ebp), %edx   /* port */
+       movl    12(%ebp), %esi  /* buf */
+       movl    16(%ebp), %ecx  /* byte count */
+       shrl    $2, %ecx        /* dword count */
+       rep outsl       /* output many dwords */
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_outsl.s b/lib/libc/arch/i386/misc/io_outsl.s
deleted file mode 100644 (file)
index a57eba7..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-!      outsl() - Output a dword array          Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void outsl(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsl
-_outsl:
-       push    ebp
-       mov     ebp, esp
-       cld
-       push    esi
-       mov     edx, 8(ebp)             ! port
-       mov     esi, 12(ebp)            ! buf
-       mov     ecx, 16(ebp)            ! byte count
-       shr     ecx, 2                  ! dword count
-   rep outs                            ! output many dwords
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_outsw.S b/lib/libc/arch/i386/misc/io_outsw.S
new file mode 100644 (file)
index 0000000..25bee2c
--- /dev/null
@@ -0,0 +1,19 @@
+/*     outsw() - Output a word array           Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void outsw(U16_t port, void *buf, size_t count); */
+
+.text
+.globl _outsw
+_outsw:
+       push    %ebp
+       movl    %esp, %ebp
+       cld
+       push    %esi
+       movl    8(%ebp), %edx   /* port */
+       movl    12(%ebp), %esi  /* buf */
+       movl    16(%ebp), %ecx  /* byte count */
+       shrl    $1, %ecx        /* word count */
+       rep outsw       /* output many words */
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_outsw.s b/lib/libc/arch/i386/misc/io_outsw.s
deleted file mode 100644 (file)
index dc4f1bf..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-!      outsw() - Output a word array           Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void outsw(U16_t port, void *buf, size_t count);
-
-.sect .text
-.define _outsw
-_outsw:
-       push    ebp
-       mov     ebp, esp
-       cld
-       push    esi
-       mov     edx, 8(ebp)             ! port
-       mov     esi, 12(ebp)            ! buf
-       mov     ecx, 16(ebp)            ! byte count
-       shr     ecx, 1                  ! word count
-rep o16        outs                            ! output many words
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/io_outw.S b/lib/libc/arch/i386/misc/io_outw.S
new file mode 100644 (file)
index 0000000..165c3ca
--- /dev/null
@@ -0,0 +1,14 @@
+/*     outw() - Output one word                        Author: Kees J. Bot */
+/*                                                             18 Mar 1996 */
+/*     void outw(U16_t port, U16_t value); */
+
+.text
+.globl _outw
+_outw:
+       push    %ebp
+       movl    %esp, %ebp
+       movl    8(%ebp), %edx   /* port */
+       movl    8+4(%ebp), %eax /* value */
+       outw    %dx     /* output 1 word */
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/misc/io_outw.s b/lib/libc/arch/i386/misc/io_outw.s
deleted file mode 100644 (file)
index 88a0456..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-!      outw() - Output one word                        Author: Kees J. Bot
-!                                                              18 Mar 1996
-!      void outw(U16_t port, U16_t value);
-
-.sect .text
-.define _outw
-_outw:
-       push    ebp
-       mov     ebp, esp
-       mov     edx, 8(ebp)             ! port
-       mov     eax, 8+4(ebp)           ! value
-    o16        out     dx                      ! output 1 word
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/misc/oneC_sum.S b/lib/libc/arch/i386/misc/oneC_sum.S
new file mode 100644 (file)
index 0000000..0d162d3
--- /dev/null
@@ -0,0 +1,91 @@
+/*     oneC_sum() - One complement`s checksum          Author: Kees J. Bot */
+/*                                                             9 May 1995 */
+/* See RFC 1071, "Computing the Internet checksum" */
+/* See also the C version of this code. */
+
+.text
+
+.globl _oneC_sum
+.balign        16
+_oneC_sum:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       movzwl  8(%ebp), %eax   /* Checksum of previous block */
+       movl    12(%ebp), %esi  /* Data to compute checksum over */
+       movl    16(%ebp), %edi  /* Number of bytes */
+
+       xorl    %edx, %edx
+       xorb    %cl, %cl
+align:
+       testl   $3, %esi        /* Is the data aligned? */
+       je      aligned
+       testl   %edi, %edi
+       je      0f
+       movb    (%esi), %dl     /* Rotate the first unaligned bytes */
+       decl    %edi    /* into the edx register */
+0:
+       incl    %esi
+       rorl    $8, %edx
+       rorl    $8, %eax        /* Rotate the checksum likewise */
+       addb    $8, %cl /* Number of bits rotated */
+       jmp     align
+aligned:
+       addl    %edx, %eax      /* Summate the unaligned bytes */
+       adcl    $0, %eax        /* Add carry back in for one`s complement */
+
+       jmp     add6test
+.balign        16
+add6:
+       addl    (%esi), %eax    /* Six times unrolled loop, see below */
+       adcl    4(%esi), %eax
+       adcl    8(%esi), %eax
+       adcl    12(%esi), %eax
+       adcl    16(%esi), %eax
+       adcl    20(%esi), %eax
+       adcl    $0, %eax
+       addl    $24, %esi
+add6test:
+       subl    $24, %edi
+       jae     add6
+       addl    $24, %edi
+
+       jmp     add1test
+.balign        16
+add1:
+       addl    (%esi), %eax    /* while ((edi -= 4) >= 0) */
+       adcl    $0, %eax        /*      eax += *esi++; */
+       addl    $4, %esi        /* edi += 4; */
+add1test:
+       subl    $4, %edi
+       jae     add1
+       addl    $4, %edi
+
+       je      done    /* Are there extra bytes? */
+       movl    (%esi), %edx    /* Load extra bytes in a full dword */
+       andl    mask-4(,%edi,4), %edx   /* Mask off excess */
+       addl    %edx, %eax      /* Add in the last bits */
+       adcl    $0, %eax
+done:
+       roll    %cl, %eax       /* Undo the rotation at the beginning */
+       movl    %eax, %edx
+       shrl    $16, %eax
+       addw    %dx, %ax        /* Add the two words in eax to form */
+       adcw    $0, %ax /* a 16 bit sum */
+       pop     %edi
+       pop     %esi
+       pop     %ebp
+       ret
+
+#ifdef __ACK__
+.rom
+#else
+.data
+#endif
+.balign        4
+mask:
+.long  0x000000FF, 0x0000FFFF, 0x00FFFFFF
+
+/* */
+/* $PchId: oneC_sum.ack.s,v 1.2 1996/03/12 19:33:51 philip Exp $ */
diff --git a/lib/libc/arch/i386/misc/oneC_sum.s b/lib/libc/arch/i386/misc/oneC_sum.s
deleted file mode 100644 (file)
index bfc001d..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-!      oneC_sum() - One complement`s checksum          Author: Kees J. Bot
-!                                                              9 May 1995
-! See RFC 1071, "Computing the Internet checksum"
-! See also the C version of this code.
-
-.sect .text
-
-.define _oneC_sum
-       .align  16
-_oneC_sum:
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       movzx   eax, 8(ebp)             ! Checksum of previous block
-       mov     esi, 12(ebp)            ! Data to compute checksum over
-       mov     edi, 16(ebp)            ! Number of bytes
-
-       xor     edx, edx
-       xorb    cl, cl
-align: test    esi, 3                  ! Is the data aligned?
-       jz      aligned
-       test    edi, edi
-       jz      0f
-       movb    dl, (esi)               ! Rotate the first unaligned bytes
-       dec     edi                     ! into the edx register
-0:     inc     esi
-       ror     edx, 8
-       ror     eax, 8                  ! Rotate the checksum likewise
-       addb    cl, 8                   ! Number of bits rotated
-       jmp     align
-aligned:add    eax, edx                ! Summate the unaligned bytes
-       adc     eax, 0                  ! Add carry back in for one`s complement
-
-       jmp     add6test
-       .align  16
-add6:  add     eax, (esi)              ! Six times unrolled loop, see below
-       adc     eax, 4(esi)
-       adc     eax, 8(esi)
-       adc     eax, 12(esi)
-       adc     eax, 16(esi)
-       adc     eax, 20(esi)
-       adc     eax, 0
-       add     esi, 24
-add6test:
-       sub     edi, 24
-       jae     add6
-       add     edi, 24
-
-       jmp     add1test
-       .align  16
-add1:  add     eax, (esi)              ! while ((edi -= 4) >= 0)
-       adc     eax, 0                  !       eax += *esi++;
-       add     esi, 4                  ! edi += 4;
-add1test:
-       sub     edi, 4
-       jae     add1
-       add     edi, 4
-
-       jz      done                    ! Are there extra bytes?
-       mov     edx, (esi)              ! Load extra bytes in a full dword
-       and     edx, mask-4(edi*4)      ! Mask off excess
-       add     eax, edx                ! Add in the last bits
-       adc     eax, 0
-done:  rol     eax, cl                 ! Undo the rotation at the beginning
-       mov     edx, eax
-       shr     eax, 16
-  o16  add     ax, dx                  ! Add the two words in eax to form
-  o16  adc     ax, 0                   ! a 16 bit sum
-       pop     edi
-       pop     esi
-       pop     ebp
-       ret
-
-.sect .rom
-       .align  4
-mask:  .data4  0x000000FF, 0x0000FFFF, 0x00FFFFFF
-
-!
-! $PchId: oneC_sum.ack.s,v 1.2 1996/03/12 19:33:51 philip Exp $
index 17610804b3a09b5e35187f896760df038546a1ed..99195247c3cecba391e15b8a904505bfea609752 100644 (file)
@@ -2,7 +2,7 @@
 .PATH: ${.CURDIR}/arch/${ARCH}/rts
 
 SRCS+=   \
-       __sigreturn.s \
-       _ipc.s \
-       _senda.s \
-       brksize.s
+       __sigreturn.S \
+       _ipc.S \
+       _senda.S \
+       brksize.S
diff --git a/lib/libc/arch/i386/rts/__sigreturn.S b/lib/libc/arch/i386/rts/__sigreturn.S
new file mode 100644 (file)
index 0000000..66f5cf4
--- /dev/null
@@ -0,0 +1,9 @@
+/* This routine is the low-level code for returning from signals.   */
+/* It calls __sigreturn, which is the normal "system call" routine. */
+/* Both ___sigreturn and __sigreturn are needed. */
+.text
+.globl ___sigreturn
+.extern        __sigreturn
+___sigreturn:
+       addl    $16, %esp
+       jmp     __sigreturn
diff --git a/lib/libc/arch/i386/rts/__sigreturn.s b/lib/libc/arch/i386/rts/__sigreturn.s
deleted file mode 100644 (file)
index 783d34f..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-! This routine is the low-level code for returning from signals.  
-! It calls __sigreturn, which is the normal "system call" routine.
-! Both ___sigreturn and __sigreturn are needed.
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.sect .text
-.define ___sigreturn
-.extern __sigreturn
-___sigreturn:
-       add esp, 16
-       jmp __sigreturn
diff --git a/lib/libc/arch/i386/rts/_ipc.S b/lib/libc/arch/i386/rts/_ipc.S
new file mode 100644 (file)
index 0000000..515603b
--- /dev/null
@@ -0,0 +1,83 @@
+.globl __notify, __send, __senda, __sendnb, __receive, __sendrec, __do_kernel_call
+
+/* See src/kernel/ipc.h for C definitions */
+       SEND = 1
+       RECEIVE = 2
+       SENDREC = 3
+       NOTIFY = 4
+       SENDNB = 5
+       IPCVEC = 33     /* ipc trap to kernel  */
+       KERVEC = 32     /* syscall trap to kernel */
+
+       SRC_DST = 8     /* source/ destination process  */
+       MESSAGE = 12    /* message pointer  */
+
+/**========================================================================* */
+/*                           IPC assembly routines                       * */
+/**========================================================================* */
+/* all message passing routines save ebp, but destroy eax and ecx. */
+.text
+__send:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %ebx
+       movl    SRC_DST(%ebp), %eax     /* eax = dest-src */
+       movl    MESSAGE(%ebp), %ebx     /* ebx = message pointer */
+       movl    $SEND, %ecx     /* _send(dest, ptr) */
+       int     $IPCVEC /* trap to the kernel */
+       pop     %ebx
+       pop     %ebp
+       ret
+
+__receive:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %ebx
+       movl    SRC_DST(%ebp), %eax     /* eax = dest-src */
+       movl    MESSAGE(%ebp), %ebx     /* ebx = message pointer */
+       movl    $RECEIVE, %ecx  /* _receive(src, ptr) */
+       int     $IPCVEC /* trap to the kernel */
+       pop     %ebx
+       pop     %ebp
+       ret
+
+__sendrec:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %ebx
+       movl    SRC_DST(%ebp), %eax     /* eax = dest-src */
+       movl    MESSAGE(%ebp), %ebx     /* ebx = message pointer */
+       movl    $SENDREC, %ecx  /* _sendrec(srcdest, ptr) */
+       int     $IPCVEC /* trap to the kernel */
+       pop     %ebx
+       pop     %ebp
+       ret
+
+__notify:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %ebx
+       movl    SRC_DST(%ebp), %eax     /* eax = destination  */
+       movl    $NOTIFY, %ecx   /* _notify(srcdst) */
+       int     $IPCVEC /* trap to the kernel */
+       pop     %ebx
+       pop     %ebp
+       ret
+
+__sendnb:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %ebx
+       movl    SRC_DST(%ebp), %eax     /* eax = dest-src */
+       movl    MESSAGE(%ebp), %ebx     /* ebx = message pointer */
+       movl    $SENDNB, %ecx   /* _sendnb(dest, ptr) */
+       int     $IPCVEC /* trap to the kernel */
+       pop     %ebx
+       pop     %ebp
+       ret
+
+__do_kernel_call:
+       /* pass the message pointer to kernel in the %eax register */
+       movl    4(%esp), %eax
+       int     $KERVEC
+       ret
diff --git a/lib/libc/arch/i386/rts/_ipc.s b/lib/libc/arch/i386/rts/_ipc.s
deleted file mode 100644 (file)
index 38a33d4..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __notify, __send, __senda, __sendnb, __receive, __sendrec, __do_kernel_call
-
-! See src/kernel/ipc.h for C definitions
-SEND = 1
-RECEIVE = 2
-SENDREC = 3 
-NOTIFY = 4
-SENDNB = 5
-IPCVEC = 33    ! ipc trap to kernel
-KERVEC = 32    ! syscall trap to kernel
-
-SRC_DST = 8                    ! source/ destination process 
-MESSAGE = 12                   ! message pointer 
-
-!*========================================================================*
-!                           IPC assembly routines                        *
-!*========================================================================*
-! all message passing routines save ebp, but destroy eax and ecx.
-.sect .text
-__send:
-       push    ebp
-       mov     ebp, esp
-       push    ebx
-       mov     eax, SRC_DST(ebp)       ! eax = dest-src
-       mov     ebx, MESSAGE(ebp)       ! ebx = message pointer
-       mov     ecx, SEND               ! _send(dest, ptr)
-       int     IPCVEC                  ! trap to the kernel
-       pop     ebx
-       pop     ebp
-       ret
-
-__receive:
-       push    ebp
-       mov     ebp, esp
-       push    ebx
-       mov     eax, SRC_DST(ebp)       ! eax = dest-src
-       mov     ebx, MESSAGE(ebp)       ! ebx = message pointer
-       mov     ecx, RECEIVE            ! _receive(src, ptr)
-       int     IPCVEC                  ! trap to the kernel
-       pop     ebx
-       pop     ebp
-       ret
-
-__sendrec:
-       push    ebp
-       mov     ebp, esp
-       push    ebx
-       mov     eax, SRC_DST(ebp)       ! eax = dest-src
-       mov     ebx, MESSAGE(ebp)       ! ebx = message pointer
-       mov     ecx, SENDREC            ! _sendrec(srcdest, ptr)
-       int     IPCVEC                  ! trap to the kernel
-       pop     ebx
-       pop     ebp
-       ret
-
-__notify:
-       push    ebp
-       mov     ebp, esp
-       push    ebx
-       mov     eax, SRC_DST(ebp)       ! eax = destination 
-       mov     ecx, NOTIFY             ! _notify(srcdst)
-       int     IPCVEC                  ! trap to the kernel
-       pop     ebx
-       pop     ebp
-       ret
-
-__sendnb:
-       push    ebp
-       mov     ebp, esp
-       push    ebx
-       mov     eax, SRC_DST(ebp)       ! eax = dest-src
-       mov     ebx, MESSAGE(ebp)       ! ebx = message pointer
-       mov     ecx, SENDNB             ! _sendnb(dest, ptr)
-       int     IPCVEC                  ! trap to the kernel
-       pop     ebx
-       pop     ebp
-       ret
-
-__do_kernel_call:
-       ! pass the message pointer to kernel in the %eax register
-       mov     eax, 4(esp)
-       int     KERVEC
-       ret
diff --git a/lib/libc/arch/i386/rts/_senda.S b/lib/libc/arch/i386/rts/_senda.S
new file mode 100644 (file)
index 0000000..3b5deec
--- /dev/null
@@ -0,0 +1,21 @@
+.globl __senda
+
+       SENDA = 16
+       SYSVEC = 33
+
+       MSGTAB = 8      /* message table */
+       TABCOUNT = 12   /* number of entries in message table */
+
+.text
+
+__senda:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %ebx
+       movl    TABCOUNT(%ebp), %eax    /* eax = count */
+       movl    MSGTAB(%ebp), %ebx      /* ebx = table */
+       movl    $SENDA, %ecx    /* _senda(table, count) */
+       int     $SYSVEC /* trap to the kernel */
+       pop     %ebx
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/rts/_senda.s b/lib/libc/arch/i386/rts/_senda.s
deleted file mode 100644 (file)
index 703411e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __senda
-
-SENDA = 16
-SYSVEC = 33
-
-MSGTAB = 8                     ! message table
-TABCOUNT = 12                  ! number of entries in message table
-
-.sect .text
-
-__senda:
-       push    ebp
-       mov     ebp, esp
-       push    ebx
-       mov     eax, TABCOUNT(ebp)      ! eax = count
-       mov     ebx, MSGTAB(ebp)        ! ebx = table
-       mov     ecx, SENDA              ! _senda(table, count)
-       int     SYSVEC                  ! trap to the kernel
-       pop     ebx
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/rts/brksize.S b/lib/libc/arch/i386/rts/brksize.S
new file mode 100644 (file)
index 0000000..43b3033
--- /dev/null
@@ -0,0 +1,5 @@
+.globl __brksize
+.data
+.extern        endbss, __brksize
+__brksize:
+.long  endbss
diff --git a/lib/libc/arch/i386/rts/brksize.s b/lib/libc/arch/i386/rts/brksize.s
deleted file mode 100644 (file)
index b24888b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-.sect .text; .sect .rom; .sect .data; .sect .bss
-.define __brksize
-.sect .data
-.extern endbss, __brksize
-__brksize: .data4 endbss
index 8cc3e077f10f96228d51c429332f85b0322142dd..b01f09f72ffe792d260c42655d6b556059fc2759 100644 (file)
@@ -2,28 +2,28 @@
 .PATH: ${.CURDIR}/arch/${ARCH}/string
 
 SRCS+=  \
-       _memmove.s \
-       _strncat.s \
-       _strncmp.s \
-       _strncpy.s \
-       _strnlen.s \
-       bcmp.s \
-       bcopy.s \
-       bzero.s \
-       index.s \
-       memchr.s \
-       memcmp.s \
-       memcpy.s \
-       memmove.s \
-       memset.s \
-       rindex.s \
-       strcat.s \
-       strchr.s \
-       strcmp.s \
-       strcpy.s \
-       strlen.s \
-       strncat.s \
-       strncmp.s \
-       strncpy.s \
-       strnlen.s \
-       strrchr.s
+       _memmove.S \
+       _strncat.S \
+       _strncmp.S \
+       _strncpy.S \
+       _strnlen.S \
+       bcmp.S \
+       bcopy.S \
+       bzero.S \
+       index.S \
+       memchr.S \
+       memcmp.S \
+       memcpy.S \
+       memmove.S \
+       memset.S \
+       rindex.S \
+       strcat.S \
+       strchr.S \
+       strcmp.S \
+       strcpy.S \
+       strlen.S \
+       strncat.S \
+       strncmp.S \
+       strncpy.S \
+       strnlen.S \
+       strrchr.S
diff --git a/lib/libc/arch/i386/string/_memmove.S b/lib/libc/arch/i386/string/_memmove.S
new file mode 100644 (file)
index 0000000..0fa693f
--- /dev/null
@@ -0,0 +1,60 @@
+/*     _memmove()                                      Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* void *_memmove(void *s1, const void *s2, size_t n) */
+/*     Copy a chunk of memory.  Handle overlap. */
+/* */
+.text
+.globl __memmove, __memcpy
+.balign        16
+__memmove:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       movl    8(%ebp), %edi   /* String s1 */
+       movl    12(%ebp), %esi  /* String s2 */
+       movl    16(%ebp), %ecx  /* Length */
+       movl    %edi, %eax
+       subl    %esi, %eax
+       cmpl    %ecx, %eax
+       jb      downwards       /* if (s2 - s1) < n then copy downwards */
+__memcpy:
+       cld     /* Clear direction bit: upwards */
+       cmpl    $16, %ecx
+       jb      upbyte  /* Don't bother being smart with short arrays */
+       movl    %esi, %eax
+       orl     %edi, %eax
+       testb   $1, %al
+       jne     upbyte  /* Bit 0 set, use byte copy */
+       testb   $2, %al
+       jne     upword  /* Bit 1 set, use word copy */
+uplword:
+       shrdl   $2, %ecx, %eax  /* Save low 2 bits of ecx in eax */
+       shrl    $2, %ecx
+
+       rep movsl       /* Copy longwords. */
+       shldl   $2, %eax, %ecx  /* Restore excess count */
+upword:
+       shrl    $1, %ecx
+
+       rep movsw       /* Copy words */
+       adcl    %ecx, %ecx      /* One more byte? */
+upbyte:
+       rep movsb       /* Copy bytes */
+done:
+       movl    8(%ebp), %eax   /* Absolutely noone cares about this value */
+       pop     %edi
+       pop     %esi
+       pop     %ebp
+       ret
+
+/* Handle bad overlap by copying downwards, don't bother to do word copies. */
+downwards:
+       std     /* Set direction bit: downwards */
+       leal    -1(%esi,%ecx,1), %esi
+       leal    -1(%edi,%ecx,1), %edi
+
+       rep movsb       /* Copy bytes */
+       cld
+       jmp     done
diff --git a/lib/libc/arch/i386/string/_memmove.s b/lib/libc/arch/i386/string/_memmove.s
deleted file mode 100644 (file)
index 4533640..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-!      _memmove()                                      Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *_memmove(void *s1, const void *s2, size_t n)
-!      Copy a chunk of memory.  Handle overlap.
-!
-.sect .text
-.define __memmove, __memcpy
-       .align  16
-__memmove:
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       mov     edi, 8(ebp)     ! String s1
-       mov     esi, 12(ebp)    ! String s2
-       mov     ecx, 16(ebp)    ! Length
-       mov     eax, edi
-       sub     eax, esi
-       cmp     eax, ecx
-       jb      downwards       ! if (s2 - s1) < n then copy downwards
-__memcpy:
-       cld                     ! Clear direction bit: upwards
-       cmp     ecx, 16
-       jb      upbyte          ! Don't bother being smart with short arrays
-       mov     eax, esi
-       or      eax, edi
-       testb   al, 1
-       jnz     upbyte          ! Bit 0 set, use byte copy
-       testb   al, 2
-       jnz     upword          ! Bit 1 set, use word copy
-uplword:shrd   eax, ecx, 2     ! Save low 2 bits of ecx in eax
-       shr     ecx, 2
-       rep
-       movs                    ! Copy longwords.
-       shld    ecx, eax, 2     ! Restore excess count
-upword:        shr     ecx, 1
-       rep
-    o16        movs                    ! Copy words
-       adc     ecx, ecx        ! One more byte?
-upbyte:        rep
-       movsb                   ! Copy bytes
-done:  mov     eax, 8(ebp)     ! Absolutely noone cares about this value
-       pop     edi
-       pop     esi
-       pop     ebp
-       ret
-
-! Handle bad overlap by copying downwards, don't bother to do word copies.
-downwards:
-       std                     ! Set direction bit: downwards
-       lea     esi, -1(esi)(ecx*1)
-       lea     edi, -1(edi)(ecx*1)
-       rep
-       movsb                   ! Copy bytes
-       cld
-       jmp     done
diff --git a/lib/libc/arch/i386/string/_strncat.S b/lib/libc/arch/i386/string/_strncat.S
new file mode 100644 (file)
index 0000000..aaa62f0
--- /dev/null
@@ -0,0 +1,41 @@
+/*     _strncat()                                      Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* char *_strncat(char *s1, const char *s2, size_t edx) */
+/*     Append string s2 to s1. */
+/* */
+.text
+.globl __strncat
+.balign        16
+__strncat:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       movl    8(%ebp), %edi   /* String s1 */
+       movl    $-1, %ecx
+       xorb    %al, %al        /* Null byte */
+       cld
+
+       repne scasb     /* Look for the zero byte in s1 */
+       decl    %edi    /* Back one up (and clear 'Z' flag) */
+       push    %edi    /* Save end of s1 */
+       movl    12(%ebp), %edi  /* edi = string s2 */
+       movl    %edx, %ecx      /* Maximum count */
+
+       repne scasb     /* Look for the end of s2 */
+       jne     no0
+       incl    %ecx    /* Exclude null byte */
+no0:
+       subl    %ecx, %edx      /* Number of bytes in s2 */
+       movl    %edx, %ecx
+       movl    12(%ebp), %esi  /* esi = string s2 */
+       pop     %edi    /* edi = end of string s1 */
+
+       rep movsb       /* Copy bytes */
+       stosb   /* Add a terminating null */
+       movl    8(%ebp), %eax   /* Return s1 */
+       pop     %edi
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/_strncat.s b/lib/libc/arch/i386/string/_strncat.s
deleted file mode 100644 (file)
index 6c9873b..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-!      _strncat()                                      Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *_strncat(char *s1, const char *s2, size_t edx)
-!      Append string s2 to s1.
-!
-.sect .text
-.define __strncat
-       .align  16
-__strncat:
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       mov     edi, 8(ebp)     ! String s1
-       mov     ecx, -1
-       xorb    al, al          ! Null byte
-       cld
-       repne
-       scasb                   ! Look for the zero byte in s1
-       dec     edi             ! Back one up (and clear 'Z' flag)
-       push    edi             ! Save end of s1
-       mov     edi, 12(ebp)    ! edi = string s2
-       mov     ecx, edx        ! Maximum count
-       repne
-       scasb                   ! Look for the end of s2
-       jne     no0
-       inc     ecx             ! Exclude null byte
-no0:   sub     edx, ecx        ! Number of bytes in s2
-       mov     ecx, edx
-       mov     esi, 12(ebp)    ! esi = string s2
-       pop     edi             ! edi = end of string s1
-       rep
-       movsb                   ! Copy bytes
-       stosb                   ! Add a terminating null
-       mov     eax, 8(ebp)     ! Return s1
-       pop     edi
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/_strncmp.S b/lib/libc/arch/i386/string/_strncmp.S
new file mode 100644 (file)
index 0000000..c4f8970
--- /dev/null
@@ -0,0 +1,35 @@
+/*     strncmp()                                       Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* int strncmp(const char *s1, const char *s2, size_t ecx) */
+/*     Compare two strings. */
+/* */
+.text
+.globl __strncmp
+.balign        16
+__strncmp:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       testl   %ecx, %ecx      /* Max length is zero? */
+       je      done
+       movl    8(%ebp), %esi   /* esi = string s1 */
+       movl    12(%ebp), %edi  /* edi = string s2 */
+       cld
+compare:
+       cmpsb   /* Compare two bytes */
+       jne     done
+       cmpb    $0, -1(%esi)    /* End of string? */
+       je      done
+       decl    %ecx    /* Length limit reached? */
+       jne     compare
+done:
+       seta    %al     /* al = (s1 > s2) */
+       setb    %ah     /* ah = (s1 < s2) */
+       subb    %ah, %al
+       movsbl  %al, %eax       /* eax = (s1 > s2) - (s1 < s2), i.e. -1, 0, 1 */
+       pop     %edi
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/_strncmp.s b/lib/libc/arch/i386/string/_strncmp.s
deleted file mode 100644 (file)
index 8aea8d3..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-!      strncmp()                                       Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strncmp(const char *s1, const char *s2, size_t ecx)
-!      Compare two strings.
-!
-.sect .text
-.define __strncmp
-       .align  16
-__strncmp:
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       test    ecx, ecx        ! Max length is zero?
-       je      done
-       mov     esi, 8(ebp)     ! esi = string s1
-       mov     edi, 12(ebp)    ! edi = string s2
-       cld
-compare:
-       cmpsb                   ! Compare two bytes
-       jne     done
-       cmpb    -1(esi), 0      ! End of string?
-       je      done
-       dec     ecx             ! Length limit reached?
-       jne     compare
-done:  seta    al              ! al = (s1 > s2)
-       setb    ah              ! ah = (s1 < s2)
-       subb    al, ah
-       movsxb  eax, al         ! eax = (s1 > s2) - (s1 < s2), i.e. -1, 0, 1
-       pop     edi
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/_strncpy.S b/lib/libc/arch/i386/string/_strncpy.S
new file mode 100644 (file)
index 0000000..63bd6fc
--- /dev/null
@@ -0,0 +1,23 @@
+/*     _strncpy()                                      Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* char *_strncpy(char *s1, const char *s2, size_t ecx) */
+/*     Copy string s2 to s1. */
+/* */
+.text
+.globl __strncpy
+.balign        16
+__strncpy:
+       movl    12(%ebp), %edi  /* edi = string s2 */
+       xorb    %al, %al        /* Look for a zero byte */
+       movl    %ecx, %edx      /* Save maximum count */
+       cld
+
+       repne scasb     /* Look for end of s2 */
+       subl    %ecx, %edx      /* Number of bytes in s2 including null */
+       xchgl   %edx, %ecx
+       movl    12(%ebp), %esi  /* esi = string s2 */
+       movl    8(%ebp), %edi   /* edi = string s1 */
+
+       rep movsb       /* Copy bytes */
+       ret
diff --git a/lib/libc/arch/i386/string/_strncpy.s b/lib/libc/arch/i386/string/_strncpy.s
deleted file mode 100644 (file)
index 15b8966..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-!      _strncpy()                                      Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *_strncpy(char *s1, const char *s2, size_t ecx)
-!      Copy string s2 to s1.
-!
-.sect .text
-.define __strncpy
-       .align  16
-__strncpy:
-       mov     edi, 12(ebp)    ! edi = string s2
-       xorb    al, al          ! Look for a zero byte
-       mov     edx, ecx        ! Save maximum count
-       cld
-       repne
-       scasb                   ! Look for end of s2
-       sub     edx, ecx        ! Number of bytes in s2 including null
-       xchg    ecx, edx
-       mov     esi, 12(ebp)    ! esi = string s2
-       mov     edi, 8(ebp)     ! edi = string s1
-       rep
-       movsb                   ! Copy bytes
-       ret
diff --git a/lib/libc/arch/i386/string/_strnlen.S b/lib/libc/arch/i386/string/_strnlen.S
new file mode 100644 (file)
index 0000000..46bbf7d
--- /dev/null
@@ -0,0 +1,28 @@
+/*     _strnlen()                                      Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* size_t _strnlen(const char *s, size_t ecx) */
+/*     Return the length of a string. */
+/* */
+.text
+.globl __strnlen
+.balign        16
+__strnlen:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %edi
+       movl    8(%ebp), %edi   /* edi = string */
+       xorb    %al, %al        /* Look for a zero byte */
+       movl    %ecx, %edx      /* Save maximum count */
+       cmpb    $1, %cl /* 'Z' bit must be clear if ecx = 0 */
+       cld
+
+       repne scasb     /* Look for zero */
+       jne     no0
+       incl    %ecx    /* Don't count zero byte */
+no0:
+       movl    %edx, %eax
+       subl    %ecx, %eax      /* Compute bytes scanned */
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/_strnlen.s b/lib/libc/arch/i386/string/_strnlen.s
deleted file mode 100644 (file)
index b17b373..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-!      _strnlen()                                      Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t _strnlen(const char *s, size_t ecx)
-!      Return the length of a string.
-!
-.sect .text
-.define __strnlen
-       .align  16
-__strnlen:
-       push    ebp
-       mov     ebp, esp
-       push    edi
-       mov     edi, 8(ebp)     ! edi = string
-       xorb    al, al          ! Look for a zero byte
-       mov     edx, ecx        ! Save maximum count
-       cmpb    cl, 1           ! 'Z' bit must be clear if ecx = 0
-       cld
-       repne
-       scasb                   ! Look for zero
-       jne     no0
-       inc     ecx             ! Don't count zero byte
-no0:   mov     eax, edx
-       sub     eax, ecx        ! Compute bytes scanned
-       pop     edi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/bcmp.S b/lib/libc/arch/i386/string/bcmp.S
new file mode 100644 (file)
index 0000000..f976534
--- /dev/null
@@ -0,0 +1,28 @@
+/*     bcmp()                                          Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* int bcmp(const void *s1, const void *s2, size_t n) */
+/*     Compare two chunks of memory. */
+/*     This is a BSD routine that escaped from the kernel.  Don't use. */
+/*     (Alas it is not without some use, it reports the number of bytes */
+/*     after the bytes that are equal.  So it can't be simply replaced.) */
+/* */
+.text
+.globl _bcmp
+.balign        16
+_bcmp:
+       push    %ebp
+       movl    %esp, %ebp
+       push    16(%ebp)
+       push    12(%ebp)
+       push    8(%ebp)
+       call    _memcmp /* Let memcmp do the work */
+       testl   %eax, %eax
+       je      equal
+       subl    8(%ebp), %edx   /* Memcmp was nice enough to leave "esi" in edx */
+       decl    %edx    /* Number of bytes that are equal */
+       movl    16(%ebp), %eax
+       subl    %edx, %eax      /* Number of bytes that are unequal */
+equal:
+       leave
+       ret
diff --git a/lib/libc/arch/i386/string/bcmp.s b/lib/libc/arch/i386/string/bcmp.s
deleted file mode 100644 (file)
index e9f99c1..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-!      bcmp()                                          Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int bcmp(const void *s1, const void *s2, size_t n)
-!      Compare two chunks of memory.
-!      This is a BSD routine that escaped from the kernel.  Don't use.
-!      (Alas it is not without some use, it reports the number of bytes
-!      after the bytes that are equal.  So it can't be simply replaced.)
-!
-.sect .text
-.define _bcmp
-       .align  16
-_bcmp:
-       push    ebp
-       mov     ebp, esp
-       push    16(ebp)
-       push    12(ebp)
-       push    8(ebp)
-       call    _memcmp         ! Let memcmp do the work
-       test    eax, eax
-       jz      equal
-       sub     edx, 8(ebp)     ! Memcmp was nice enough to leave "esi" in edx
-       dec     edx             ! Number of bytes that are equal
-       mov     eax, 16(ebp)
-       sub     eax, edx        ! Number of bytes that are unequal
-equal: leave
-       ret
diff --git a/lib/libc/arch/i386/string/bcopy.S b/lib/libc/arch/i386/string/bcopy.S
new file mode 100644 (file)
index 0000000..47540d2
--- /dev/null
@@ -0,0 +1,15 @@
+/*     bcopy()                                         Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* void bcopy(const void *s1, void *s2, size_t n) */
+/*     Copy a chunk of memory.  Handle overlap. */
+/*     This is a BSD routine that escaped from the kernel.  Don't use. */
+/* */
+.text
+.globl _bcopy
+.balign        16
+_bcopy:
+       movl    4(%esp), %eax   /* Exchange string arguments */
+       xchgl   8(%esp), %eax
+       movl    %eax, 4(%esp)
+       jmp     __memmove       /* Call the proper routine */
diff --git a/lib/libc/arch/i386/string/bcopy.s b/lib/libc/arch/i386/string/bcopy.s
deleted file mode 100644 (file)
index dc6bf89..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-!      bcopy()                                         Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void bcopy(const void *s1, void *s2, size_t n)
-!      Copy a chunk of memory.  Handle overlap.
-!      This is a BSD routine that escaped from the kernel.  Don't use.
-!
-.sect .text
-.define _bcopy
-       .align  16
-_bcopy:
-       mov     eax, 4(esp)     ! Exchange string arguments
-       xchg    eax, 8(esp)
-       mov     4(esp), eax
-       jmp     __memmove       ! Call the proper routine
diff --git a/lib/libc/arch/i386/string/bzero.S b/lib/libc/arch/i386/string/bzero.S
new file mode 100644 (file)
index 0000000..07f0db0
--- /dev/null
@@ -0,0 +1,19 @@
+/*     bzero()                                         Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* void bzero(void *s, size_t n) */
+/*     Set a chunk of memory to zero. */
+/*     This is a BSD routine that escaped from the kernel.  Don't use. */
+/* */
+.text
+.globl _bzero
+.balign        16
+_bzero:
+       push    %ebp
+       movl    %esp, %ebp
+       push    12(%ebp)        /* Size */
+       push    $0      /* Zero */
+       push    8(%ebp) /* String */
+       call    _memset /* Call the proper routine */
+       leave
+       ret
diff --git a/lib/libc/arch/i386/string/bzero.s b/lib/libc/arch/i386/string/bzero.s
deleted file mode 100644 (file)
index 4223472..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-!      bzero()                                         Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void bzero(void *s, size_t n)
-!      Set a chunk of memory to zero.
-!      This is a BSD routine that escaped from the kernel.  Don't use.
-!
-.sect .text
-.define _bzero
-       .align  16
-_bzero:
-       push    ebp
-       mov     ebp, esp
-       push    12(ebp)         ! Size
-       push    0               ! Zero
-       push    8(ebp)          ! String
-       call    _memset         ! Call the proper routine
-       leave
-       ret
diff --git a/lib/libc/arch/i386/string/index.S b/lib/libc/arch/i386/string/index.S
new file mode 100644 (file)
index 0000000..12ea7ea
--- /dev/null
@@ -0,0 +1,12 @@
+/*     index()                                         Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* char *index(const char *s, int c) */
+/*     Look for a character in a string.  Has suffered from a hostile */
+/*     takeover by strchr(). */
+/* */
+.text
+.globl _index
+.balign        16
+_index:
+       jmp     _strchr
diff --git a/lib/libc/arch/i386/string/index.s b/lib/libc/arch/i386/string/index.s
deleted file mode 100644 (file)
index 704afe5..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      index()                                         Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *index(const char *s, int c)
-!      Look for a character in a string.  Has suffered from a hostile
-!      takeover by strchr().
-!
-.sect .text
-.define _index
-       .align  16
-_index:
-       jmp     _strchr
diff --git a/lib/libc/arch/i386/string/memchr.S b/lib/libc/arch/i386/string/memchr.S
new file mode 100644 (file)
index 0000000..7607374
--- /dev/null
@@ -0,0 +1,30 @@
+/*     memchr()                                        Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* void *memchr(const void *s, int c, size_t n) */
+/*     Look for a character in a chunk of memory. */
+/* */
+.text
+.globl _memchr
+.balign        16
+_memchr:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %edi
+       movl    8(%ebp), %edi   /* edi = string */
+       movb    12(%ebp), %al   /* The character to look for */
+       movl    16(%ebp), %ecx  /* Length */
+       cmpb    $1, %cl /* 'Z' bit must be clear if ecx = 0 */
+       cld
+
+       repne scasb
+       jne     failure
+       leal    -1(%edi), %eax  /* Found */
+       pop     %edi
+       pop     %ebp
+       ret
+failure:
+       xorl    %eax, %eax
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/memchr.s b/lib/libc/arch/i386/string/memchr.s
deleted file mode 100644 (file)
index 6eb3a67..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-!      memchr()                                        Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memchr(const void *s, int c, size_t n)
-!      Look for a character in a chunk of memory.
-!
-.sect .text
-.define _memchr
-       .align  16
-_memchr:
-       push    ebp
-       mov     ebp, esp
-       push    edi
-       mov     edi, 8(ebp)     ! edi = string
-       movb    al, 12(ebp)     ! The character to look for
-       mov     ecx, 16(ebp)    ! Length
-       cmpb    cl, 1           ! 'Z' bit must be clear if ecx = 0
-       cld
-       repne
-       scasb
-       jne     failure
-       lea     eax, -1(edi)    ! Found
-       pop     edi
-       pop     ebp
-       ret
-failure:xor    eax, eax
-       pop     edi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/memcmp.S b/lib/libc/arch/i386/string/memcmp.S
new file mode 100644 (file)
index 0000000..6a2c5a9
--- /dev/null
@@ -0,0 +1,58 @@
+/*     memcmp()                                        Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* int memcmp(const void *s1, const void *s2, size_t n) */
+/*     Compare two chunks of memory. */
+/* */
+.text
+.globl _memcmp
+.balign        16
+_memcmp:
+       cld
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       movl    8(%ebp), %esi   /* String s1 */
+       movl    12(%ebp), %edi  /* String s2 */
+       movl    16(%ebp), %ecx  /* Length */
+       cmpl    $16, %ecx
+       jb      cbyte   /* Don't bother being smart with short arrays */
+       movl    %esi, %eax
+       orl     %edi, %eax
+       testb   $1, %al
+       jne     cbyte   /* Bit 0 set, use byte compare */
+       testb   $2, %al
+       jne     cword   /* Bit 1 set, use word compare */
+clword:
+       shrdl   $2, %ecx, %eax  /* Save low two bits of ecx in eax */
+       shrl    $2, %ecx
+
+       repe cmpsl      /* Compare longwords */
+       subl    $4, %esi
+       subl    $4, %edi
+       incl    %ecx    /* Recompare the last longword */
+       shldl   $2, %eax, %ecx  /* And any excess bytes */
+       jmp     last
+cword:
+       shrdl   $1, %ecx, %eax  /* Save low bit of ecx in eax */
+       shrl    $1, %ecx
+
+       repe cmpsw      /* Compare words */
+       subl    $2, %esi
+       subl    $2, %edi
+       incl    %ecx    /* Recompare the last word */
+       shldl   $1, %eax, %ecx  /* And one more byte? */
+cbyte:
+       testl   %ecx, %ecx      /* Set 'Z' flag if ecx = 0 */
+last:
+       repe cmpsb      /* Look for the first differing byte */
+       seta    %al     /* al = (s1 > s2) */
+       setb    %ah     /* ah = (s1 < s2) */
+       subb    %ah, %al
+       movsbl  %al, %eax       /* eax = (s1 > s2) - (s1 < s2), i.e. -1, 0, 1 */
+       movl    %esi, %edx      /* For bcmp() to play with */
+       pop     %edi
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/memcmp.s b/lib/libc/arch/i386/string/memcmp.s
deleted file mode 100644 (file)
index 6ac8e35..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-!      memcmp()                                        Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int memcmp(const void *s1, const void *s2, size_t n)
-!      Compare two chunks of memory.
-!
-.sect .text
-.define _memcmp
-       .align  16
-_memcmp:
-       cld
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       mov     esi, 8(ebp)     ! String s1
-       mov     edi, 12(ebp)    ! String s2
-       mov     ecx, 16(ebp)    ! Length
-       cmp     ecx, 16
-       jb      cbyte           ! Don't bother being smart with short arrays
-       mov     eax, esi
-       or      eax, edi
-       testb   al, 1
-       jnz     cbyte           ! Bit 0 set, use byte compare
-       testb   al, 2
-       jnz     cword           ! Bit 1 set, use word compare
-clword:        shrd    eax, ecx, 2     ! Save low two bits of ecx in eax
-       shr     ecx, 2
-       repe
-       cmps                    ! Compare longwords
-       sub     esi, 4
-       sub     edi, 4
-       inc     ecx             ! Recompare the last longword
-       shld    ecx, eax, 2     ! And any excess bytes
-       jmp     last
-cword: shrd    eax, ecx, 1     ! Save low bit of ecx in eax
-       shr     ecx, 1
-       repe
-    o16        cmps                    ! Compare words
-       sub     esi, 2
-       sub     edi, 2
-       inc     ecx             ! Recompare the last word
-       shld    ecx, eax, 1     ! And one more byte?
-cbyte: test    ecx, ecx        ! Set 'Z' flag if ecx = 0
-last:  repe
-       cmpsb                   ! Look for the first differing byte
-       seta    al              ! al = (s1 > s2)
-       setb    ah              ! ah = (s1 < s2)
-       subb    al, ah
-       movsxb  eax, al         ! eax = (s1 > s2) - (s1 < s2), i.e. -1, 0, 1
-       mov     edx, esi        ! For bcmp() to play with
-       pop     edi
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/memcpy.S b/lib/libc/arch/i386/string/memcpy.S
new file mode 100644 (file)
index 0000000..ed69842
--- /dev/null
@@ -0,0 +1,23 @@
+/*     memcpy()                                        Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* void *memcpy(void *s1, const void *s2, size_t n) */
+/*     Copy a chunk of memory. */
+/*     This routine need not handle overlap, so it does not handle overlap. */
+/*     One could simply call __memmove, the cost of the overlap check is */
+/*     negligible, but you are dealing with a programmer who believes that if */
+/*     anything can go wrong, it should go wrong. */
+/* */
+.text
+.globl _memcpy
+.balign        16
+_memcpy:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       movl    8(%ebp), %edi   /* String s1 */
+       movl    12(%ebp), %esi  /* String s2 */
+       movl    16(%ebp), %ecx  /* Length */
+/* No overlap check here */
+       jmp     __memcpy        /* Call the part of __memmove that copies up */
diff --git a/lib/libc/arch/i386/string/memcpy.s b/lib/libc/arch/i386/string/memcpy.s
deleted file mode 100644 (file)
index 32a23b2..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-!      memcpy()                                        Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memcpy(void *s1, const void *s2, size_t n)
-!      Copy a chunk of memory.
-!      This routine need not handle overlap, so it does not handle overlap.
-!      One could simply call __memmove, the cost of the overlap check is
-!      negligible, but you are dealing with a programmer who believes that
-!      if anything can go wrong, it should go wrong.
-!
-.sect .text
-.define _memcpy
-       .align  16
-_memcpy:
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       mov     edi, 8(ebp)     ! String s1
-       mov     esi, 12(ebp)    ! String s2
-       mov     ecx, 16(ebp)    ! Length
-       ! No overlap check here
-       jmp     __memcpy        ! Call the part of __memmove that copies up
diff --git a/lib/libc/arch/i386/string/memmove.S b/lib/libc/arch/i386/string/memmove.S
new file mode 100644 (file)
index 0000000..f42ce05
--- /dev/null
@@ -0,0 +1,11 @@
+/*     memmove()                                       Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* void *memmove(void *s1, const void *s2, size_t n) */
+/*     Copy a chunk of memory.  Handle overlap. */
+/* */
+.text
+.globl _memmove
+.balign        16
+_memmove:
+       jmp     __memmove       /* Call common code */
diff --git a/lib/libc/arch/i386/string/memmove.s b/lib/libc/arch/i386/string/memmove.s
deleted file mode 100644 (file)
index 5962ffa..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-!      memmove()                                       Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memmove(void *s1, const void *s2, size_t n)
-!      Copy a chunk of memory.  Handle overlap.
-!
-.sect .text
-.define _memmove
-       .align  16
-_memmove:
-       jmp     __memmove       ! Call common code
diff --git a/lib/libc/arch/i386/string/memset.S b/lib/libc/arch/i386/string/memset.S
new file mode 100644 (file)
index 0000000..22f0836
--- /dev/null
@@ -0,0 +1,46 @@
+/*     memset()                                        Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* void *memset(void *s, int c, size_t n) */
+/*     Set a chunk of memory to the same byte value. */
+/* */
+.text
+.globl _memset
+.balign        16
+_memset:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %edi
+       movl    8(%ebp), %edi   /* The string */
+       movzbl  12(%ebp), %eax  /* The fill byte */
+       movl    16(%ebp), %ecx  /* Length */
+       cld
+       cmpl    $16, %ecx
+       jb      sbyte   /* Don't bother being smart with short arrays */
+       testl   $1, %edi
+       jne     sbyte   /* Bit 0 set, use byte store */
+       testl   $2, %edi
+       jne     sword   /* Bit 1 set, use word store */
+slword:
+       movb    %al, %ah
+       movl    %eax, %edx
+       sall    $16, %edx
+       orl     %edx, %eax      /* One byte to four bytes */
+       shrdl   $2, %ecx, %edx  /* Save low two bits of ecx in edx */
+       shrl    $2, %ecx
+
+       rep stosl       /* Store longwords. */
+       shldl   $2, %edx, %ecx  /* Restore low two bits */
+sword:
+       movb    %al, %ah        /* One byte to two bytes */
+       shrl    $1, %ecx
+
+       rep stosw       /* Store words */
+       adcl    %ecx, %ecx      /* One more byte? */
+sbyte:
+       rep stosb       /* Store bytes */
+done:
+       movl    8(%ebp), %eax   /* Return some value you have no need for */
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/memset.s b/lib/libc/arch/i386/string/memset.s
deleted file mode 100644 (file)
index 4da22df..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-!      memset()                                        Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! void *memset(void *s, int c, size_t n)
-!      Set a chunk of memory to the same byte value.
-!
-.sect .text
-.define _memset
-       .align  16
-_memset:
-       push    ebp
-       mov     ebp, esp
-       push    edi
-       mov     edi, 8(ebp)     ! The string
-       movzxb  eax, 12(ebp)    ! The fill byte
-       mov     ecx, 16(ebp)    ! Length
-       cld
-       cmp     ecx, 16
-       jb      sbyte           ! Don't bother being smart with short arrays
-       test    edi, 1
-       jnz     sbyte           ! Bit 0 set, use byte store
-       test    edi, 2
-       jnz     sword           ! Bit 1 set, use word store
-slword:        movb    ah, al
-       mov     edx, eax
-       sal     edx, 16
-       or      eax, edx        ! One byte to four bytes
-       shrd    edx, ecx, 2     ! Save low two bits of ecx in edx
-       shr     ecx, 2
-       rep
-       stos                    ! Store longwords.
-       shld    ecx, edx, 2     ! Restore low two bits
-sword: movb    ah, al          ! One byte to two bytes
-       shr     ecx, 1
-       rep
-    o16        stos                    ! Store words
-       adc     ecx, ecx        ! One more byte?
-sbyte: rep
-       stosb                   ! Store bytes
-done:  mov     eax, 8(ebp)     ! Return some value you have no need for
-       pop     edi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/rindex.S b/lib/libc/arch/i386/string/rindex.S
new file mode 100644 (file)
index 0000000..24e9cfb
--- /dev/null
@@ -0,0 +1,12 @@
+/*     rindex()                                        Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* char *rindex(const char *s, int c) */
+/*     Look for the last occurrence a character in a string.  Has suffered */
+/*     from a hostile takeover by strrchr(). */
+/* */
+.text
+.globl _rindex
+.balign        16
+_rindex:
+       jmp     _strrchr
diff --git a/lib/libc/arch/i386/string/rindex.s b/lib/libc/arch/i386/string/rindex.s
deleted file mode 100644 (file)
index 3c8163e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      rindex()                                        Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *rindex(const char *s, int c)
-!      Look for the last occurrence a character in a string.  Has suffered
-!      from a hostile takeover by strrchr().
-!
-.sect .text
-.define _rindex
-       .align  16
-_rindex:
-       jmp     _strrchr
diff --git a/lib/libc/arch/i386/string/strcat.S b/lib/libc/arch/i386/string/strcat.S
new file mode 100644 (file)
index 0000000..9b9df6b
--- /dev/null
@@ -0,0 +1,12 @@
+/*     strcat()                                        Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* char *strcat(char *s1, const char *s2) */
+/*     Append string s2 to s1. */
+/* */
+.text
+.globl _strcat
+.balign        16
+_strcat:
+       movl    $-1, %edx       /* Unlimited length */
+       jmp     __strncat       /* Common code */
diff --git a/lib/libc/arch/i386/string/strcat.s b/lib/libc/arch/i386/string/strcat.s
deleted file mode 100644 (file)
index 6b9a14a..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      strcat()                                        Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strcat(char *s1, const char *s2)
-!      Append string s2 to s1.
-!
-.sect .text
-.define _strcat
-       .align  16
-_strcat:
-       mov     edx, -1         ! Unlimited length
-       jmp     __strncat       ! Common code
diff --git a/lib/libc/arch/i386/string/strchr.S b/lib/libc/arch/i386/string/strchr.S
new file mode 100644 (file)
index 0000000..4c10f59
--- /dev/null
@@ -0,0 +1,42 @@
+/*     strchr()                                        Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* char *strchr(const char *s, int c) */
+/*     Look for a character in a string. */
+/* */
+.text
+.globl _strchr
+.balign        16
+_strchr:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %edi
+       cld
+       movl    8(%ebp), %edi   /* edi = string */
+       movl    $16, %edx       /* Look at small chunks of the string */
+next:
+       shll    $1, %edx        /* Chunks become bigger each time */
+       movl    %edx, %ecx
+       xorb    %al, %al        /* Look for the zero at the end */
+
+       repne scasb
+       pushf   /* Remember the flags */
+       subl    %edx, %ecx
+       negl    %ecx    /* Some or all of the chunk */
+       subl    %ecx, %edi      /* Step back */
+       movb    12(%ebp), %al   /* The character to look for */
+
+       repne scasb
+       je      found
+       popf    /* Did we find the end of string earlier? */
+       jne     next    /* No, try again */
+       xorl    %eax, %eax      /* Return NULL */
+       pop     %edi
+       pop     %ebp
+       ret
+found:
+       pop     %eax    /* Get rid of those flags */
+       leal    -1(%edi), %eax  /* Address of byte found */
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/strchr.s b/lib/libc/arch/i386/string/strchr.s
deleted file mode 100644 (file)
index 777503d..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-!      strchr()                                        Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strchr(const char *s, int c)
-!      Look for a character in a string.
-!
-.sect .text
-.define _strchr
-       .align  16
-_strchr:
-       push    ebp
-       mov     ebp, esp
-       push    edi
-       cld
-       mov     edi, 8(ebp)     ! edi = string
-       mov     edx, 16         ! Look at small chunks of the string
-next:  shl     edx, 1          ! Chunks become bigger each time
-       mov     ecx, edx
-       xorb    al, al          ! Look for the zero at the end
-       repne
-       scasb
-       pushf                   ! Remember the flags
-       sub     ecx, edx
-       neg     ecx             ! Some or all of the chunk
-       sub     edi, ecx        ! Step back
-       movb    al, 12(ebp)     ! The character to look for
-       repne
-       scasb
-       je      found
-       popf                    ! Did we find the end of string earlier?
-       jne     next            ! No, try again
-       xor     eax, eax        ! Return NULL
-       pop     edi
-       pop     ebp
-       ret
-found: pop     eax             ! Get rid of those flags
-       lea     eax, -1(edi)    ! Address of byte found
-       pop     edi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/strcmp.S b/lib/libc/arch/i386/string/strcmp.S
new file mode 100644 (file)
index 0000000..2cb1e08
--- /dev/null
@@ -0,0 +1,12 @@
+/*     strcmp()                                        Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* int strcmp(const char *s1, const char *s2) */
+/*     Compare two strings. */
+/* */
+.text
+.globl _strcmp
+.balign        16
+_strcmp:
+       movl    $-1, %ecx       /* Unlimited length */
+       jmp     __strncmp       /* Common code */
diff --git a/lib/libc/arch/i386/string/strcmp.s b/lib/libc/arch/i386/string/strcmp.s
deleted file mode 100644 (file)
index 85b37e3..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      strcmp()                                        Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strcmp(const char *s1, const char *s2)
-!      Compare two strings.
-!
-.sect .text
-.define _strcmp
-       .align  16
-_strcmp:
-       mov     ecx, -1         ! Unlimited length
-       jmp     __strncmp       ! Common code
diff --git a/lib/libc/arch/i386/string/strcpy.S b/lib/libc/arch/i386/string/strcpy.S
new file mode 100644 (file)
index 0000000..d7affdc
--- /dev/null
@@ -0,0 +1,21 @@
+/*     strcpy()                                        Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* char *strcpy(char *s1, const char *s2) */
+/*     Copy string s2 to s1. */
+/* */
+.text
+.globl _strcpy
+.balign        16
+_strcpy:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       movl    $-1, %ecx       /* Unlimited length */
+       call    __strncpy       /* Common code */
+       movl    8(%ebp), %eax   /* Return s1 */
+       pop     %edi
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/strcpy.s b/lib/libc/arch/i386/string/strcpy.s
deleted file mode 100644 (file)
index 04e6217..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-!      strcpy()                                        Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strcpy(char *s1, const char *s2)
-!      Copy string s2 to s1.
-!
-.sect .text
-.define _strcpy
-       .align  16
-_strcpy:
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       mov     ecx, -1         ! Unlimited length
-       call    __strncpy       ! Common code
-       mov     eax, 8(ebp)     ! Return s1
-       pop     edi
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/strlen.S b/lib/libc/arch/i386/string/strlen.S
new file mode 100644 (file)
index 0000000..6b38c19
--- /dev/null
@@ -0,0 +1,12 @@
+/*     strlen()                                        Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* size_t strlen(const char *s) */
+/*     Return the length of a string. */
+/* */
+.text
+.globl _strlen
+.balign        16
+_strlen:
+       movl    $-1, %ecx       /* Unlimited length */
+       jmp     __strnlen       /* Common code */
diff --git a/lib/libc/arch/i386/string/strlen.s b/lib/libc/arch/i386/string/strlen.s
deleted file mode 100644 (file)
index 2a1a24d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      strlen()                                        Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strlen(const char *s)
-!      Return the length of a string.
-!
-.sect .text
-.define _strlen
-       .align  16
-_strlen:
-       mov     ecx, -1         ! Unlimited length
-       jmp     __strnlen       ! Common code
diff --git a/lib/libc/arch/i386/string/strncat.S b/lib/libc/arch/i386/string/strncat.S
new file mode 100644 (file)
index 0000000..a2ac7d7
--- /dev/null
@@ -0,0 +1,12 @@
+/*     strncat()                                       Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* size_t strncat(char *s1, const char *s2, size_t n) */
+/*     Append string s2 to s1. */
+/* */
+.text
+.globl _strncat
+.balign        16
+_strncat:
+       movl    12(%esp), %edx  /* Maximum length */
+       jmp     __strncat       /* Common code */
diff --git a/lib/libc/arch/i386/string/strncat.s b/lib/libc/arch/i386/string/strncat.s
deleted file mode 100644 (file)
index 0756d2e..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      strncat()                                       Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strncat(char *s1, const char *s2, size_t n)
-!      Append string s2 to s1.
-!
-.sect .text
-.define _strncat
-       .align  16
-_strncat:
-       mov     edx, 12(esp)    ! Maximum length
-       jmp     __strncat       ! Common code
diff --git a/lib/libc/arch/i386/string/strncmp.S b/lib/libc/arch/i386/string/strncmp.S
new file mode 100644 (file)
index 0000000..a95349b
--- /dev/null
@@ -0,0 +1,12 @@
+/*     strncmp()                                       Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* int strncmp(const char *s1, const char *s2, size_t n) */
+/*     Compare two strings. */
+/* */
+.text
+.globl _strncmp
+.balign        16
+_strncmp:
+       movl    12(%esp), %ecx  /* Maximum length */
+       jmp     __strncmp       /* Common code */
diff --git a/lib/libc/arch/i386/string/strncmp.s b/lib/libc/arch/i386/string/strncmp.s
deleted file mode 100644 (file)
index 6f13826..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      strncmp()                                       Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! int strncmp(const char *s1, const char *s2, size_t n)
-!      Compare two strings.
-!
-.sect .text
-.define _strncmp
-       .align  16
-_strncmp:
-       mov     ecx, 12(esp)    ! Maximum length
-       jmp     __strncmp       ! Common code
diff --git a/lib/libc/arch/i386/string/strncpy.S b/lib/libc/arch/i386/string/strncpy.S
new file mode 100644 (file)
index 0000000..f903dbb
--- /dev/null
@@ -0,0 +1,24 @@
+/*     strncpy()                                       Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* char *strncpy(char *s1, const char *s2, size_t n) */
+/*     Copy string s2 to s1. */
+/* */
+.text
+.globl _strncpy
+.balign        16
+_strncpy:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %esi
+       push    %edi
+       movl    16(%ebp), %ecx  /* Maximum length */
+       call    __strncpy       /* Common code */
+       movl    %edx, %ecx      /* Number of bytes not copied */
+
+       rep stosb       /* strncpy always copies n bytes by null padding */
+       movl    8(%ebp), %eax   /* Return s1 */
+       pop     %edi
+       pop     %esi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/strncpy.s b/lib/libc/arch/i386/string/strncpy.s
deleted file mode 100644 (file)
index 52d392d..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-!      strncpy()                                       Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strncpy(char *s1, const char *s2, size_t n)
-!      Copy string s2 to s1.
-!
-.sect .text
-.define _strncpy
-       .align  16
-_strncpy:
-       push    ebp
-       mov     ebp, esp
-       push    esi
-       push    edi
-       mov     ecx, 16(ebp)    ! Maximum length
-       call    __strncpy       ! Common code
-       mov     ecx, edx        ! Number of bytes not copied
-       rep
-       stosb                   ! strncpy always copies n bytes by null padding
-       mov     eax, 8(ebp)     ! Return s1
-       pop     edi
-       pop     esi
-       pop     ebp
-       ret
diff --git a/lib/libc/arch/i386/string/strnlen.S b/lib/libc/arch/i386/string/strnlen.S
new file mode 100644 (file)
index 0000000..2551f86
--- /dev/null
@@ -0,0 +1,12 @@
+/*     strnlen()                                       Author: Kees J. Bot */
+/*                                                             1 Jan 1994 */
+
+/* size_t strnlen(const char *s, size_t n) */
+/*     Return the length of a string. */
+/* */
+.text
+.globl _strnlen
+.balign        16
+_strnlen:
+       movl    8(%esp), %ecx   /* Maximum length */
+       jmp     __strnlen       /* Common code */
diff --git a/lib/libc/arch/i386/string/strnlen.s b/lib/libc/arch/i386/string/strnlen.s
deleted file mode 100644 (file)
index 99d5a0c..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-!      strnlen()                                       Author: Kees J. Bot
-!                                                              1 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! size_t strnlen(const char *s, size_t n)
-!      Return the length of a string.
-!
-.sect .text
-.define _strnlen
-       .align  16
-_strnlen:
-       mov     ecx, 8(esp)     ! Maximum length
-       jmp     __strnlen       ! Common code
diff --git a/lib/libc/arch/i386/string/strrchr.S b/lib/libc/arch/i386/string/strrchr.S
new file mode 100644 (file)
index 0000000..74c03e4
--- /dev/null
@@ -0,0 +1,36 @@
+/*     strrchr()                                       Author: Kees J. Bot */
+/*                                                             2 Jan 1994 */
+
+/* char *strrchr(const char *s, int c) */
+/*     Look for the last occurrence a character in a string. */
+/* */
+.text
+.globl _strrchr
+.balign        16
+_strrchr:
+       push    %ebp
+       movl    %esp, %ebp
+       push    %edi
+       movl    8(%ebp), %edi   /* edi = string */
+       movl    $-1, %ecx
+       xorb    %al, %al
+       cld
+
+       repne scasb     /* Look for the end of the string */
+       notl    %ecx    /* -1 - ecx = Length of the string + null */
+       decl    %edi    /* Put edi back on the zero byte */
+       movb    12(%ebp), %al   /* The character to look for */
+       std     /* Downwards search */
+
+       repne scasb
+       cld     /* Direction bit back to default */
+       jne     failure
+       leal    1(%edi), %eax   /* Found it */
+       pop     %edi
+       pop     %ebp
+       ret
+failure:
+       xorl    %eax, %eax      /* Not there */
+       pop     %edi
+       pop     %ebp
+       ret
diff --git a/lib/libc/arch/i386/string/strrchr.s b/lib/libc/arch/i386/string/strrchr.s
deleted file mode 100644 (file)
index 510d24d..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-!      strrchr()                                       Author: Kees J. Bot
-!                                                              2 Jan 1994
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-! char *strrchr(const char *s, int c)
-!      Look for the last occurrence a character in a string.
-!
-.sect .text
-.define _strrchr
-       .align  16
-_strrchr:
-       push    ebp
-       mov     ebp, esp
-       push    edi
-       mov     edi, 8(ebp)     ! edi = string
-       mov     ecx, -1
-       xorb    al, al
-       cld
-       repne
-       scasb                   ! Look for the end of the string
-       not     ecx             ! -1 - ecx = Length of the string + null
-       dec     edi             ! Put edi back on the zero byte
-       movb    al, 12(ebp)     ! The character to look for
-       std                     ! Downwards search
-       repne
-       scasb
-       cld                     ! Direction bit back to default
-       jne     failure
-       lea     eax, 1(edi)     ! Found it
-       pop     edi
-       pop     ebp
-       ret
-failure:xor    eax, eax        ! Not there
-       pop     edi
-       pop     ebp
-       ret
index b2a9de0e31c0f001d28d081aad74c297456127b2..330681d9a5b3d9597111008c23288f727b776ad6 100644 (file)
@@ -2,5 +2,5 @@
 .PATH: ${.CURDIR}/gnu/arch/${ARCH}/rts
 
 SRCS+=  \
-       __setjmp.gs \
-       longjmp.gs
+       __setjmp.S \
+       longjmp.S
diff --git a/lib/libc/gnu/arch/i386/rts/__setjmp.S b/lib/libc/gnu/arch/i386/rts/__setjmp.S
new file mode 100644 (file)
index 0000000..1343061
--- /dev/null
@@ -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 $
diff --git a/lib/libc/gnu/arch/i386/rts/__setjmp.gs b/lib/libc/gnu/arch/i386/rts/__setjmp.gs
deleted file mode 100644 (file)
index 3641995..0000000
+++ /dev/null
@@ -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 $
diff --git a/lib/libc/gnu/arch/i386/rts/longjmp.S b/lib/libc/gnu/arch/i386/rts/longjmp.S
new file mode 100644 (file)
index 0000000..71befee
--- /dev/null
@@ -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 $
diff --git a/lib/libc/gnu/arch/i386/rts/longjmp.gs b/lib/libc/gnu/arch/i386/rts/longjmp.gs
deleted file mode 100644 (file)
index 839385a..0000000
+++ /dev/null
@@ -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 $
index 502cd03c6aec92f76552138137b75b4030edab51..b67470550d67791112d83acf8f76a3ee9b194d95 100644 (file)
 .PATH: ${.CURDIR}/syscall
 
 SRCS+=  \
-       _exit.s \
-       _pm_findproc.s \
-       access.s \
-       adddma.s \
-       alarm.s \
-       brk.s \
-       cfgetispeed.s \
-       cfgetospeed.s \
-       cfsetispeed.s \
-       cfsetospeed.s \
-       chdir.s \
-       chmod.s \
-       chown.s \
-       chroot.s \
-       close.s \
-       closedir.s \
-       cprofile.s \
-       creat.s \
-       deldma.s \
-       dup.s \
-       dup2.s \
-       execl.s \
-       execle.s \
-       execlp.s \
-       execv.s \
-       execve.s \
-       execvp.s \
-       fchown.s \
-       fchmod.s \
-       fcntl.s \
-       fork.s \
-       fpathconf.s \
-       fstat.s \
-       fstatfs.s \
-       getcwd.s \
-       getdents.s \
-       getdma.s \
-       getegid.s \
-       geteuid.s \
-       getgid.s \
-       getgroups.s \
-       getitimer.s \
-       getnpid.s \
-       getnuid.s \
-       getngid.s \
-       getnprocnr.s \
-       getpgrp.s \
-       getpid.s \
-       getppid.s \
-       getpprocnr.s \
-       getprocnr.s \
-       getsigset.s \
-       getsysinfo.s \
-       getuid.s \
-       ioctl.s \
-       isatty.s \
-       kill.s \
-       killpg.s \
-       link.s \
-       lseek.s \
-       lseek64.s \
-       lstat.s \
-       mapdriver.s \
-       mkdir.s \
-       mkfifo.s \
-       mknod.s \
-       mmap.s \
-       vm_getphys.s \
-       vm_getrefcount.s \
-       vm_remap.s \
-       vm_unmap.s \
-       vm_set_priv.s \
-       vm_query_exit.s \
-       mount.s \
-       nanosleep.s \
-       open.s \
-       opendir.s \
-       pathconf.s \
-       pause.s \
-       pipe.s \
-       ptrace.s \
-       read.s \
-       readdir.s \
-       readlink.s \
-       reboot.s \
-       rename.s \
-       rewinddir.s \
-       rmdir.s \
-       sbrk.s \
-       select.s \
-       seekdir.s \
-       setgid.s \
-       setgroups.s \
-       setitimer.s \
-       setsid.s \
-       setuid.s \
-       sigaction.s \
-       sigaddset.s \
-       sigdelset.s \
-       sigemptyset.s \
-       sigfillset.s \
-       sigismember.s \
-       sigpending.s \
-       sigprocmask.s \
-       sigreturn.s \
-       sigsuspend.s \
-       sleep.s \
-       sprofile.s \
-       stat.s \
-       stime.s \
-       svrctl.s \
-       symlink.s \
-       sync.s \
-       sysuname.s \
-       tcdrain.s \
-       tcflow.s \
-       tcflush.s \
-       tcgetattr.s \
-       tcsendbreak.s \
-       tcsetattr.s \
-       time.s \
-       times.s \
-       truncate.s \
-       umask.s \
-       umount.s \
-       uname.s \
-       unlink.s \
-       utime.s \
-       vm_dmacalls.s \
-       wait.s \
-       waitpid.s \
-       write.s
+       _exit.S \
+       _pm_findproc.S \
+       access.S \
+       adddma.S \
+       alarm.S \
+       brk.S \
+       cfgetispeed.S \
+       cfgetospeed.S \
+       cfsetispeed.S \
+       cfsetospeed.S \
+       chdir.S \
+       chmod.S \
+       chown.S \
+       chroot.S \
+       close.S \
+       closedir.S \
+       cprofile.S \
+       creat.S \
+       deldma.S \
+       dup.S \
+       dup2.S \
+       execl.S \
+       execle.S \
+       execlp.S \
+       execv.S \
+       execve.S \
+       execvp.S \
+       fchown.S \
+       fchmod.S \
+       fcntl.S \
+       fork.S \
+       fpathconf.S \
+       fstat.S \
+       fstatfs.S \
+       getcwd.S \
+       getdents.S \
+       getdma.S \
+       getegid.S \
+       geteuid.S \
+       getgid.S \
+       getgroups.S \
+       getitimer.S \
+       getnpid.S \
+       getnuid.S \
+       getngid.S \
+       getnprocnr.S \
+       getpgrp.S \
+       getpid.S \
+       getppid.S \
+       getpprocnr.S \
+       getprocnr.S \
+       getsigset.S \
+       getsysinfo.S \
+       getuid.S \
+       ioctl.S \
+       isatty.S \
+       kill.S \
+       killpg.S \
+       link.S \
+       lseek.S \
+       lseek64.S \
+       lstat.S \
+       mapdriver.S \
+       mkdir.S \
+       mkfifo.S \
+       mknod.S \
+       mmap.S \
+       vm_getphys.S \
+       vm_getrefcount.S \
+       vm_remap.S \
+       vm_unmap.S \
+       vm_set_priv.S \
+       vm_query_exit.S \
+       mount.S \
+       nanosleep.S \
+       open.S \
+       opendir.S \
+       pathconf.S \
+       pause.S \
+       pipe.S \
+       ptrace.S \
+       read.S \
+       readdir.S \
+       readlink.S \
+       reboot.S \
+       rename.S \
+       rewinddir.S \
+       rmdir.S \
+       sbrk.S \
+       select.S \
+       seekdir.S \
+       setgid.S \
+       setgroups.S \
+       setitimer.S \
+       setsid.S \
+       setuid.S \
+       sigaction.S \
+       sigaddset.S \
+       sigdelset.S \
+       sigemptyset.S \
+       sigfillset.S \
+       sigismember.S \
+       sigpending.S \
+       sigprocmask.S \
+       sigreturn.S \
+       sigsuspend.S \
+       sleep.S \
+       sprofile.S \
+       stat.S \
+       stime.S \
+       svrctl.S \
+       symlink.S \
+       sync.S \
+       sysuname.S \
+       tcdrain.S \
+       tcflow.S \
+       tcflush.S \
+       tcgetattr.S \
+       tcsendbreak.S \
+       tcsetattr.S \
+       time.S \
+       times.S \
+       truncate.S \
+       umask.S \
+       umount.S \
+       uname.S \
+       unlink.S \
+       utime.S \
+       vm_dmacalls.S \
+       wait.S \
+       waitpid.S \
+       write.S
similarity index 51%
rename from lib/libc/syscall/_exit.s
rename to lib/libc/syscall/_exit.S
index b0e91298c52532a40d677ecf770b0b58c7fe7107..854f70880f493df4708286ea41fd09a0305ab9d2 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        ___exit
-.define        __exit
-.align 2
+.globl __exit
+.balign        2
 
 __exit:
        jmp     ___exit
similarity index 57%
rename from lib/libc/syscall/_pm_findproc.s
rename to lib/libc/syscall/_pm_findproc.S
index 93c4b3b78fd3835d93d207e8a9222fdccc9fbd8a..52f8eeaef13e3fa8c973852b71334b02d9d9fa12 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        ___pm_findproc
-.define        __pm_findproc
-.align 2
+.globl __pm_findproc
+.balign        2
 
 __pm_findproc:
        jmp     ___pm_findproc
similarity index 52%
rename from lib/libc/syscall/access.s
rename to lib/libc/syscall/access.S
index 5c6a91366324a4df1db22afac1ebb9dce8521483..635c7b92ca4c6e76ab2a58796787a5c9c8ca8b31 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __access
-.define        _access
-.align 2
+.globl _access
+.balign        2
 
 _access:
        jmp     __access
similarity index 52%
rename from lib/libc/syscall/adddma.s
rename to lib/libc/syscall/adddma.S
index 2f4dcf9997045ee9525d276dfd2a44bfc2716041..d911015dbde7823137fffafd17bdb71f805e612f 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __adddma
-.define        _adddma
-.align 2
+.globl _adddma
+.balign        2
 
 _adddma:
        jmp     __adddma
similarity index 51%
rename from lib/libc/syscall/alarm.s
rename to lib/libc/syscall/alarm.S
index b303b3dabe0bd483d965a12b4a9b51c8fd50a6fa..1dc3116b8ee49f826f42a836cdd41b79f4193892 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __alarm
-.define        _alarm
-.align 2
+.globl _alarm
+.balign        2
 
 _alarm:
        jmp     __alarm
diff --git a/lib/libc/syscall/brk.S b/lib/libc/syscall/brk.S
new file mode 100644 (file)
index 0000000..e176f84
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.extern        __brk
+.globl _brk
+.balign        2
+
+_brk:
+       jmp     __brk
diff --git a/lib/libc/syscall/brk.s b/lib/libc/syscall/brk.s
deleted file mode 100644 (file)
index 3d24a8d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.sect .text
-.extern        __brk
-.define        _brk
-.align 2
-
-_brk:
-       jmp     __brk
similarity index 57%
rename from lib/libc/syscall/cfgetispeed.s
rename to lib/libc/syscall/cfgetispeed.S
index 54429defe17bfcf760ec836546255b27d4df9045..7f889edf1335ad82ae4f2fe7ed7140e9a1c76a72 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __cfgetispeed
-.define        _cfgetispeed
-.align 2
+.globl _cfgetispeed
+.balign        2
 
 _cfgetispeed:
        jmp     __cfgetispeed
similarity index 57%
rename from lib/libc/syscall/cfgetospeed.s
rename to lib/libc/syscall/cfgetospeed.S
index 0e21c9b6bcf25153afbede38bfc554bdd6560d4c..2566bef77edc5ac87eb1298b2750b46d5acfe9ff 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __cfgetospeed
-.define        _cfgetospeed
-.align 2
+.globl _cfgetospeed
+.balign        2
 
 _cfgetospeed:
        jmp     __cfgetospeed
similarity index 57%
rename from lib/libc/syscall/cfsetispeed.s
rename to lib/libc/syscall/cfsetispeed.S
index 559ef1a1a65acaab435fe0bba89ad608184d8354..e3a2b962d26f57bb3332fa1f4d87a36f8ffdda83 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __cfsetispeed
-.define        _cfsetispeed
-.align 2
+.globl _cfsetispeed
+.balign        2
 
 _cfsetispeed:
        jmp     __cfsetispeed
similarity index 57%
rename from lib/libc/syscall/cfsetospeed.s
rename to lib/libc/syscall/cfsetospeed.S
index ffbe49c0fc8f63260eb259a9d6bfa619f7a0b5b2..29bd8d9e022bc9e875b8a34e7201ac688537f238 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __cfsetospeed
-.define        _cfsetospeed
-.align 2
+.globl _cfsetospeed
+.balign        2
 
 _cfsetospeed:
        jmp     __cfsetospeed
similarity index 60%
rename from lib/libc/syscall/chdir.s
rename to lib/libc/syscall/chdir.S
index 98e8f708e7991284f59add180919f982d1561029..941ef95501e2e0abbf9e2ea8efe579604009b1e3 100644 (file)
@@ -1,9 +1,9 @@
-.sect .text
+.text
 .extern        __chdir
-.define        _chdir
+.globl _chdir
 .extern        __fchdir
-.define        _fchdir
-.align 2
+.globl _fchdir
+.balign        2
 
 _chdir:
        jmp     __chdir
similarity index 51%
rename from lib/libc/syscall/chmod.s
rename to lib/libc/syscall/chmod.S
index caf12bf9ed11a3884bf06598a75a4022f1e139eb..629d40cd8ae4d333dfea09c5fc8dd99e274cf719 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __chmod
-.define        _chmod
-.align 2
+.globl _chmod
+.balign        2
 
 _chmod:
        jmp     __chmod
similarity index 51%
rename from lib/libc/syscall/chown.s
rename to lib/libc/syscall/chown.S
index 6f7cff3dad7df8f3b1185f02fbba7ee8f566fa5e..9318670e65ce6fa1b35ed5afee264d9396f84797 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __chown
-.define        _chown
-.align 2
+.globl _chown
+.balign        2
 
 _chown:
        jmp     __chown
similarity index 52%
rename from lib/libc/syscall/chroot.s
rename to lib/libc/syscall/chroot.S
index f2d4f18605107474221ca60c63dacdb9dc3e8a1b..4e091ee4879fb71a806321fbd3873fc069ddc73f 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __chroot
-.define        _chroot
-.align 2
+.globl _chroot
+.balign        2
 
 _chroot:
        jmp     __chroot
similarity index 51%
rename from lib/libc/syscall/close.s
rename to lib/libc/syscall/close.S
index 94803d63773227afa9455f5db2a6c3e2af81500c..9f87c3dcd5c888fef17f90f4b41d48e1430daa54 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __close
-.define        _close
-.align 2
+.globl _close
+.balign        2
 
 _close:
        jmp     __close
similarity index 54%
rename from lib/libc/syscall/closedir.s
rename to lib/libc/syscall/closedir.S
index 44bba250dcd4daa04dd0d39e0e52e56e02a31430..3164858fe2884e6c27477f9fd8d994b119cd5fab 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __closedir
-.define        _closedir
-.align 2
+.globl _closedir
+.balign        2
 
 _closedir:
        jmp     __closedir
similarity index 54%
rename from lib/libc/syscall/cprofile.s
rename to lib/libc/syscall/cprofile.S
index 99d7a86667fce1fbe4edb3974512083619d7a89d..7bcfe8defccddf131f95b413ea47608672407417 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __cprofile
-.define        _cprofile
-.align 2
+.globl _cprofile
+.balign        2
 
 _cprofile:
        jmp     __cprofile
similarity index 51%
rename from lib/libc/syscall/creat.s
rename to lib/libc/syscall/creat.S
index 3bc6b273e86a7c80cf13fd66b5839dbb4a44e5ae..0d3cc2b58ab0f667c5cc30006699642e877aef42 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __creat
-.define        _creat
-.align 2
+.globl _creat
+.balign        2
 
 _creat:
        jmp     __creat
similarity index 52%
rename from lib/libc/syscall/deldma.s
rename to lib/libc/syscall/deldma.S
index 797d626490197bd0daad49e0064d126587ae88f4..a15c442b97d5d043c78a3400ecf0b0a7b10fc0c9 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __deldma
-.define        _deldma
-.align 2
+.globl _deldma
+.balign        2
 
 _deldma:
        jmp     __deldma
diff --git a/lib/libc/syscall/dup.S b/lib/libc/syscall/dup.S
new file mode 100644 (file)
index 0000000..1957b69
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.extern        __dup
+.globl _dup
+.balign        2
+
+_dup:
+       jmp     __dup
diff --git a/lib/libc/syscall/dup.s b/lib/libc/syscall/dup.s
deleted file mode 100644 (file)
index 5049f5f..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.sect .text
-.extern        __dup
-.define        _dup
-.align 2
-
-_dup:
-       jmp     __dup
similarity index 50%
rename from lib/libc/syscall/dup2.s
rename to lib/libc/syscall/dup2.S
index de110aa77a0542355b29a7be938eb3b5070c2c22..26f426e212848594fb8cc067d3f4a5bbeb67ccef 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __dup2
-.define        _dup2
-.align 2
+.globl _dup2
+.balign        2
 
 _dup2:
        jmp     __dup2
similarity index 51%
rename from lib/libc/syscall/execl.s
rename to lib/libc/syscall/execl.S
index 647e6dde54dc20c35b5426f43eb32ebfee80a46a..6c44c28f702696d3278408706faba16cd556c683 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __execl
-.define        _execl
-.align 2
+.globl _execl
+.balign        2
 
 _execl:
        jmp     __execl
similarity index 52%
rename from lib/libc/syscall/execle.s
rename to lib/libc/syscall/execle.S
index fa0456298574682be94b9f929352f757ff1f2d75..8f7b3697b8a2d78ce7cbe872e32a1cc26e04d5c2 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __execle
-.define        _execle
-.align 2
+.globl _execle
+.balign        2
 
 _execle:
        jmp     __execle
similarity index 52%
rename from lib/libc/syscall/execlp.s
rename to lib/libc/syscall/execlp.S
index 7a360fe066fe7a54ab8ef2bbe88db97305880680..c35d4ea626ae2f06de64325f2bb75bcffe8c56bf 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __execlp
-.define        _execlp
-.align 2
+.globl _execlp
+.balign        2
 
 _execlp:
        jmp     __execlp
similarity index 51%
rename from lib/libc/syscall/execv.s
rename to lib/libc/syscall/execv.S
index 692d204690bbf8fa3b2930593fc679e300e21a72..991c24ea07129b167c5de90cb0365487c3747b2d 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __execv
-.define        _execv
-.align 2
+.globl _execv
+.balign        2
 
 _execv:
        jmp     __execv
similarity index 52%
rename from lib/libc/syscall/execve.s
rename to lib/libc/syscall/execve.S
index ad2193450eb61584afd6f53be023e34f09030f61..818756fb0965a9d5e4c7062267e950e1c22e6bb2 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __execve
-.define        _execve
-.align 2
+.globl _execve
+.balign        2
 
 _execve:
        jmp     __execve
similarity index 52%
rename from lib/libc/syscall/execvp.s
rename to lib/libc/syscall/execvp.S
index e03c26489d9ddeb78bf467f7cfa42d83bf1c0a0f..cb2d66aad6fc7acc7b5ff0b26fb8bdbdfda290a2 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __execvp
-.define        _execvp
-.align 2
+.globl _execvp
+.balign        2
 
 _execvp:
        jmp     __execvp
similarity index 52%
rename from lib/libc/syscall/fchmod.s
rename to lib/libc/syscall/fchmod.S
index a8544ea0b98bd74273fa388350fe668e0b3934c2..1eba9dd53c48ce6855ba231ea77cb300281bfed3 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __fchmod
-.define        _fchmod
-.align 2
+.globl _fchmod
+.balign        2
 
 _fchmod:
        jmp     __fchmod
similarity index 52%
rename from lib/libc/syscall/fchown.s
rename to lib/libc/syscall/fchown.S
index 1a0c9496ffacf0715b89c4ac261e9ad98b6cd2d8..91bf31b09164d25aeabe83891bca643a06d45695 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __fchown
-.define        _fchown
-.align 2
+.globl _fchown
+.balign        2
 
 _fchown:
        jmp     __fchown
similarity index 51%
rename from lib/libc/syscall/fcntl.s
rename to lib/libc/syscall/fcntl.S
index 97b78940bed5fb2ea9a7365a8b084d4afeb45a1f..d3ce7d71fefa952ff263a99306c5a7096d135a00 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __fcntl
-.define        _fcntl
-.align 2
+.globl _fcntl
+.balign        2
 
 _fcntl:
        jmp     __fcntl
similarity index 50%
rename from lib/libc/syscall/fork.s
rename to lib/libc/syscall/fork.S
index 913497617c224c36e6ab7d4bf9812904dc76a5a6..ef5101e16a9c5e1413cd26e88dbd6b4e6edf0f2c 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __fork
-.define        _fork
-.align 2
+.globl _fork
+.balign        2
 
 _fork:
        jmp     __fork
similarity index 55%
rename from lib/libc/syscall/fpathconf.s
rename to lib/libc/syscall/fpathconf.S
index 130a45daced0ec80df2df636c490fb9112abbacb..2b556ddcceb81c9cccc458940ec97a14b2eeaffc 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __fpathconf
-.define        _fpathconf
-.align 2
+.globl _fpathconf
+.balign        2
 
 _fpathconf:
        jmp     __fpathconf
similarity index 51%
rename from lib/libc/syscall/fstat.s
rename to lib/libc/syscall/fstat.S
index 5ee5b99350e85551cf861f6d7c277d3a5207797e..64e1c14044fe20199ae0f51438a6f9278d803d44 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __fstat
-.define        _fstat
-.align 2
+.globl _fstat
+.balign        2
 
 _fstat:
        jmp     __fstat
similarity index 53%
rename from lib/libc/syscall/fstatfs.s
rename to lib/libc/syscall/fstatfs.S
index 3357f8a19a1b5cdcd66447bccc94daf6fe0a0ef1..9c35e84658e3afa941bd53e8720152c9be9e5f3a 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __fstatfs
-.define        _fstatfs
-.align 2
+.globl _fstatfs
+.balign        2
 
 _fstatfs:
        jmp     __fstatfs
similarity index 52%
rename from lib/libc/syscall/getcwd.s
rename to lib/libc/syscall/getcwd.S
index 262c92d15a939e511c6283a7e74611b92e0f7a3e..16b28e314902e9901b12f845aee68b140a0ff8b3 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getcwd
-.define        _getcwd
-.align 2
+.globl _getcwd
+.balign        2
 
 _getcwd:
        jmp     __getcwd
similarity index 54%
rename from lib/libc/syscall/getdents.s
rename to lib/libc/syscall/getdents.S
index 38405e167399f25926aadcf136c9f8ecf252374b..6d7497dc4c2d8379b9c3d722ec10cd3520dc9f1d 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getdents
-.define        _getdents
-.align 2
+.globl _getdents
+.balign        2
 
 _getdents:
        jmp     __getdents
similarity index 52%
rename from lib/libc/syscall/getdma.s
rename to lib/libc/syscall/getdma.S
index 3939a3d05e8b881518075f01be2f032091077684..2d0a6513de0e5cee0c1028522fd519f9fc965df0 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getdma
-.define        _getdma
-.align 2
+.globl _getdma
+.balign        2
 
 _getdma:
        jmp     __getdma
similarity index 53%
rename from lib/libc/syscall/getegid.s
rename to lib/libc/syscall/getegid.S
index 0e65bc9ba8af39f6f0d9baeb4e7bf90dd03dd5c8..d7a2115a246a7fdcaddb306aabe379349c6ae5ff 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getegid
-.define        _getegid
-.align 2
+.globl _getegid
+.balign        2
 
 _getegid:
        jmp     __getegid
similarity index 53%
rename from lib/libc/syscall/geteuid.s
rename to lib/libc/syscall/geteuid.S
index 9cbc952b257217e093d5f192bdc75279b91fad3e..7cfff3cbe3296631fbd9a5d6453b0ec119d0d60a 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __geteuid
-.define        _geteuid
-.align 2
+.globl _geteuid
+.balign        2
 
 _geteuid:
        jmp     __geteuid
similarity index 52%
rename from lib/libc/syscall/getgid.s
rename to lib/libc/syscall/getgid.S
index 7f4caa38ec8987cb973b760884a84712dacaab9a..e62eaa71e9a880a7356ee9e6082bfcc4f5482f19 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getgid
-.define        _getgid
-.align 2
+.globl _getgid
+.balign        2
 
 _getgid:
        jmp     __getgid
similarity index 55%
rename from lib/libc/syscall/getgroups.s
rename to lib/libc/syscall/getgroups.S
index bcbb40afa586738e09894fb9b84fce59e5220cc9..cffb429995fdda94ed91ded0ae7e015a08e0e967 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getgroups
-.define        _getgroups
-.align 2
+.globl _getgroups
+.balign        2
 
 _getgroups:
        jmp     __getgroups
diff --git a/lib/libc/syscall/getitimer.S b/lib/libc/syscall/getitimer.S
new file mode 100644 (file)
index 0000000..a30dba6
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.extern        __getitimer
+.globl _getitimer
+.balign        2
+
+_getitimer:
+       jmp     __getitimer
diff --git a/lib/libc/syscall/getitimer.s b/lib/libc/syscall/getitimer.s
deleted file mode 100644 (file)
index 413dea4..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.sect .text
-.extern __getitimer
-.define _getitimer
-.align 2
-
-_getitimer:
-       jmp     __getitimer
similarity index 53%
rename from lib/libc/syscall/getngid.s
rename to lib/libc/syscall/getngid.S
index 810d9f2ccc159d66973f863347068f33a7745c07..bbd4a0eb9bd9fac1f68df0f85688d796cf971bd0 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getngid
-.define        _getngid
-.align 2
+.globl _getngid
+.balign        2
 
 _getngid:
        jmp     __getngid
similarity index 53%
rename from lib/libc/syscall/getnpid.s
rename to lib/libc/syscall/getnpid.S
index 4547f01fcb558849d870260c9c15022cd2826031..f9750665951aea49496adc61236d6010c6ac66ca 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getnpid
-.define        _getnpid
-.align 2
+.globl _getnpid
+.balign        2
 
 _getnpid:
        jmp     __getnpid
similarity index 56%
rename from lib/libc/syscall/getnprocnr.s
rename to lib/libc/syscall/getnprocnr.S
index 482187b3ec1371f7c772a1d489baf51135182ff0..18a44908e60bc5e6bdce7439fddc3de9c6cfb0ed 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getnprocnr
-.define        _getnprocnr
-.align 2
+.globl _getnprocnr
+.balign        2
 
 _getnprocnr:
        jmp     __getnprocnr
similarity index 53%
rename from lib/libc/syscall/getnuid.s
rename to lib/libc/syscall/getnuid.S
index be94875887fb3ddb64777b9b1dd78ae6a0120e5b..05c65bb6ae4976de620f2162714d1671916e6266 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getnuid
-.define        _getnuid
-.align 2
+.globl _getnuid
+.balign        2
 
 _getnuid:
        jmp     __getnuid
similarity index 53%
rename from lib/libc/syscall/getpgrp.s
rename to lib/libc/syscall/getpgrp.S
index 2f7abb332a47b3c825f9ef9929de9dad8f751936..22d79abdd5e3f486d76ea584547bb16dcbb160a9 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getpgrp
-.define        _getpgrp
-.align 2
+.globl _getpgrp
+.balign        2
 
 _getpgrp:
        jmp     __getpgrp
similarity index 52%
rename from lib/libc/syscall/getpid.s
rename to lib/libc/syscall/getpid.S
index ea176ae0a8dd63949238cdc0659cd5f7871c25e7..474b90b8b0d399eb64f79970edf6adae227b2fe8 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getpid
-.define        _getpid
-.align 2
+.globl _getpid
+.balign        2
 
 _getpid:
        jmp     __getpid
similarity index 53%
rename from lib/libc/syscall/getppid.s
rename to lib/libc/syscall/getppid.S
index d0ee474007fc1ecdfb358d7240f3b52124952335..060d9206be773245e7bd19af0d81692ee47e01a0 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getppid
-.define        _getppid
-.align 2
+.globl _getppid
+.balign        2
 
 _getppid:
        jmp     __getppid
similarity index 56%
rename from lib/libc/syscall/getpprocnr.s
rename to lib/libc/syscall/getpprocnr.S
index 009e063fbd8737a3cd9dfe7e7c864a8963cc1bc9..647b7d295a30d1936b9b1daa3f899d09234749fa 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getpprocnr
-.define        _getpprocnr
-.align 2
+.globl _getpprocnr
+.balign        2
 
 _getpprocnr:
        jmp     __getpprocnr
similarity index 55%
rename from lib/libc/syscall/getprocnr.s
rename to lib/libc/syscall/getprocnr.S
index a36c560e3d622032b3e322611a9b32e197cc78f2..5b394fb1f7adf69f056dd36188555fab94c69b9b 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getprocnr
-.define        _getprocnr
-.align 2
+.globl _getprocnr
+.balign        2
 
 _getprocnr:
        jmp     __getprocnr
similarity index 55%
rename from lib/libc/syscall/getsigset.s
rename to lib/libc/syscall/getsigset.S
index 59c5ffd421edfcd6f9da134b4c738de9f8f653cd..e9211e0555305ba89062842bae7e9d14e702047b 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getsigset
-.define        _getsigset
-.align 2
+.globl _getsigset
+.balign        2
 
 _getsigset:
        jmp     __getsigset
similarity index 64%
rename from lib/libc/syscall/getsysinfo.s
rename to lib/libc/syscall/getsysinfo.S
index da6ca3a2ee70fbb9dd9cf12df98cb43256d22c00..e9bfaae08d5f8cefdd5ae91dde42018bc54703d1 100644 (file)
@@ -1,9 +1,9 @@
-.sect .text
+.text
 .extern        __getsysinfo
-.define        _getsysinfo
+.globl _getsysinfo
 .extern        __getsysinfo_up
-.define        _getsysinfo_up
-.align 2
+.globl _getsysinfo_up
+.balign        2
 
 _getsysinfo:
        jmp     __getsysinfo
similarity index 52%
rename from lib/libc/syscall/getuid.s
rename to lib/libc/syscall/getuid.S
index fb4d40dbc5ffb62476e31ce40abd67f113bad2e3..d703b0d0fdd053b761bfbd051d34aa06b1d94241 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __getuid
-.define        _getuid
-.align 2
+.globl _getuid
+.balign        2
 
 _getuid:
        jmp     __getuid
similarity index 51%
rename from lib/libc/syscall/ioctl.s
rename to lib/libc/syscall/ioctl.S
index 863165d39238e95475bef82bfc2f272a111dc540..6ede264a383b2a1f910f356904b19611b0496317 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __ioctl
-.define        _ioctl
-.align 2
+.globl _ioctl
+.balign        2
 
 _ioctl:
        jmp     __ioctl
similarity index 52%
rename from lib/libc/syscall/isatty.s
rename to lib/libc/syscall/isatty.S
index bbb5ed9716a19422c58d7dd5239b4032883b4c65..24ffe3eb1c22d7391528ddc12e4c6552217c3832 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __isatty
-.define        _isatty
-.align 2
+.globl _isatty
+.balign        2
 
 _isatty:
        jmp     __isatty
similarity index 50%
rename from lib/libc/syscall/kill.s
rename to lib/libc/syscall/kill.S
index db8775b12643c26b4eab5c32ff28154baf7818d9..396e73ddbbde38fb2295de5e934b6b10914f922a 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __kill
-.define        _kill
-.align 2
+.globl _kill
+.balign        2
 
 _kill:
        jmp     __kill
similarity index 52%
rename from lib/libc/syscall/killpg.s
rename to lib/libc/syscall/killpg.S
index a531137dd073b3e5ce355a5b1517d50869b5cdc2..f6b17aa1b98fa489c00c72f3423374b451bfee76 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __killpg
-.define        _killpg
-.align 2
+.globl _killpg
+.balign        2
 
 _killpg:
        jmp     __killpg
similarity index 50%
rename from lib/libc/syscall/link.s
rename to lib/libc/syscall/link.S
index 4a96c4342a35259274d0f38081fa9da6edc81103..2856aef07dd41c6a2bb1dc1f4453eff7e4c9eb71 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __link
-.define        _link
-.align 2
+.globl _link
+.balign        2
 
 _link:
        jmp     __link
similarity index 51%
rename from lib/libc/syscall/lseek.s
rename to lib/libc/syscall/lseek.S
index 936c27860293c6dd90ec5e610983d380f8ac6dd2..ebca729a415f05e42e8efc556c51c3a12c741d6d 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __lseek
-.define        _lseek
-.align 2
+.globl _lseek
+.balign        2
 
 _lseek:
        jmp     __lseek
similarity index 53%
rename from lib/libc/syscall/lseek64.s
rename to lib/libc/syscall/lseek64.S
index ec8600ec97573d73f8479fb99dab431ca1d6f9c9..771f5bbf3cdb4c4190c297277cef8c3cf76b784b 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __lseek64
-.define        _lseek64
-.align 2
+.globl _lseek64
+.balign        2
 
 _lseek64:
        jmp     __lseek64
similarity index 51%
rename from lib/libc/syscall/lstat.s
rename to lib/libc/syscall/lstat.S
index 8401ffa6f0caabdacb6ed5f6761f919d1d249759..2361529ccbb7db1736da465f7df0de38671bf8f7 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __lstat
-.define        _lstat
-.align 2
+.globl _lstat
+.balign        2
 
 _lstat:
        jmp     __lstat
similarity index 55%
rename from lib/libc/syscall/mapdriver.s
rename to lib/libc/syscall/mapdriver.S
index c8c95c572de9127ca935091e2feeb13dec914412..ac935e0cf2227705f565429ef896f59986c2bd6e 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __mapdriver
-.define        _mapdriver
-.align 2
+.globl _mapdriver
+.balign        2
 
 _mapdriver:
        jmp     __mapdriver
similarity index 51%
rename from lib/libc/syscall/mkdir.s
rename to lib/libc/syscall/mkdir.S
index 43bd99414dd7221395a573ffd43d689967e86506..8abb1f9ee9e18e15472b6ea95823f8c6bf3ba778 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __mkdir
-.define        _mkdir
-.align 2
+.globl _mkdir
+.balign        2
 
 _mkdir:
        jmp     __mkdir
similarity index 52%
rename from lib/libc/syscall/mkfifo.s
rename to lib/libc/syscall/mkfifo.S
index 91ec0f15191da2ace3656512feb954902739cbfd..07a29d5aeef3abde623c0573b6750e62163048a8 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __mkfifo
-.define        _mkfifo
-.align 2
+.globl _mkfifo
+.balign        2
 
 _mkfifo:
        jmp     __mkfifo
similarity index 51%
rename from lib/libc/syscall/mknod.s
rename to lib/libc/syscall/mknod.S
index 045cdfdd2d1deccefacf2c13ac462f1dc6a386f7..16794f3a0d7ee6c7247319f796a7ed3ec351c012 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __mknod
-.define        _mknod
-.align 2
+.globl _mknod
+.balign        2
 
 _mknod:
        jmp     __mknod
similarity index 64%
rename from lib/libc/syscall/mmap.s
rename to lib/libc/syscall/mmap.S
index a6c4b80a4ff72b9b851c1fa0a99afd3a1656fd28..0ea709587b4dbffa6848301efa16b24bd3dc49af 100644 (file)
@@ -1,11 +1,11 @@
-.sect .text
+.text
 .extern        __mmap
-.define        _mmap
+.globl _mmap
 .extern        __munmap
-.define        _munmap
+.globl _munmap
 .extern        __munmap_text
-.define        _munmap_text
-.align 2
+.globl _munmap_text
+.balign        2
 
 _mmap:
        jmp     __mmap
similarity index 51%
rename from lib/libc/syscall/mount.s
rename to lib/libc/syscall/mount.S
index 4bdbac562de1bb15dcb69b3d0988a8d7d65a0311..22f09c519be52d0d75794d1647fdfdf7a0dcd42f 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __mount
-.define        _mount
-.align 2
+.globl _mount
+.balign        2
 
 _mount:
        jmp     __mount
similarity index 61%
rename from lib/libc/syscall/nanosleep.s
rename to lib/libc/syscall/nanosleep.S
index 2d8b4e7513f4430709524dbcbb948ce1bf41c86b..66eb3ecbb60683bbbdd5596ea84755cdbb59cec7 100644 (file)
@@ -1,6 +1,6 @@
-.sect .text
+.text
 .extern        __nanosleep
-.define        _nanosleep
+.globl _nanosleep
 
 _nanosleep:
        jmp     __nanosleep
similarity index 50%
rename from lib/libc/syscall/open.s
rename to lib/libc/syscall/open.S
index 255c9836b7e9f43865459635438910d2cacdb81e..e178bd39f0cd9e50ef5075371240debb6eb6e888 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __open
-.define        _open
-.align 2
+.globl _open
+.balign        2
 
 _open:
        jmp     __open
similarity index 53%
rename from lib/libc/syscall/opendir.s
rename to lib/libc/syscall/opendir.S
index 07f35c63c9f5d27a879de0b3d104a84d6a8e11a1..cbfd761f5cc4f95d2c3ce9e5efb81a1c53f53f73 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __opendir
-.define        _opendir
-.align 2
+.globl _opendir
+.balign        2
 
 _opendir:
        jmp     __opendir
similarity index 54%
rename from lib/libc/syscall/pathconf.s
rename to lib/libc/syscall/pathconf.S
index 6215a76f639c50cbbbe773184640dd8d242276c2..a891a790b832fe02b944fa17d847d869478de7f4 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __pathconf
-.define        _pathconf
-.align 2
+.globl _pathconf
+.balign        2
 
 _pathconf:
        jmp     __pathconf
similarity index 51%
rename from lib/libc/syscall/pause.s
rename to lib/libc/syscall/pause.S
index c1e7adb6e709200fddbe4fa99f66f6a8d69f91c7..69c5e8fd1b6bfb96cf582cd6ff2a55e49e8d04bb 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __pause
-.define        _pause
-.align 2
+.globl _pause
+.balign        2
 
 _pause:
        jmp     __pause
similarity index 50%
rename from lib/libc/syscall/pipe.s
rename to lib/libc/syscall/pipe.S
index 8115ea72bc3b1e00966e991f17a97710f84587be..e66f1ac07712c86a09a67e2374a79e0da358ce2f 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __pipe
-.define        _pipe
-.align 2
+.globl _pipe
+.balign        2
 
 _pipe:
        jmp     __pipe
similarity index 52%
rename from lib/libc/syscall/ptrace.s
rename to lib/libc/syscall/ptrace.S
index ac30974dae64f9ecef6148a9b38ec11529eaca1d..d88e67850dc42fce0212dffa7724509e063d22ee 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __ptrace
-.define        _ptrace
-.align 2
+.globl _ptrace
+.balign        2
 
 _ptrace:
        jmp     __ptrace
similarity index 50%
rename from lib/libc/syscall/read.s
rename to lib/libc/syscall/read.S
index a61010cfbd0ff2d4bf1f62a164a9d296a3274d5a..a12fdb0279cfc1a60c189b4ddfb03ec09a465682 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __read
-.define        _read
-.align 2
+.globl _read
+.balign        2
 
 _read:
        jmp     __read
similarity index 53%
rename from lib/libc/syscall/readdir.s
rename to lib/libc/syscall/readdir.S
index ab6784de83febd7b1a5231c1e0d2706c46681e1a..063c6e9752d7de419c8686063587905df0b36bbc 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __readdir
-.define        _readdir
-.align 2
+.globl _readdir
+.balign        2
 
 _readdir:
        jmp     __readdir
similarity index 54%
rename from lib/libc/syscall/readlink.s
rename to lib/libc/syscall/readlink.S
index 2695bb2b895f1e8ce20974a35843f3f6d8826844..4036b71623d6cb9c17e443926b899d7b506aa9af 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __readlink
-.define        _readlink
-.align 2
+.globl _readlink
+.balign        2
 
 _readlink:
        jmp     __readlink
similarity index 52%
rename from lib/libc/syscall/reboot.s
rename to lib/libc/syscall/reboot.S
index 2883b77907ab1a357551f1dd5332680583deb026..cbac2654eb3b2edac6da6038e3cffcdeb421c46e 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __reboot
-.define        _reboot
-.align 2
+.globl _reboot
+.balign        2
 
 _reboot:
        jmp     __reboot
similarity index 52%
rename from lib/libc/syscall/rename.s
rename to lib/libc/syscall/rename.S
index 43e65ec22ec6ccc50642daea417857a3c104624b..2ea65c559b20d3d58d9dc693668b8a0f3e9bd708 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __rename
-.define        _rename
-.align 2
+.globl _rename
+.balign        2
 
 _rename:
        jmp     __rename
similarity index 55%
rename from lib/libc/syscall/rewinddir.s
rename to lib/libc/syscall/rewinddir.S
index 7b12a16f268699e4f14b47b08534b7c325659120..092917673540ef6c29cd2f9495ac526a4864f34e 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __rewinddir
-.define        _rewinddir
-.align 2
+.globl _rewinddir
+.balign        2
 
 _rewinddir:
        jmp     __rewinddir
similarity index 51%
rename from lib/libc/syscall/rmdir.s
rename to lib/libc/syscall/rmdir.S
index 0098759467347386ced334ab9a3854538c8ac3a5..ed25ee453e6c7ec12ae56d7eb9dcbdda66fe3b31 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __rmdir
-.define        _rmdir
-.align 2
+.globl _rmdir
+.balign        2
 
 _rmdir:
        jmp     __rmdir
similarity index 50%
rename from lib/libc/syscall/sbrk.s
rename to lib/libc/syscall/sbrk.S
index 273b63fed73b520793cd7aaeb712d67f60181a1d..82cbf06dcd768e6ffb39d58a4e31793fedef66bd 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sbrk
-.define        _sbrk
-.align 2
+.globl _sbrk
+.balign        2
 
 _sbrk:
        jmp     __sbrk
similarity index 53%
rename from lib/libc/syscall/seekdir.s
rename to lib/libc/syscall/seekdir.S
index 9c90b95a1bb2a028aa9c3f4727c7d8a2b62852ca..4f1aa79dd6f5d036d210b3826494e0e33fb8a62a 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __seekdir
-.define        _seekdir
-.align 2
+.globl _seekdir
+.balign        2
 
 _seekdir:
        jmp     __seekdir
similarity index 52%
rename from lib/libc/syscall/select.s
rename to lib/libc/syscall/select.S
index 4395e56003e1760c234608bed6c2842f6128b7e5..5e8598af474094e8d99e53da4b3453192d527fee 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __select
-.define        _select
-.align 2
+.globl _select
+.balign        2
 
 _select:
        jmp     __select
similarity index 55%
rename from lib/libc/syscall/setgid.s
rename to lib/libc/syscall/setgid.S
index 03c76ec8f5fc35e13a9e4306e370ed12e644a179..ab45f1aa2521ee4859f995f7d28f5f7a20e6bd5c 100644 (file)
@@ -1,8 +1,8 @@
-.sect .text
+.text
 .extern        __setgid
-.define        _setgid
-.define        _setegid
-.align 2
+.globl _setgid
+.globl _setegid
+.balign        2
 
 _setgid:
        jmp     __setgid
similarity index 55%
rename from lib/libc/syscall/setgroups.s
rename to lib/libc/syscall/setgroups.S
index 3cf8b500b8e2fc068eb566212f597b9bbffc1d3d..edc5702cd75807a666d9ae3d5c4839b3701c27e7 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __setgroups
-.define        _setgroups
-.align 2
+.globl _setgroups
+.balign        2
 
 _setgroups:
        jmp     __setgroups
diff --git a/lib/libc/syscall/setitimer.S b/lib/libc/syscall/setitimer.S
new file mode 100644 (file)
index 0000000..c4ab993
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.extern        __setitimer
+.globl _setitimer
+.balign        2
+
+_setitimer:
+       jmp     __setitimer
diff --git a/lib/libc/syscall/setitimer.s b/lib/libc/syscall/setitimer.s
deleted file mode 100644 (file)
index 6018a1a..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.sect .text
-.extern __setitimer
-.define _setitimer
-.align 2
-
-_setitimer:
-       jmp     __setitimer
similarity index 52%
rename from lib/libc/syscall/setsid.s
rename to lib/libc/syscall/setsid.S
index a834bb71f9ad9a73d2ad3f6de9c9fd2df4031e26..8d49d48fdde9b5492132a0820a4d383eb5d17df4 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __setsid
-.define        _setsid
-.align 2
+.globl _setsid
+.balign        2
 
 _setsid:
        jmp     __setsid
similarity index 55%
rename from lib/libc/syscall/setuid.s
rename to lib/libc/syscall/setuid.S
index fb5549f9084a8a50c1386c0b7216578b949a4d48..e2600b6c6292df8fd7cdb78b256e26d470258a3e 100644 (file)
@@ -1,8 +1,8 @@
-.sect .text
+.text
 .extern        __setuid
-.define        _setuid
-.define        _seteuid
-.align 2
+.globl _setuid
+.globl _seteuid
+.balign        2
 
 _setuid:
        jmp     __setuid
similarity index 55%
rename from lib/libc/syscall/sigaction.s
rename to lib/libc/syscall/sigaction.S
index bac3e796c2a225ad2a50c67b0dd3f1dc0881cfe5..7899bdd131d428e20d2e2c6aee79a6a3f95e6b17 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigaction
-.define        _sigaction
-.align 2
+.globl _sigaction
+.balign        2
 
 _sigaction:
        jmp     __sigaction
similarity index 55%
rename from lib/libc/syscall/sigaddset.s
rename to lib/libc/syscall/sigaddset.S
index 88d2fc9203278b18937199ad6330503b370151f3..b1189250c81b11e89f3a9b229707d6f3c79865f7 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigaddset
-.define        _sigaddset
-.align 2
+.globl _sigaddset
+.balign        2
 
 _sigaddset:
        jmp     __sigaddset
similarity index 55%
rename from lib/libc/syscall/sigdelset.s
rename to lib/libc/syscall/sigdelset.S
index f91178876416ab3c1122b379fa95f9b2024fa98e..be30fe108548e1a94d40ec9454247d9db2b72d2f 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigdelset
-.define        _sigdelset
-.align 2
+.globl _sigdelset
+.balign        2
 
 _sigdelset:
        jmp     __sigdelset
similarity index 57%
rename from lib/libc/syscall/sigemptyset.s
rename to lib/libc/syscall/sigemptyset.S
index c92e2475d4af3e73aaec7349301288a33401fc80..f5170de587ddb54aa8d7fd0da7f0f6fe204e3e14 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigemptyset
-.define        _sigemptyset
-.align 2
+.globl _sigemptyset
+.balign        2
 
 _sigemptyset:
        jmp     __sigemptyset
similarity index 56%
rename from lib/libc/syscall/sigfillset.s
rename to lib/libc/syscall/sigfillset.S
index b9f729285835fe1278368922c859924b6890d976..4fcecf388b39e9a8733ad5cfe49f4362c2a02938 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigfillset
-.define        _sigfillset
-.align 2
+.globl _sigfillset
+.balign        2
 
 _sigfillset:
        jmp     __sigfillset
similarity index 57%
rename from lib/libc/syscall/sigismember.s
rename to lib/libc/syscall/sigismember.S
index 93ed0e64f15baa208223d2b63732942fd0362c6d..31189e98059d2a5a2ce06f21ede8b7c98d2d55e4 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigismember
-.define        _sigismember
-.align 2
+.globl _sigismember
+.balign        2
 
 _sigismember:
        jmp     __sigismember
similarity index 56%
rename from lib/libc/syscall/sigpending.s
rename to lib/libc/syscall/sigpending.S
index 608c46d85345c781d498c3f16627fe3259be9654..43ef7e9e933b8a84f03b2b2c15219601220ce692 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigpending
-.define        _sigpending
-.align 2
+.globl _sigpending
+.balign        2
 
 _sigpending:
        jmp     __sigpending
similarity index 57%
rename from lib/libc/syscall/sigprocmask.s
rename to lib/libc/syscall/sigprocmask.S
index fc4ddc0343df44f6f35aa40b59ca42c6db3caf9c..d3b343bfd0dd8f40cdba46f33552f494fe290b9f 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigprocmask
-.define        _sigprocmask
-.align 2
+.globl _sigprocmask
+.balign        2
 
 _sigprocmask:
        jmp     __sigprocmask
similarity index 55%
rename from lib/libc/syscall/sigreturn.s
rename to lib/libc/syscall/sigreturn.S
index 2f5e9e3011cecb5488a09ce384a69c6acd916a14..7211fcd15b5b2523815145d20413a43ce84dd800 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigreturn
-.define        _sigreturn
-.align 2
+.globl _sigreturn
+.balign        2
 
 _sigreturn:
        jmp     __sigreturn
similarity index 56%
rename from lib/libc/syscall/sigsuspend.s
rename to lib/libc/syscall/sigsuspend.S
index ca4934cfb39f7affaf504b28b4d771dfd4becd2d..8bef82a193d6244f2709446c1ae5f932078fab3b 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sigsuspend
-.define        _sigsuspend
-.align 2
+.globl _sigsuspend
+.balign        2
 
 _sigsuspend:
        jmp     __sigsuspend
similarity index 50%
rename from lib/libc/syscall/sleep.s
rename to lib/libc/syscall/sleep.S
index c395c9fb72342d4e11b833903e6c794ec3f71fdd..afd5f2779a5e9fc7ba769278c94b833381f73bc5 100644 (file)
@@ -1,8 +1,7 @@
-.sect .text
+.text
 .extern        __sleep
-.define        _sleep
-.align 2
+.globl _sleep
+.balign        2
 
 _sleep:
        jmp     __sleep
-
similarity index 54%
rename from lib/libc/syscall/sprofile.s
rename to lib/libc/syscall/sprofile.S
index 61ff1c6bdc480aae6728be27505728794ebb328e..3621ad2d7e86c47fe32c1d81d2c3220a3e0baed4 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sprofile
-.define        _sprofile
-.align 2
+.globl _sprofile
+.balign        2
 
 _sprofile:
        jmp     __sprofile
similarity index 50%
rename from lib/libc/syscall/stat.s
rename to lib/libc/syscall/stat.S
index 7b966ca7f37b949430dc27f0500648cfc60d68c7..64fc110bab20b0f7012dea2dc9734fde6e31270e 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __stat
-.define        _stat
-.align 2
+.globl _stat
+.balign        2
 
 _stat:
        jmp     __stat
similarity index 51%
rename from lib/libc/syscall/stime.s
rename to lib/libc/syscall/stime.S
index 516469a7071eac198441d75ceab68778c6abab30..bf8b0fbed46cf5bed2e74f2e6ef7c6c8242817ea 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __stime
-.define        _stime
-.align 2
+.globl _stime
+.balign        2
 
 _stime:
        jmp     __stime
similarity index 52%
rename from lib/libc/syscall/svrctl.s
rename to lib/libc/syscall/svrctl.S
index f477737b0b1009666d1cca1c0c9e9448d4c9b2ba..53914debefe1cf8568443493667ef8bcd9168817 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __svrctl
-.define        _svrctl
-.align 2
+.globl _svrctl
+.balign        2
 
 _svrctl:
        jmp     __svrctl
similarity index 53%
rename from lib/libc/syscall/symlink.s
rename to lib/libc/syscall/symlink.S
index 53c5e10188cb38028804739f9f6b3d9f2e79c3ce..4c16db2ba0c11bdc635aa5e9a107a4a24f3ae8a1 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __symlink
-.define        _symlink
-.align 2
+.globl _symlink
+.balign        2
 
 _symlink:
        jmp     __symlink
similarity index 50%
rename from lib/libc/syscall/sync.s
rename to lib/libc/syscall/sync.S
index 8ad7e3bed3e4ca4c344b890ea39a54a2749e92ac..f29208a9d9959eda0b3179054b67d9c72e54d95c 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sync
-.define        _sync
-.align 2
+.globl _sync
+.balign        2
 
 _sync:
        jmp     __sync
similarity index 54%
rename from lib/libc/syscall/sysuname.s
rename to lib/libc/syscall/sysuname.S
index 2d8d7541c68746de992e4f8d11c46cbf7825a20d..7add73abf0d80b8d643787ddf728f59124b04994 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __sysuname
-.define        _sysuname
-.align 2
+.globl _sysuname
+.balign        2
 
 _sysuname:
        jmp     __sysuname
similarity index 53%
rename from lib/libc/syscall/tcdrain.s
rename to lib/libc/syscall/tcdrain.S
index 7dfaa9db3321ffbaf52933091b7fa7f349ffb00b..50ab346b3a3951184165fb79cde9d4b88bc9dc5e 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __tcdrain
-.define        _tcdrain
-.align 2
+.globl _tcdrain
+.balign        2
 
 _tcdrain:
        jmp     __tcdrain
similarity index 52%
rename from lib/libc/syscall/tcflow.s
rename to lib/libc/syscall/tcflow.S
index 69b8f9ca4abf53379a3c0a609dba311f7d14681a..3304165ccde42a41c112a9e4428d24f924aad5f7 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __tcflow
-.define        _tcflow
-.align 2
+.globl _tcflow
+.balign        2
 
 _tcflow:
        jmp     __tcflow
similarity index 53%
rename from lib/libc/syscall/tcflush.s
rename to lib/libc/syscall/tcflush.S
index c1067fd096dd190f12a4a46e72066b10cdae8bc6..a6f0b321a72672d2d287d56f91732d1a2eb98162 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __tcflush
-.define        _tcflush
-.align 2
+.globl _tcflush
+.balign        2
 
 _tcflush:
        jmp     __tcflush
similarity index 55%
rename from lib/libc/syscall/tcgetattr.s
rename to lib/libc/syscall/tcgetattr.S
index 5fbb7f9d4bb69f3c27cdd14c59dd2123aec73281..866c0ae044b9956a7e81a293e5d01c7561e95b04 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __tcgetattr
-.define        _tcgetattr
-.align 2
+.globl _tcgetattr
+.balign        2
 
 _tcgetattr:
        jmp     __tcgetattr
similarity index 57%
rename from lib/libc/syscall/tcsendbreak.s
rename to lib/libc/syscall/tcsendbreak.S
index e91d6892d905d36e3e85cdba8054e85ae1cc6238..1d14e18cee242c3be6d8c4ba2c09078bef746cb4 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __tcsendbreak
-.define        _tcsendbreak
-.align 2
+.globl _tcsendbreak
+.balign        2
 
 _tcsendbreak:
        jmp     __tcsendbreak
similarity index 55%
rename from lib/libc/syscall/tcsetattr.s
rename to lib/libc/syscall/tcsetattr.S
index 896c6c0aa5cfda161703a3725c32394574471c22..f1a8bde4d15624f438def091e9f5b1cb81ac469c 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __tcsetattr
-.define        _tcsetattr
-.align 2
+.globl _tcsetattr
+.balign        2
 
 _tcsetattr:
        jmp     __tcsetattr
similarity index 50%
rename from lib/libc/syscall/time.s
rename to lib/libc/syscall/time.S
index e0d424bec964da41fdc264faa0734f3bb0160aaf..0ba1389e4343117e51e470280b68903deb973f4c 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __time
-.define        _time
-.align 2
+.globl _time
+.balign        2
 
 _time:
        jmp     __time
similarity index 51%
rename from lib/libc/syscall/times.s
rename to lib/libc/syscall/times.S
index 34624d42bb5294fa96a131d6741b4b6da09ae8a3..5bf1e9b44c0815977780c86f0abd70a1a670af6a 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __times
-.define        _times
-.align 2
+.globl _times
+.balign        2
 
 _times:
        jmp     __times
similarity index 59%
rename from lib/libc/syscall/truncate.s
rename to lib/libc/syscall/truncate.S
index 1915ad7857a14d727b22713fab4e97e7025282ad..19ca7c115d9d69299b5dcee2f915cc81de629342 100644 (file)
@@ -1,13 +1,13 @@
-.sect .text
+.text
 .extern        __truncate
 .extern        __ftruncate
-.define        _truncate
-.define        _ftruncate
-.align 2
+.globl _truncate
+.globl _ftruncate
+.balign        2
 
 _truncate:
        jmp     __truncate
 
-.align 2
+.balign        2
 _ftruncate:
        jmp     __ftruncate
similarity index 51%
rename from lib/libc/syscall/umask.s
rename to lib/libc/syscall/umask.S
index b882d196758c767797a9a8b2f4c3ce95f90d2964..ea9440e8136d24201ae93bbfdabd31693f15194d 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __umask
-.define        _umask
-.align 2
+.globl _umask
+.balign        2
 
 _umask:
        jmp     __umask
similarity index 52%
rename from lib/libc/syscall/umount.s
rename to lib/libc/syscall/umount.S
index 0e44c9516e209a6635831b28f0c5c3cf47d667ef..017507324f4b56c47e35c1f095473d0891c07dc8 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __umount
-.define        _umount
-.align 2
+.globl _umount
+.balign        2
 
 _umount:
        jmp     __umount
similarity index 51%
rename from lib/libc/syscall/uname.s
rename to lib/libc/syscall/uname.S
index 4a87f57ae40ddffc732969326ac7a43c43898059..90e5e1cd3c76b6f5c73c058fe6a1ca05ff18868e 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __uname
-.define        _uname
-.align 2
+.globl _uname
+.balign        2
 
 _uname:
        jmp     __uname
similarity index 52%
rename from lib/libc/syscall/unlink.s
rename to lib/libc/syscall/unlink.S
index d0bea4183b4b45d627305efd5914132953ce6ddf..c2fd587ef889550b516d7194fe0752d8fd07cba3 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __unlink
-.define        _unlink
-.align 2
+.globl _unlink
+.balign        2
 
 _unlink:
        jmp     __unlink
similarity index 51%
rename from lib/libc/syscall/utime.s
rename to lib/libc/syscall/utime.S
index 01e60e7a2a74be65e6135ed2429febc3774d06a3..caf8ac2955a1f810a68227f7d8534463cf869156 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __utime
-.define        _utime
-.align 2
+.globl _utime
+.balign        2
 
 _utime:
        jmp     __utime
similarity index 65%
rename from lib/libc/syscall/vm_dmacalls.s
rename to lib/libc/syscall/vm_dmacalls.S
index 920af0d17129568226a4db647fab03730ec110c7..9ba1aefcbcb7d39e1149131a7caeb80098cdb978 100644 (file)
@@ -1,11 +1,11 @@
-.sect .text
+.text
 .extern        __vm_adddma
-.define        _vm_adddma
+.globl _vm_adddma
 .extern        __vm_deldma
-.define        _vm_deldma
+.globl _vm_deldma
 .extern        __vm_getdma
-.define        _vm_getdma
-.align 2
+.globl _vm_getdma
+.balign        2
 
 _vm_adddma:
        jmp     __vm_adddma
@@ -13,4 +13,3 @@ _vm_deldma:
        jmp     __vm_deldma
 _vm_getdma:
        jmp     __vm_getdma
-
similarity index 56%
rename from lib/libc/syscall/vm_getphys.s
rename to lib/libc/syscall/vm_getphys.S
index f153bfdacad5bf7f9c9fd8f84ea2d5526c3d61e2..1e0ae8955fd6148fae6e2b82d3af353dd06389bb 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __vm_getphys
-.define        _vm_getphys
-.align 2
+.globl _vm_getphys
+.balign        2
 
 _vm_getphys:
        jmp     __vm_getphys
similarity index 59%
rename from lib/libc/syscall/vm_getrefcount.s
rename to lib/libc/syscall/vm_getrefcount.S
index 0020cf2e797e5cbc0b8b47a985eb17667b139629..e7cb9ef7c1514b471ed364904ca4605fb282e2c7 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __vm_getrefcount
-.define        _vm_getrefcount
-.align 2
+.globl _vm_getrefcount
+.balign        2
 
 _vm_getrefcount:
        jmp     __vm_getrefcount
diff --git a/lib/libc/syscall/vm_query_exit.S b/lib/libc/syscall/vm_query_exit.S
new file mode 100644 (file)
index 0000000..e474211
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.extern        __vm_query_exit
+.globl _vm_query_exit
+.balign        2
+
+_vm_query_exit:
+       jmp     __vm_query_exit
diff --git a/lib/libc/syscall/vm_query_exit.s b/lib/libc/syscall/vm_query_exit.s
deleted file mode 100644 (file)
index f84ecfd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.sect .text
-.extern __vm_query_exit
-.define _vm_query_exit
-.align 2
-
-_vm_query_exit:
-       jmp     __vm_query_exit
similarity index 54%
rename from lib/libc/syscall/vm_remap.s
rename to lib/libc/syscall/vm_remap.S
index c8e7c0d58db6adc0273f9757a63c9a9155d0871d..c4c68f844f395ef1ef04a591ff5509e28202e3b5 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __vm_remap
-.define        _vm_remap
-.align 2
+.globl _vm_remap
+.balign        2
 
 _vm_remap:
        jmp     __vm_remap
diff --git a/lib/libc/syscall/vm_set_priv.S b/lib/libc/syscall/vm_set_priv.S
new file mode 100644 (file)
index 0000000..7f865b8
--- /dev/null
@@ -0,0 +1,7 @@
+.text
+.extern        __vm_set_priv
+.globl _vm_set_priv
+.balign        2
+
+_vm_set_priv:
+       jmp     __vm_set_priv
diff --git a/lib/libc/syscall/vm_set_priv.s b/lib/libc/syscall/vm_set_priv.s
deleted file mode 100644 (file)
index 09a7bc9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.sect .text
-.extern __vm_set_priv
-.define _vm_set_priv
-.align 2
-
-_vm_set_priv:
-       jmp     __vm_set_priv
similarity index 54%
rename from lib/libc/syscall/vm_unmap.s
rename to lib/libc/syscall/vm_unmap.S
index 69ff2050d2068d5353d539a3f21ae96a4a3d6605..c6564c2254c4bbf1caf87957c4093c6e83b661e2 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __vm_unmap
-.define        _vm_unmap
-.align 2
+.globl _vm_unmap
+.balign        2
 
 _vm_unmap:
        jmp     __vm_unmap
similarity index 50%
rename from lib/libc/syscall/wait.s
rename to lib/libc/syscall/wait.S
index fc700f452e7f9ceda39b833e991e06bd3b12b006..80b8f2c97bfb6851911170a1a9b3671b017dcbdd 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __wait
-.define        _wait
-.align 2
+.globl _wait
+.balign        2
 
 _wait:
        jmp     __wait
similarity index 53%
rename from lib/libc/syscall/waitpid.s
rename to lib/libc/syscall/waitpid.S
index ca4fac6f887dc0a2de3111cf90d6db1033ed1600..2efa266a77f00ac655c42de135c72cb55a7982b4 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __waitpid
-.define        _waitpid
-.align 2
+.globl _waitpid
+.balign        2
 
 _waitpid:
        jmp     __waitpid
similarity index 51%
rename from lib/libc/syscall/write.s
rename to lib/libc/syscall/write.S
index 276fed4733467b958d789df672c9b28ab4197734..efb64637761d92e0902055436b9e7fa4727e46fe 100644 (file)
@@ -1,7 +1,7 @@
-.sect .text
+.text
 .extern        __write
-.define        _write
-.align 2
+.globl _write
+.balign        2
 
 _write:
        jmp     __write
index 4ce20a717ccc665372a4efa61538a6b3dbd55fc7..632d3a4ae7921353ad03dc7b657432377d96d6ab 100644 (file)
@@ -5,10 +5,10 @@
 LIB=end
 
 SRCS=  \
-       edata.s \
-       em_end.s \
-       end.s \
-       etext.s
+       edata.S \
+       em_end.S \
+       end.S \
+       etext.S
 
 .if ${COMPILER_TYPE} == "gnu"
 .include "${.CURDIR}/gnu/Makefile.inc"
diff --git a/lib/libend/edata.S b/lib/libend/edata.S
new file mode 100644 (file)
index 0000000..a598c6e
--- /dev/null
@@ -0,0 +1,10 @@
+.text
+#if defined(__ACK__)
+.rom
+#else
+.data
+#endif
+.data
+.balign _EM_WSIZE
+.globl _edata
+_edata:
diff --git a/lib/libend/edata.s b/lib/libend/edata.s
deleted file mode 100644 (file)
index ad44a97..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-.sect .text
-.sect .rom
-.sect .data
-.align _EM_WSIZE
-.define _edata
-_edata:
diff --git a/lib/libend/em_end.S b/lib/libend/em_end.S
new file mode 100644 (file)
index 0000000..a1a09e7
--- /dev/null
@@ -0,0 +1,26 @@
+.text
+.balign _EM_WSIZE
+.globl __etext, endtext
+__etext:
+endtext:
+#if defined(__ACK__)
+.rom
+#else
+.data
+#endif
+.balign _EM_WSIZE
+.globl endrom
+endrom:
+.data
+.balign _EM_WSIZE
+.globl __edata, enddata
+__edata:
+enddata:
+.bss
+.balign _EM_WSIZE
+#if defined(__ACK__)
+.end   /* only for declaration of _end, __end or endbss. */
+.globl __end, endbss
+__end:
+endbss:
+#endif
diff --git a/lib/libend/em_end.s b/lib/libend/em_end.s
deleted file mode 100644 (file)
index ad10ad1..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#
-.sect .text
-.align _EM_WSIZE
-.define __etext, endtext
-__etext:
-endtext:
-.sect .rom
-.align _EM_WSIZE
-.define endrom
-endrom:
-.sect .data
-.align _EM_WSIZE
-.define __edata, enddata
-__edata:
-enddata:
-.sect .bss
-.align _EM_WSIZE
-.sect .end     ! only for declaration of _end, __end or endbss.
-.define __end, endbss
-__end:
-endbss:
diff --git a/lib/libend/end.S b/lib/libend/end.S
new file mode 100644 (file)
index 0000000..a2efbdb
--- /dev/null
@@ -0,0 +1,13 @@
+.text
+#if defined(__ACK__)
+.rom
+#else
+.data
+#endif
+.data
+.bss
+#if defined(__ACK__)
+.end   /* only for declaration of _end, __end or endbss. */
+.globl _end
+_end:
+#endif
diff --git a/lib/libend/end.s b/lib/libend/end.s
deleted file mode 100644 (file)
index bbd338d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-.sect .text
-.sect .rom
-.sect .data
-.sect .bss
-.sect .end     ! only for declaration of _end, __end or endbss.
-.define _end
-_end:
diff --git a/lib/libend/etext.S b/lib/libend/etext.S
new file mode 100644 (file)
index 0000000..dc927f6
--- /dev/null
@@ -0,0 +1,4 @@
+.text
+.balign _EM_WSIZE
+.globl _etext
+_etext:
diff --git a/lib/libend/etext.s b/lib/libend/etext.s
deleted file mode 100644 (file)
index 7ff1347..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#
-.sect .text
-.align _EM_WSIZE
-.define _etext
-_etext:
index a348fb239d5ed7078d838ba18828d6b31685cb7c..16dea0d8368301d27b35974b70defd16adb7a879 100644 (file)
@@ -1,5 +1,5 @@
 # end sources
 .PATH: ${.CURDIR}/gnu
 
-SRCS+=gnu_end.gs
+SRCS+=gnu_end.S
 
index e6eaaa517ea6514714edfbaeacd0963dbf996685..3198f4d54d36a5382b7955c15f6e99b82efee38d 100644 (file)
@@ -104,7 +104,7 @@ SRCS=  \
        fkey_ctl.c \
        tsc_util.c \
        report.c \
-       read_tsc.s \
+       read_tsc.S \
        read_tsc_64.c \
        ser_putc.c \
        stacktrace.c \
diff --git a/lib/libsys/read_tsc.S b/lib/libsys/read_tsc.S
new file mode 100644 (file)
index 0000000..143d30d
--- /dev/null
@@ -0,0 +1,46 @@
+/*  */
+/* sections */
+
+
+.globl _read_tsc       /* read the cycle counter (Pentium and up) */
+.text
+/**===========================================================================* */
+/* PUBLIC void read_tsc(unsigned long *high, unsigned long *low); */
+/* Read the cycle counter of the CPU. Pentium and up.  */
+.balign        16
+_read_tsc:
+       push    %edx
+       push    %eax
+.byte  0x0f    /* this is the RDTSC instruction  */
+.byte  0x31    /* it places the TSC in EDX:EAX */
+       push    %ebp
+       movl    16(%esp), %ebp
+       movl    %edx, (%ebp)
+       movl    20(%esp), %ebp
+       movl    %eax, (%ebp)
+       pop     %ebp
+       pop     %eax
+       pop     %edx
+       ret
+
+/**===========================================================================* */
+/* PUBLIC void read_host_time_ns(unsigned long *high, unsigned long *low); */
+/* access real time in ns from host in vmware. */
+.balign 16
+_read_host_time_ns:
+        pushl   %edx
+        pushl   %eax
+        pushl   %ecx
+        movl    $0x10001, %ecx
+.byte  0x0f    /* this is the RDTSC instruction  */
+.byte  0x31    /* it places the TSC in EDX:EAX */
+        pushl   %ebp
+        movl    20(%esp), %ebp
+        movl    %edx, (%ebp)
+        movl    24(%esp), %ebp
+        movl    %eax, (%ebp)
+        popl    %ebp
+        popl    %ecx
+        popl    %eax
+        popl    %edx
+        ret
diff --git a/lib/libsys/read_tsc.s b/lib/libsys/read_tsc.s
deleted file mode 100644 (file)
index 94bd0e5..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# 
-! sections
-
-.sect .text; .sect .rom; .sect .data; .sect .bss
-
-.define        _read_tsc       ! read the cycle counter (Pentium and up)
-
-.sect .text
-!*===========================================================================*
-! PUBLIC void read_tsc(unsigned long *high, unsigned long *low);
-! Read the cycle counter of the CPU. Pentium and up. 
-.align 16
-_read_tsc:
-       push edx
-       push eax
-.data1 0x0f            ! this is the RDTSC instruction 
-.data1 0x31            ! it places the TSC in EDX:EAX
-       push ebp
-       mov ebp, 16(esp)
-       mov (ebp), edx
-       mov ebp, 20(esp)
-       mov (ebp), eax
-       pop ebp
-       pop eax
-       pop edx
-       ret
-
-!*===========================================================================*
-! PUBLIC void read_host_time_ns(unsigned long *high, unsigned long *low);
-! access real time in ns from host in vmware.
-.align 16
-_read_host_time_ns:
-       push edx
-       push eax
-       push ecx
-       mov ecx, 0x10001
-.data1 0x0f            ! this is the RDPMC instruction 
-.data1 0x33            ! it places the result in EDX:EAX
-       push ebp
-       mov ebp, 20(esp)
-       mov (ebp), edx
-       mov ebp, 24(esp)
-       mov (ebp), eax
-       pop ebp
-       pop ecx
-       pop eax
-       pop edx
-       ret
-
index 486b2f0791dc79763df148248bcd14dd11d28476..c482560cdc0c6dc4536dd2f05c49539f19da5676 100644 (file)
@@ -5,7 +5,7 @@ OBJ=backdoor.o attr.o channel.o dir.o error.o file.o \
        link.o misc.o path.o rpc.o time.o
 
 AR=ar
-GAS2ACK=gas2ack
+GAS2ACK=gas2ack -u
 
 all build: $(LIBNAME)