]> Zhao Yanbai Git Server - minix.git/commitdiff
Macros for symbols used in both ASM and C
authorArun Thomas <arun@minix3.org>
Tue, 17 Aug 2010 16:44:07 +0000 (16:44 +0000)
committerArun Thomas <arun@minix3.org>
Tue, 17 Aug 2010 16:44:07 +0000 (16:44 +0000)
-The macros take care of prepending the leading underscore when
 necessary.

209 files changed:
include/arch/i386/Makefile
include/arch/i386/asm.h [new file with mode: 0644]
kernel/arch/i386/apic_asm.S
kernel/arch/i386/debugreg.S
kernel/arch/i386/io_inb.S
kernel/arch/i386/io_inl.S
kernel/arch/i386/io_intr.S
kernel/arch/i386/io_inw.S
kernel/arch/i386/io_outb.S
kernel/arch/i386/io_outl.S
kernel/arch/i386/io_outw.S
kernel/arch/i386/klib.S
kernel/arch/i386/klib16.S
kernel/arch/i386/mpx.S
kernel/arch/i386/multiboot.S
lib/libc/arch/i386/int64/add64.S
lib/libc/arch/i386/int64/add64u.S
lib/libc/arch/i386/int64/bsr64.S
lib/libc/arch/i386/int64/cmp64.S
lib/libc/arch/i386/int64/cv64u.S
lib/libc/arch/i386/int64/cvu64.S
lib/libc/arch/i386/int64/diff64.S
lib/libc/arch/i386/int64/div64u.S
lib/libc/arch/i386/int64/ex64.S
lib/libc/arch/i386/int64/make64.S
lib/libc/arch/i386/int64/mul64u.S
lib/libc/arch/i386/int64/sub64.S
lib/libc/arch/i386/int64/sub64u.S
lib/libc/arch/i386/math/fpu_cw.S
lib/libc/arch/i386/math/fpu_round.S
lib/libc/arch/i386/math/fpu_sw.S
lib/libc/arch/i386/misc/_cpuid.S
lib/libc/arch/i386/misc/alloca.S
lib/libc/arch/i386/misc/get_bp.S
lib/libc/arch/i386/misc/getprocessor.S
lib/libc/arch/i386/misc/oneC_sum.S
lib/libc/arch/i386/misc/ucontext.S
lib/libc/arch/i386/rts/__sigreturn.S
lib/libc/arch/i386/rts/_ipc.S
lib/libc/arch/i386/rts/_senda.S
lib/libc/arch/i386/string/_memmove.S
lib/libc/arch/i386/string/_strncat.S
lib/libc/arch/i386/string/_strncmp.S
lib/libc/arch/i386/string/_strncpy.S
lib/libc/arch/i386/string/_strnlen.S
lib/libc/arch/i386/string/bcmp.S
lib/libc/arch/i386/string/bcopy.S
lib/libc/arch/i386/string/bzero.S
lib/libc/arch/i386/string/index.S
lib/libc/arch/i386/string/memchr.S
lib/libc/arch/i386/string/memcmp.S
lib/libc/arch/i386/string/memcpy.S
lib/libc/arch/i386/string/memmove.S
lib/libc/arch/i386/string/memset.S
lib/libc/arch/i386/string/rindex.S
lib/libc/arch/i386/string/strcat.S
lib/libc/arch/i386/string/strchr.S
lib/libc/arch/i386/string/strcmp.S
lib/libc/arch/i386/string/strcpy.S
lib/libc/arch/i386/string/strlen.S
lib/libc/arch/i386/string/strncat.S
lib/libc/arch/i386/string/strncmp.S
lib/libc/arch/i386/string/strncpy.S
lib/libc/arch/i386/string/strnlen.S
lib/libc/arch/i386/string/strrchr.S
lib/libc/gnu/arch/i386/rts/__setjmp.S
lib/libc/gnu/arch/i386/rts/longjmp.S
lib/libc/syscall/_exit.S
lib/libc/syscall/_pm_findproc.S
lib/libc/syscall/access.S
lib/libc/syscall/adddma.S
lib/libc/syscall/alarm.S
lib/libc/syscall/brk.S
lib/libc/syscall/cfgetispeed.S
lib/libc/syscall/cfgetospeed.S
lib/libc/syscall/cfsetispeed.S
lib/libc/syscall/cfsetospeed.S
lib/libc/syscall/chdir.S
lib/libc/syscall/chmod.S
lib/libc/syscall/chown.S
lib/libc/syscall/chroot.S
lib/libc/syscall/close.S
lib/libc/syscall/closedir.S
lib/libc/syscall/cprofile.S
lib/libc/syscall/creat.S
lib/libc/syscall/deldma.S
lib/libc/syscall/dup.S
lib/libc/syscall/dup2.S
lib/libc/syscall/execl.S
lib/libc/syscall/execle.S
lib/libc/syscall/execlp.S
lib/libc/syscall/execv.S
lib/libc/syscall/execve.S
lib/libc/syscall/execvp.S
lib/libc/syscall/fchmod.S
lib/libc/syscall/fchown.S
lib/libc/syscall/fcntl.S
lib/libc/syscall/fork.S
lib/libc/syscall/fpathconf.S
lib/libc/syscall/fstat.S
lib/libc/syscall/fstatfs.S
lib/libc/syscall/fstatvfs.S
lib/libc/syscall/getcwd.S
lib/libc/syscall/getdents.S
lib/libc/syscall/getdma.S
lib/libc/syscall/getegid.S
lib/libc/syscall/geteuid.S
lib/libc/syscall/getgid.S
lib/libc/syscall/getgroups.S
lib/libc/syscall/getitimer.S
lib/libc/syscall/getngid.S
lib/libc/syscall/getnpid.S
lib/libc/syscall/getnprocnr.S
lib/libc/syscall/getnucred.S
lib/libc/syscall/getnuid.S
lib/libc/syscall/getpgrp.S
lib/libc/syscall/getpid.S
lib/libc/syscall/getppid.S
lib/libc/syscall/getpprocnr.S
lib/libc/syscall/getprocnr.S
lib/libc/syscall/getsigset.S
lib/libc/syscall/getsysinfo.S
lib/libc/syscall/getuid.S
lib/libc/syscall/ioctl.S
lib/libc/syscall/isatty.S
lib/libc/syscall/kill.S
lib/libc/syscall/killpg.S
lib/libc/syscall/link.S
lib/libc/syscall/lseek.S
lib/libc/syscall/lseek64.S
lib/libc/syscall/lstat.S
lib/libc/syscall/mapdriver.S
lib/libc/syscall/mkdir.S
lib/libc/syscall/mkfifo.S
lib/libc/syscall/mknod.S
lib/libc/syscall/mmap.S
lib/libc/syscall/mount.S
lib/libc/syscall/munmap.S
lib/libc/syscall/nanosleep.S
lib/libc/syscall/open.S
lib/libc/syscall/opendir.S
lib/libc/syscall/pathconf.S
lib/libc/syscall/pause.S
lib/libc/syscall/pipe.S
lib/libc/syscall/ptrace.S
lib/libc/syscall/read.S
lib/libc/syscall/readdir.S
lib/libc/syscall/readlink.S
lib/libc/syscall/reboot.S
lib/libc/syscall/rename.S
lib/libc/syscall/rewinddir.S
lib/libc/syscall/rmdir.S
lib/libc/syscall/sbrk.S
lib/libc/syscall/seekdir.S
lib/libc/syscall/select.S
lib/libc/syscall/setgid.S
lib/libc/syscall/setgroups.S
lib/libc/syscall/setitimer.S
lib/libc/syscall/setsid.S
lib/libc/syscall/setuid.S
lib/libc/syscall/sigaction.S
lib/libc/syscall/sigaddset.S
lib/libc/syscall/sigdelset.S
lib/libc/syscall/sigemptyset.S
lib/libc/syscall/sigfillset.S
lib/libc/syscall/sigismember.S
lib/libc/syscall/sigpending.S
lib/libc/syscall/sigprocmask.S
lib/libc/syscall/sigreturn.S
lib/libc/syscall/sigsuspend.S
lib/libc/syscall/sleep.S
lib/libc/syscall/sprofile.S
lib/libc/syscall/stat.S
lib/libc/syscall/statvfs.S
lib/libc/syscall/stime.S
lib/libc/syscall/svrctl.S
lib/libc/syscall/symlink.S
lib/libc/syscall/sync.S
lib/libc/syscall/sysuname.S
lib/libc/syscall/tcdrain.S
lib/libc/syscall/tcflow.S
lib/libc/syscall/tcflush.S
lib/libc/syscall/tcgetattr.S
lib/libc/syscall/tcsendbreak.S
lib/libc/syscall/tcsetattr.S
lib/libc/syscall/time.S
lib/libc/syscall/times.S
lib/libc/syscall/truncate.S
lib/libc/syscall/umask.S
lib/libc/syscall/umount.S
lib/libc/syscall/uname.S
lib/libc/syscall/unlink.S
lib/libc/syscall/utime.S
lib/libc/syscall/vm_dmacalls.S
lib/libc/syscall/vm_getphys.S
lib/libc/syscall/vm_getrefcount.S
lib/libc/syscall/vm_memctl.S
lib/libc/syscall/vm_query_exit.S
lib/libc/syscall/vm_remap.S
lib/libc/syscall/vm_set_priv.S
lib/libc/syscall/vm_unmap.S
lib/libc/syscall/vm_update.S
lib/libc/syscall/wait.S
lib/libc/syscall/waitpid.S
lib/libc/syscall/write.S
lib/libhgfs/backdoor.S
lib/libsys/read_tsc.S
servers/vm/arch/i386/util.S
test/test57loop.S

index e6a3ef52d200ce7593012f204d5d239ed44698ad..5fd9edfbd8e672047ff003c49aa9df3aeefbe655 100644 (file)
@@ -2,6 +2,6 @@ INCSDIR= /usr/include/i386
 
 INCS=  archtypes.h bios.h cmos.h cpu.h diskparm.h fpu.h int86.h \
        interrupt.h mcontext.h memory.h partition.h pci.h ports.h \
-       stackframe.h vm.h
+       stackframe.h vm.h asm.h
 
 .include <bsd.kinc.mk>
diff --git a/include/arch/i386/asm.h b/include/arch/i386/asm.h
new file mode 100644 (file)
index 0000000..ade9580
--- /dev/null
@@ -0,0 +1,73 @@
+/*-
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * William Jolitz.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *     @(#)asm.h       5.5 (Berkeley) 5/7/91
+ */
+
+#ifndef _I386_ASM_H_
+#define _I386_ASM_H_
+
+#ifdef __ELF__
+# define _C_LABEL(x)    x
+#else
+# ifdef __STDC__
+#  define _C_LABEL(x)   _ ## x
+# else
+#  define _C_LABEL(x)   _/**/x
+# endif
+#endif
+#define _ASM_LABEL(x)   x
+
+/* allow overriding entrypoint alignment */
+#if !defined(_ALIGN_TEXT)
+# define _ALIGN_TEXT .balign  16
+#endif
+
+#ifdef __ACK__
+#define _ENTRY(x) \
+       .text; _ALIGN_TEXT; .globl x; x:
+#else
+#define _ENTRY(x) \
+       .text; _ALIGN_TEXT; .globl x; .type x,@function; x:
+#endif
+#define _LABEL(x) \
+       .globl x; x:
+
+#define        ENTRY(y)        _ENTRY(_C_LABEL(y))
+#define        NENTRY(y)       _ENTRY(_C_LABEL(y))
+#define        ASENTRY(y)      _ENTRY(_ASM_LABEL(y))
+#define        LABEL(y)        _LABEL(_C_LABEL(y))
+#define        END(y)          .size y, . - y
+
+#define IMPORT(sym)               \
+        .extern _C_LABEL(sym)
+
+#endif /* !_I386_ASM_H_ */
index b678a5a4f08375e2c9ea581013b533a8d311b4c8..ddbd30f59243041d840b8689626b9493ffd9d95c 100644 (file)
@@ -2,30 +2,13 @@
 #include "apic.h"
 #include "sconst.h"
 #include "apic_asm.h"
+#include <machine/asm.h>
 
-.globl _apic_hwint00   /*  handlers for hardware interrupts */
-.globl _apic_hwint01
-.globl _apic_hwint02
-.globl _apic_hwint03
-.globl _apic_hwint04
-.globl _apic_hwint05
-.globl _apic_hwint06
-.globl _apic_hwint07
-.globl _apic_hwint08
-.globl _apic_hwint09
-.globl _apic_hwint10
-.globl _apic_hwint11
-.globl _apic_hwint12
-.globl _apic_hwint13
-.globl _apic_hwint14
-.globl _apic_hwint15
-
-.text
 #define APIC_IRQ_HANDLER(irq)  \
        push    $irq                                                            ;\
-       call    _irq_handle             /* intr_handle(irq_handlers[irq]) */    ;\
+       call    _C_LABEL(irq_handle)    /* intr_handle(irq_handlers[irq]) */    ;\
        add     $4, %esp                                                        ;\
-       mov     _lapic_eoi_addr, %eax                                           ;\
+       mov     _C_LABEL(lapic_eoi_addr), %eax                                  ;\
        movl    $0, (%eax)                                                      ;\
 
 /*===========================================================================*/
                                                                        \
        SAVE_PROCESS_CTX(0)                                             ;\
        push    %ebp                                                    ;\
-       call    _context_stop                                           ;\
+       call    _C_LABEL(context_stop)                                  ;\
        add     $4, %esp                                                ;\
        movl    $0, %ebp        /* for stack trace */                   ;\
        APIC_IRQ_HANDLER(irq)                                           ;\
-       jmp     _switch_to_user                                         ;\
+       jmp     _C_LABEL(switch_to_user)                                ;\
                                                                        \
 0:                                                                     \
        pusha                                                           ;\
-       call    _context_stop_idle                                      ;\
+       call    _C_LABEL(context_stop_idle)                             ;\
        APIC_IRQ_HANDLER(irq)                                           ;\
        CLEAR_IF(10*4(%esp))                                            ;\
        popa                                                            ;\
        iret                                                            ;
 
+/*  Handlers for hardware interrupts */
 /*  Each of these entry points is an expansion of the hwint_master macro */
-.balign        16
-_apic_hwint00:
+ENTRY(apic_hwint00)
 /*  Interrupt routine for irq 0 (the clock). */
        apic_hwint(0)
 
-.balign        16
-_apic_hwint01:
+ENTRY(apic_hwint01)
 /*  Interrupt routine for irq 1 (keyboard) */
        apic_hwint(1)
 
-.balign        16
-_apic_hwint02:
+ENTRY(apic_hwint02)
 /*  Interrupt routine for irq 2 (cascade!) */
        apic_hwint(2)
 
-.balign        16
-_apic_hwint03:
+ENTRY(apic_hwint03)
 /*  Interrupt routine for irq 3 (second serial) */
        apic_hwint(3)
 
-.balign        16
-_apic_hwint04:
+ENTRY(apic_hwint04)
 /*  Interrupt routine for irq 4 (first serial) */
        apic_hwint(4)
 
-.balign        16
-_apic_hwint05:
+ENTRY(apic_hwint05)
 /*  Interrupt routine for irq 5 (XT winchester) */
        apic_hwint(5)
 
-.balign        16
-_apic_hwint06:
+ENTRY(apic_hwint06)
 /*  Interrupt routine for irq 6 (floppy) */
        apic_hwint(6)
 
-.balign        16
-_apic_hwint07:
+ENTRY(apic_hwint07)
 /*  Interrupt routine for irq 7 (printer) */
        apic_hwint(7)
 
-.balign        16
-_apic_hwint08:
+ENTRY(apic_hwint08)
 /*  Interrupt routine for irq 8 (realtime clock) */
        apic_hwint(8)
 
-.balign        16
-_apic_hwint09:
+ENTRY(apic_hwint09)
 /*  Interrupt routine for irq 9 (irq 2 redirected) */
        apic_hwint(9)
 
-.balign        16
-_apic_hwint10:
+ENTRY(apic_hwint10)
 /*  Interrupt routine for irq 10 */
        apic_hwint(10)
 
-.balign        16
-_apic_hwint11:
+ENTRY(apic_hwint11)
 /*  Interrupt routine for irq 11 */
        apic_hwint(11)
 
-.balign        16
-_apic_hwint12:
+ENTRY(apic_hwint12)
 /*  Interrupt routine for irq 12 */
        apic_hwint(12)
 
-.balign        16
-_apic_hwint13:
+ENTRY(apic_hwint13)
 /*  Interrupt routine for irq 13 (FPU exception) */
        apic_hwint(13)
 
-.balign        16
-_apic_hwint14:
+ENTRY(apic_hwint14)
 /*  Interrupt routine for irq 14 (AT winchester) */
        apic_hwint(14)
 
-.balign        16
-_apic_hwint15:
+ENTRY(apic_hwint15)
 /*  Interrupt routine for irq 15 */
        apic_hwint(15)
 
@@ -137,7 +105,7 @@ _apic_hwint15:
 #define LAPIC_INTR_HANDLER(func)       \
        movl    $func, %eax                                             ;\
        call    *%eax           /* call the actual handler */           ;\
-       mov     _lapic_eoi_addr, %eax   /* the end of handler*/         ;\
+       mov     _C_LABEL(lapic_eoi_addr), %eax  /* the end of handler*/ ;\
        movl    $0, (%eax)                                              ;
 
 /*===========================================================================*/
@@ -149,28 +117,26 @@ _apic_hwint15:
                                                                        \
        SAVE_PROCESS_CTX(0)                                             ;\
        push    %ebp                                                    ;\
-       call    _context_stop                                           ;\
+       call    _C_LABEL(context_stop)                                  ;\
        add     $4, %esp                                                ;\
        movl    $0, %ebp                /* for stack trace */           ;\
        LAPIC_INTR_HANDLER(func)                                        ;\
-       jmp     _switch_to_user                                         ;\
+       jmp     _C_LABEL(switch_to_user)                                ;\
        \
 0:     \
        pusha                                                           ;\
-       call    _context_stop_idle                                      ;\
+       call    _C_LABEL(context_stop_idle)                             ;\
        LAPIC_INTR_HANDLER(func)                                        ;\
        CLEAR_IF(10*4(%esp))                                            ;\
        popa                                                            ;\
        iret                                                            ;
 
 /* apic timer tick handlers */
-.globl _lapic_bsp_timer_int_handler
-_lapic_bsp_timer_int_handler:
-       lapic_intr(_bsp_timer_int_handler)
+ENTRY(lapic_bsp_timer_int_handler)
+       lapic_intr(_C_LABEL(bsp_timer_int_handler))
 
-.globl _lapic_ap_timer_int_handler
-_lapic_ap_timer_int_handler:
-       lapic_intr(_ap_timer_int_handler)
+ENTRY(lapic_ap_timer_int_handler)
+       lapic_intr(_C_LABEL(ap_timer_int_handler))
 
 #ifdef CONFIG_APIC_DEBUG
 
@@ -183,275 +149,271 @@ lapic_intr_dummy_handler_msg:
 #define lapic_intr_dummy_handler(vect)                 \
        pushl   $vect;                                  \
        push    $lapic_intr_dummy_handler_msg;          \
-       call    _printf;                                \
+       call    _C_LABEL(printf);                       \
 1:     jmp     1b; /* never return */
 
 #define LAPIC_INTR_DUMMY_HANDLER(vect)                 \
        .balign LAPIC_INTR_DUMMY_HANDLER_SIZE;          \
        lapic_intr_dummy_handler_##vect: lapic_intr_dummy_handler(vect)
 
-.globl _lapic_intr_dummy_handles_start
-_lapic_intr_dummy_handles_start:
-
-LAPIC_INTR_DUMMY_HANDLER(0)
-LAPIC_INTR_DUMMY_HANDLER(1)
-LAPIC_INTR_DUMMY_HANDLER(2)
-LAPIC_INTR_DUMMY_HANDLER(3)
-LAPIC_INTR_DUMMY_HANDLER(4)
-LAPIC_INTR_DUMMY_HANDLER(5)
-LAPIC_INTR_DUMMY_HANDLER(6)
-LAPIC_INTR_DUMMY_HANDLER(7)
-LAPIC_INTR_DUMMY_HANDLER(8)
-LAPIC_INTR_DUMMY_HANDLER(9)
-LAPIC_INTR_DUMMY_HANDLER(10)
-LAPIC_INTR_DUMMY_HANDLER(11)
-LAPIC_INTR_DUMMY_HANDLER(12)
-LAPIC_INTR_DUMMY_HANDLER(13)
-LAPIC_INTR_DUMMY_HANDLER(14)
-LAPIC_INTR_DUMMY_HANDLER(15)
-LAPIC_INTR_DUMMY_HANDLER(16)
-LAPIC_INTR_DUMMY_HANDLER(17)
-LAPIC_INTR_DUMMY_HANDLER(18)
-LAPIC_INTR_DUMMY_HANDLER(19)
-LAPIC_INTR_DUMMY_HANDLER(20)
-LAPIC_INTR_DUMMY_HANDLER(21)
-LAPIC_INTR_DUMMY_HANDLER(22)
-LAPIC_INTR_DUMMY_HANDLER(23)
-LAPIC_INTR_DUMMY_HANDLER(24)
-LAPIC_INTR_DUMMY_HANDLER(25)
-LAPIC_INTR_DUMMY_HANDLER(26)
-LAPIC_INTR_DUMMY_HANDLER(27)
-LAPIC_INTR_DUMMY_HANDLER(28)
-LAPIC_INTR_DUMMY_HANDLER(29)
-LAPIC_INTR_DUMMY_HANDLER(30)
-LAPIC_INTR_DUMMY_HANDLER(31)
-LAPIC_INTR_DUMMY_HANDLER(32)
-LAPIC_INTR_DUMMY_HANDLER(33)
-LAPIC_INTR_DUMMY_HANDLER(34)
-LAPIC_INTR_DUMMY_HANDLER(35)
-LAPIC_INTR_DUMMY_HANDLER(36)
-LAPIC_INTR_DUMMY_HANDLER(37)
-LAPIC_INTR_DUMMY_HANDLER(38)
-LAPIC_INTR_DUMMY_HANDLER(39)
-LAPIC_INTR_DUMMY_HANDLER(40)
-LAPIC_INTR_DUMMY_HANDLER(41)
-LAPIC_INTR_DUMMY_HANDLER(42)
-LAPIC_INTR_DUMMY_HANDLER(43)
-LAPIC_INTR_DUMMY_HANDLER(44)
-LAPIC_INTR_DUMMY_HANDLER(45)
-LAPIC_INTR_DUMMY_HANDLER(46)
-LAPIC_INTR_DUMMY_HANDLER(47)
-LAPIC_INTR_DUMMY_HANDLER(48)
-LAPIC_INTR_DUMMY_HANDLER(49)
-LAPIC_INTR_DUMMY_HANDLER(50)
-LAPIC_INTR_DUMMY_HANDLER(51)
-LAPIC_INTR_DUMMY_HANDLER(52)
-LAPIC_INTR_DUMMY_HANDLER(53)
-LAPIC_INTR_DUMMY_HANDLER(54)
-LAPIC_INTR_DUMMY_HANDLER(55)
-LAPIC_INTR_DUMMY_HANDLER(56)
-LAPIC_INTR_DUMMY_HANDLER(57)
-LAPIC_INTR_DUMMY_HANDLER(58)
-LAPIC_INTR_DUMMY_HANDLER(59)
-LAPIC_INTR_DUMMY_HANDLER(60)
-LAPIC_INTR_DUMMY_HANDLER(61)
-LAPIC_INTR_DUMMY_HANDLER(62)
-LAPIC_INTR_DUMMY_HANDLER(63)
-LAPIC_INTR_DUMMY_HANDLER(64)
-LAPIC_INTR_DUMMY_HANDLER(65)
-LAPIC_INTR_DUMMY_HANDLER(66)
-LAPIC_INTR_DUMMY_HANDLER(67)
-LAPIC_INTR_DUMMY_HANDLER(68)
-LAPIC_INTR_DUMMY_HANDLER(69)
-LAPIC_INTR_DUMMY_HANDLER(70)
-LAPIC_INTR_DUMMY_HANDLER(71)
-LAPIC_INTR_DUMMY_HANDLER(72)
-LAPIC_INTR_DUMMY_HANDLER(73)
-LAPIC_INTR_DUMMY_HANDLER(74)
-LAPIC_INTR_DUMMY_HANDLER(75)
-LAPIC_INTR_DUMMY_HANDLER(76)
-LAPIC_INTR_DUMMY_HANDLER(77)
-LAPIC_INTR_DUMMY_HANDLER(78)
-LAPIC_INTR_DUMMY_HANDLER(79)
-LAPIC_INTR_DUMMY_HANDLER(80)
-LAPIC_INTR_DUMMY_HANDLER(81)
-LAPIC_INTR_DUMMY_HANDLER(82)
-LAPIC_INTR_DUMMY_HANDLER(83)
-LAPIC_INTR_DUMMY_HANDLER(84)
-LAPIC_INTR_DUMMY_HANDLER(85)
-LAPIC_INTR_DUMMY_HANDLER(86)
-LAPIC_INTR_DUMMY_HANDLER(87)
-LAPIC_INTR_DUMMY_HANDLER(88)
-LAPIC_INTR_DUMMY_HANDLER(89)
-LAPIC_INTR_DUMMY_HANDLER(90)
-LAPIC_INTR_DUMMY_HANDLER(91)
-LAPIC_INTR_DUMMY_HANDLER(92)
-LAPIC_INTR_DUMMY_HANDLER(93)
-LAPIC_INTR_DUMMY_HANDLER(94)
-LAPIC_INTR_DUMMY_HANDLER(95)
-LAPIC_INTR_DUMMY_HANDLER(96)
-LAPIC_INTR_DUMMY_HANDLER(97)
-LAPIC_INTR_DUMMY_HANDLER(98)
-LAPIC_INTR_DUMMY_HANDLER(99)
-LAPIC_INTR_DUMMY_HANDLER(100)
-LAPIC_INTR_DUMMY_HANDLER(101)
-LAPIC_INTR_DUMMY_HANDLER(102)
-LAPIC_INTR_DUMMY_HANDLER(103)
-LAPIC_INTR_DUMMY_HANDLER(104)
-LAPIC_INTR_DUMMY_HANDLER(105)
-LAPIC_INTR_DUMMY_HANDLER(106)
-LAPIC_INTR_DUMMY_HANDLER(107)
-LAPIC_INTR_DUMMY_HANDLER(108)
-LAPIC_INTR_DUMMY_HANDLER(109)
-LAPIC_INTR_DUMMY_HANDLER(110)
-LAPIC_INTR_DUMMY_HANDLER(111)
-LAPIC_INTR_DUMMY_HANDLER(112)
-LAPIC_INTR_DUMMY_HANDLER(113)
-LAPIC_INTR_DUMMY_HANDLER(114)
-LAPIC_INTR_DUMMY_HANDLER(115)
-LAPIC_INTR_DUMMY_HANDLER(116)
-LAPIC_INTR_DUMMY_HANDLER(117)
-LAPIC_INTR_DUMMY_HANDLER(118)
-LAPIC_INTR_DUMMY_HANDLER(119)
-LAPIC_INTR_DUMMY_HANDLER(120)
-LAPIC_INTR_DUMMY_HANDLER(121)
-LAPIC_INTR_DUMMY_HANDLER(122)
-LAPIC_INTR_DUMMY_HANDLER(123)
-LAPIC_INTR_DUMMY_HANDLER(124)
-LAPIC_INTR_DUMMY_HANDLER(125)
-LAPIC_INTR_DUMMY_HANDLER(126)
-LAPIC_INTR_DUMMY_HANDLER(127)
-LAPIC_INTR_DUMMY_HANDLER(128)
-LAPIC_INTR_DUMMY_HANDLER(129)
-LAPIC_INTR_DUMMY_HANDLER(130)
-LAPIC_INTR_DUMMY_HANDLER(131)
-LAPIC_INTR_DUMMY_HANDLER(132)
-LAPIC_INTR_DUMMY_HANDLER(133)
-LAPIC_INTR_DUMMY_HANDLER(134)
-LAPIC_INTR_DUMMY_HANDLER(135)
-LAPIC_INTR_DUMMY_HANDLER(136)
-LAPIC_INTR_DUMMY_HANDLER(137)
-LAPIC_INTR_DUMMY_HANDLER(138)
-LAPIC_INTR_DUMMY_HANDLER(139)
-LAPIC_INTR_DUMMY_HANDLER(140)
-LAPIC_INTR_DUMMY_HANDLER(141)
-LAPIC_INTR_DUMMY_HANDLER(142)
-LAPIC_INTR_DUMMY_HANDLER(143)
-LAPIC_INTR_DUMMY_HANDLER(144)
-LAPIC_INTR_DUMMY_HANDLER(145)
-LAPIC_INTR_DUMMY_HANDLER(146)
-LAPIC_INTR_DUMMY_HANDLER(147)
-LAPIC_INTR_DUMMY_HANDLER(148)
-LAPIC_INTR_DUMMY_HANDLER(149)
-LAPIC_INTR_DUMMY_HANDLER(150)
-LAPIC_INTR_DUMMY_HANDLER(151)
-LAPIC_INTR_DUMMY_HANDLER(152)
-LAPIC_INTR_DUMMY_HANDLER(153)
-LAPIC_INTR_DUMMY_HANDLER(154)
-LAPIC_INTR_DUMMY_HANDLER(155)
-LAPIC_INTR_DUMMY_HANDLER(156)
-LAPIC_INTR_DUMMY_HANDLER(157)
-LAPIC_INTR_DUMMY_HANDLER(158)
-LAPIC_INTR_DUMMY_HANDLER(159)
-LAPIC_INTR_DUMMY_HANDLER(160)
-LAPIC_INTR_DUMMY_HANDLER(161)
-LAPIC_INTR_DUMMY_HANDLER(162)
-LAPIC_INTR_DUMMY_HANDLER(163)
-LAPIC_INTR_DUMMY_HANDLER(164)
-LAPIC_INTR_DUMMY_HANDLER(165)
-LAPIC_INTR_DUMMY_HANDLER(166)
-LAPIC_INTR_DUMMY_HANDLER(167)
-LAPIC_INTR_DUMMY_HANDLER(168)
-LAPIC_INTR_DUMMY_HANDLER(169)
-LAPIC_INTR_DUMMY_HANDLER(170)
-LAPIC_INTR_DUMMY_HANDLER(171)
-LAPIC_INTR_DUMMY_HANDLER(172)
-LAPIC_INTR_DUMMY_HANDLER(173)
-LAPIC_INTR_DUMMY_HANDLER(174)
-LAPIC_INTR_DUMMY_HANDLER(175)
-LAPIC_INTR_DUMMY_HANDLER(176)
-LAPIC_INTR_DUMMY_HANDLER(177)
-LAPIC_INTR_DUMMY_HANDLER(178)
-LAPIC_INTR_DUMMY_HANDLER(179)
-LAPIC_INTR_DUMMY_HANDLER(180)
-LAPIC_INTR_DUMMY_HANDLER(181)
-LAPIC_INTR_DUMMY_HANDLER(182)
-LAPIC_INTR_DUMMY_HANDLER(183)
-LAPIC_INTR_DUMMY_HANDLER(184)
-LAPIC_INTR_DUMMY_HANDLER(185)
-LAPIC_INTR_DUMMY_HANDLER(186)
-LAPIC_INTR_DUMMY_HANDLER(187)
-LAPIC_INTR_DUMMY_HANDLER(188)
-LAPIC_INTR_DUMMY_HANDLER(189)
-LAPIC_INTR_DUMMY_HANDLER(190)
-LAPIC_INTR_DUMMY_HANDLER(191)
-LAPIC_INTR_DUMMY_HANDLER(192)
-LAPIC_INTR_DUMMY_HANDLER(193)
-LAPIC_INTR_DUMMY_HANDLER(194)
-LAPIC_INTR_DUMMY_HANDLER(195)
-LAPIC_INTR_DUMMY_HANDLER(196)
-LAPIC_INTR_DUMMY_HANDLER(197)
-LAPIC_INTR_DUMMY_HANDLER(198)
-LAPIC_INTR_DUMMY_HANDLER(199)
-LAPIC_INTR_DUMMY_HANDLER(200)
-LAPIC_INTR_DUMMY_HANDLER(201)
-LAPIC_INTR_DUMMY_HANDLER(202)
-LAPIC_INTR_DUMMY_HANDLER(203)
-LAPIC_INTR_DUMMY_HANDLER(204)
-LAPIC_INTR_DUMMY_HANDLER(205)
-LAPIC_INTR_DUMMY_HANDLER(206)
-LAPIC_INTR_DUMMY_HANDLER(207)
-LAPIC_INTR_DUMMY_HANDLER(208)
-LAPIC_INTR_DUMMY_HANDLER(209)
-LAPIC_INTR_DUMMY_HANDLER(210)
-LAPIC_INTR_DUMMY_HANDLER(211)
-LAPIC_INTR_DUMMY_HANDLER(212)
-LAPIC_INTR_DUMMY_HANDLER(213)
-LAPIC_INTR_DUMMY_HANDLER(214)
-LAPIC_INTR_DUMMY_HANDLER(215)
-LAPIC_INTR_DUMMY_HANDLER(216)
-LAPIC_INTR_DUMMY_HANDLER(217)
-LAPIC_INTR_DUMMY_HANDLER(218)
-LAPIC_INTR_DUMMY_HANDLER(219)
-LAPIC_INTR_DUMMY_HANDLER(220)
-LAPIC_INTR_DUMMY_HANDLER(221)
-LAPIC_INTR_DUMMY_HANDLER(222)
-LAPIC_INTR_DUMMY_HANDLER(223)
-LAPIC_INTR_DUMMY_HANDLER(224)
-LAPIC_INTR_DUMMY_HANDLER(225)
-LAPIC_INTR_DUMMY_HANDLER(226)
-LAPIC_INTR_DUMMY_HANDLER(227)
-LAPIC_INTR_DUMMY_HANDLER(228)
-LAPIC_INTR_DUMMY_HANDLER(229)
-LAPIC_INTR_DUMMY_HANDLER(230)
-LAPIC_INTR_DUMMY_HANDLER(231)
-LAPIC_INTR_DUMMY_HANDLER(232)
-LAPIC_INTR_DUMMY_HANDLER(233)
-LAPIC_INTR_DUMMY_HANDLER(234)
-LAPIC_INTR_DUMMY_HANDLER(235)
-LAPIC_INTR_DUMMY_HANDLER(236)
-LAPIC_INTR_DUMMY_HANDLER(237)
-LAPIC_INTR_DUMMY_HANDLER(238)
-LAPIC_INTR_DUMMY_HANDLER(239)
-LAPIC_INTR_DUMMY_HANDLER(240)
-LAPIC_INTR_DUMMY_HANDLER(241)
-LAPIC_INTR_DUMMY_HANDLER(242)
-LAPIC_INTR_DUMMY_HANDLER(243)
-LAPIC_INTR_DUMMY_HANDLER(244)
-LAPIC_INTR_DUMMY_HANDLER(245)
-LAPIC_INTR_DUMMY_HANDLER(246)
-LAPIC_INTR_DUMMY_HANDLER(247)
-LAPIC_INTR_DUMMY_HANDLER(248)
-LAPIC_INTR_DUMMY_HANDLER(249)
-LAPIC_INTR_DUMMY_HANDLER(250)
-LAPIC_INTR_DUMMY_HANDLER(251)
-LAPIC_INTR_DUMMY_HANDLER(252)
-LAPIC_INTR_DUMMY_HANDLER(253)
-LAPIC_INTR_DUMMY_HANDLER(254)
-LAPIC_INTR_DUMMY_HANDLER(255)
-
-.globl _lapic_intr_dummy_handles_end
-_lapic_intr_dummy_handles_end:
+LABEL(lapic_intr_dummy_handles_start)
+       LAPIC_INTR_DUMMY_HANDLER(0)
+       LAPIC_INTR_DUMMY_HANDLER(1)
+       LAPIC_INTR_DUMMY_HANDLER(2)
+       LAPIC_INTR_DUMMY_HANDLER(3)
+       LAPIC_INTR_DUMMY_HANDLER(4)
+       LAPIC_INTR_DUMMY_HANDLER(5)
+       LAPIC_INTR_DUMMY_HANDLER(6)
+       LAPIC_INTR_DUMMY_HANDLER(7)
+       LAPIC_INTR_DUMMY_HANDLER(8)
+       LAPIC_INTR_DUMMY_HANDLER(9)
+       LAPIC_INTR_DUMMY_HANDLER(10)
+       LAPIC_INTR_DUMMY_HANDLER(11)
+       LAPIC_INTR_DUMMY_HANDLER(12)
+       LAPIC_INTR_DUMMY_HANDLER(13)
+       LAPIC_INTR_DUMMY_HANDLER(14)
+       LAPIC_INTR_DUMMY_HANDLER(15)
+       LAPIC_INTR_DUMMY_HANDLER(16)
+       LAPIC_INTR_DUMMY_HANDLER(17)
+       LAPIC_INTR_DUMMY_HANDLER(18)
+       LAPIC_INTR_DUMMY_HANDLER(19)
+       LAPIC_INTR_DUMMY_HANDLER(20)
+       LAPIC_INTR_DUMMY_HANDLER(21)
+       LAPIC_INTR_DUMMY_HANDLER(22)
+       LAPIC_INTR_DUMMY_HANDLER(23)
+       LAPIC_INTR_DUMMY_HANDLER(24)
+       LAPIC_INTR_DUMMY_HANDLER(25)
+       LAPIC_INTR_DUMMY_HANDLER(26)
+       LAPIC_INTR_DUMMY_HANDLER(27)
+       LAPIC_INTR_DUMMY_HANDLER(28)
+       LAPIC_INTR_DUMMY_HANDLER(29)
+       LAPIC_INTR_DUMMY_HANDLER(30)
+       LAPIC_INTR_DUMMY_HANDLER(31)
+       LAPIC_INTR_DUMMY_HANDLER(32)
+       LAPIC_INTR_DUMMY_HANDLER(33)
+       LAPIC_INTR_DUMMY_HANDLER(34)
+       LAPIC_INTR_DUMMY_HANDLER(35)
+       LAPIC_INTR_DUMMY_HANDLER(36)
+       LAPIC_INTR_DUMMY_HANDLER(37)
+       LAPIC_INTR_DUMMY_HANDLER(38)
+       LAPIC_INTR_DUMMY_HANDLER(39)
+       LAPIC_INTR_DUMMY_HANDLER(40)
+       LAPIC_INTR_DUMMY_HANDLER(41)
+       LAPIC_INTR_DUMMY_HANDLER(42)
+       LAPIC_INTR_DUMMY_HANDLER(43)
+       LAPIC_INTR_DUMMY_HANDLER(44)
+       LAPIC_INTR_DUMMY_HANDLER(45)
+       LAPIC_INTR_DUMMY_HANDLER(46)
+       LAPIC_INTR_DUMMY_HANDLER(47)
+       LAPIC_INTR_DUMMY_HANDLER(48)
+       LAPIC_INTR_DUMMY_HANDLER(49)
+       LAPIC_INTR_DUMMY_HANDLER(50)
+       LAPIC_INTR_DUMMY_HANDLER(51)
+       LAPIC_INTR_DUMMY_HANDLER(52)
+       LAPIC_INTR_DUMMY_HANDLER(53)
+       LAPIC_INTR_DUMMY_HANDLER(54)
+       LAPIC_INTR_DUMMY_HANDLER(55)
+       LAPIC_INTR_DUMMY_HANDLER(56)
+       LAPIC_INTR_DUMMY_HANDLER(57)
+       LAPIC_INTR_DUMMY_HANDLER(58)
+       LAPIC_INTR_DUMMY_HANDLER(59)
+       LAPIC_INTR_DUMMY_HANDLER(60)
+       LAPIC_INTR_DUMMY_HANDLER(61)
+       LAPIC_INTR_DUMMY_HANDLER(62)
+       LAPIC_INTR_DUMMY_HANDLER(63)
+       LAPIC_INTR_DUMMY_HANDLER(64)
+       LAPIC_INTR_DUMMY_HANDLER(65)
+       LAPIC_INTR_DUMMY_HANDLER(66)
+       LAPIC_INTR_DUMMY_HANDLER(67)
+       LAPIC_INTR_DUMMY_HANDLER(68)
+       LAPIC_INTR_DUMMY_HANDLER(69)
+       LAPIC_INTR_DUMMY_HANDLER(70)
+       LAPIC_INTR_DUMMY_HANDLER(71)
+       LAPIC_INTR_DUMMY_HANDLER(72)
+       LAPIC_INTR_DUMMY_HANDLER(73)
+       LAPIC_INTR_DUMMY_HANDLER(74)
+       LAPIC_INTR_DUMMY_HANDLER(75)
+       LAPIC_INTR_DUMMY_HANDLER(76)
+       LAPIC_INTR_DUMMY_HANDLER(77)
+       LAPIC_INTR_DUMMY_HANDLER(78)
+       LAPIC_INTR_DUMMY_HANDLER(79)
+       LAPIC_INTR_DUMMY_HANDLER(80)
+       LAPIC_INTR_DUMMY_HANDLER(81)
+       LAPIC_INTR_DUMMY_HANDLER(82)
+       LAPIC_INTR_DUMMY_HANDLER(83)
+       LAPIC_INTR_DUMMY_HANDLER(84)
+       LAPIC_INTR_DUMMY_HANDLER(85)
+       LAPIC_INTR_DUMMY_HANDLER(86)
+       LAPIC_INTR_DUMMY_HANDLER(87)
+       LAPIC_INTR_DUMMY_HANDLER(88)
+       LAPIC_INTR_DUMMY_HANDLER(89)
+       LAPIC_INTR_DUMMY_HANDLER(90)
+       LAPIC_INTR_DUMMY_HANDLER(91)
+       LAPIC_INTR_DUMMY_HANDLER(92)
+       LAPIC_INTR_DUMMY_HANDLER(93)
+       LAPIC_INTR_DUMMY_HANDLER(94)
+       LAPIC_INTR_DUMMY_HANDLER(95)
+       LAPIC_INTR_DUMMY_HANDLER(96)
+       LAPIC_INTR_DUMMY_HANDLER(97)
+       LAPIC_INTR_DUMMY_HANDLER(98)
+       LAPIC_INTR_DUMMY_HANDLER(99)
+       LAPIC_INTR_DUMMY_HANDLER(100)
+       LAPIC_INTR_DUMMY_HANDLER(101)
+       LAPIC_INTR_DUMMY_HANDLER(102)
+       LAPIC_INTR_DUMMY_HANDLER(103)
+       LAPIC_INTR_DUMMY_HANDLER(104)
+       LAPIC_INTR_DUMMY_HANDLER(105)
+       LAPIC_INTR_DUMMY_HANDLER(106)
+       LAPIC_INTR_DUMMY_HANDLER(107)
+       LAPIC_INTR_DUMMY_HANDLER(108)
+       LAPIC_INTR_DUMMY_HANDLER(109)
+       LAPIC_INTR_DUMMY_HANDLER(110)
+       LAPIC_INTR_DUMMY_HANDLER(111)
+       LAPIC_INTR_DUMMY_HANDLER(112)
+       LAPIC_INTR_DUMMY_HANDLER(113)
+       LAPIC_INTR_DUMMY_HANDLER(114)
+       LAPIC_INTR_DUMMY_HANDLER(115)
+       LAPIC_INTR_DUMMY_HANDLER(116)
+       LAPIC_INTR_DUMMY_HANDLER(117)
+       LAPIC_INTR_DUMMY_HANDLER(118)
+       LAPIC_INTR_DUMMY_HANDLER(119)
+       LAPIC_INTR_DUMMY_HANDLER(120)
+       LAPIC_INTR_DUMMY_HANDLER(121)
+       LAPIC_INTR_DUMMY_HANDLER(122)
+       LAPIC_INTR_DUMMY_HANDLER(123)
+       LAPIC_INTR_DUMMY_HANDLER(124)
+       LAPIC_INTR_DUMMY_HANDLER(125)
+       LAPIC_INTR_DUMMY_HANDLER(126)
+       LAPIC_INTR_DUMMY_HANDLER(127)
+       LAPIC_INTR_DUMMY_HANDLER(128)
+       LAPIC_INTR_DUMMY_HANDLER(129)
+       LAPIC_INTR_DUMMY_HANDLER(130)
+       LAPIC_INTR_DUMMY_HANDLER(131)
+       LAPIC_INTR_DUMMY_HANDLER(132)
+       LAPIC_INTR_DUMMY_HANDLER(133)
+       LAPIC_INTR_DUMMY_HANDLER(134)
+       LAPIC_INTR_DUMMY_HANDLER(135)
+       LAPIC_INTR_DUMMY_HANDLER(136)
+       LAPIC_INTR_DUMMY_HANDLER(137)
+       LAPIC_INTR_DUMMY_HANDLER(138)
+       LAPIC_INTR_DUMMY_HANDLER(139)
+       LAPIC_INTR_DUMMY_HANDLER(140)
+       LAPIC_INTR_DUMMY_HANDLER(141)
+       LAPIC_INTR_DUMMY_HANDLER(142)
+       LAPIC_INTR_DUMMY_HANDLER(143)
+       LAPIC_INTR_DUMMY_HANDLER(144)
+       LAPIC_INTR_DUMMY_HANDLER(145)
+       LAPIC_INTR_DUMMY_HANDLER(146)
+       LAPIC_INTR_DUMMY_HANDLER(147)
+       LAPIC_INTR_DUMMY_HANDLER(148)
+       LAPIC_INTR_DUMMY_HANDLER(149)
+       LAPIC_INTR_DUMMY_HANDLER(150)
+       LAPIC_INTR_DUMMY_HANDLER(151)
+       LAPIC_INTR_DUMMY_HANDLER(152)
+       LAPIC_INTR_DUMMY_HANDLER(153)
+       LAPIC_INTR_DUMMY_HANDLER(154)
+       LAPIC_INTR_DUMMY_HANDLER(155)
+       LAPIC_INTR_DUMMY_HANDLER(156)
+       LAPIC_INTR_DUMMY_HANDLER(157)
+       LAPIC_INTR_DUMMY_HANDLER(158)
+       LAPIC_INTR_DUMMY_HANDLER(159)
+       LAPIC_INTR_DUMMY_HANDLER(160)
+       LAPIC_INTR_DUMMY_HANDLER(161)
+       LAPIC_INTR_DUMMY_HANDLER(162)
+       LAPIC_INTR_DUMMY_HANDLER(163)
+       LAPIC_INTR_DUMMY_HANDLER(164)
+       LAPIC_INTR_DUMMY_HANDLER(165)
+       LAPIC_INTR_DUMMY_HANDLER(166)
+       LAPIC_INTR_DUMMY_HANDLER(167)
+       LAPIC_INTR_DUMMY_HANDLER(168)
+       LAPIC_INTR_DUMMY_HANDLER(169)
+       LAPIC_INTR_DUMMY_HANDLER(170)
+       LAPIC_INTR_DUMMY_HANDLER(171)
+       LAPIC_INTR_DUMMY_HANDLER(172)
+       LAPIC_INTR_DUMMY_HANDLER(173)
+       LAPIC_INTR_DUMMY_HANDLER(174)
+       LAPIC_INTR_DUMMY_HANDLER(175)
+       LAPIC_INTR_DUMMY_HANDLER(176)
+       LAPIC_INTR_DUMMY_HANDLER(177)
+       LAPIC_INTR_DUMMY_HANDLER(178)
+       LAPIC_INTR_DUMMY_HANDLER(179)
+       LAPIC_INTR_DUMMY_HANDLER(180)
+       LAPIC_INTR_DUMMY_HANDLER(181)
+       LAPIC_INTR_DUMMY_HANDLER(182)
+       LAPIC_INTR_DUMMY_HANDLER(183)
+       LAPIC_INTR_DUMMY_HANDLER(184)
+       LAPIC_INTR_DUMMY_HANDLER(185)
+       LAPIC_INTR_DUMMY_HANDLER(186)
+       LAPIC_INTR_DUMMY_HANDLER(187)
+       LAPIC_INTR_DUMMY_HANDLER(188)
+       LAPIC_INTR_DUMMY_HANDLER(189)
+       LAPIC_INTR_DUMMY_HANDLER(190)
+       LAPIC_INTR_DUMMY_HANDLER(191)
+       LAPIC_INTR_DUMMY_HANDLER(192)
+       LAPIC_INTR_DUMMY_HANDLER(193)
+       LAPIC_INTR_DUMMY_HANDLER(194)
+       LAPIC_INTR_DUMMY_HANDLER(195)
+       LAPIC_INTR_DUMMY_HANDLER(196)
+       LAPIC_INTR_DUMMY_HANDLER(197)
+       LAPIC_INTR_DUMMY_HANDLER(198)
+       LAPIC_INTR_DUMMY_HANDLER(199)
+       LAPIC_INTR_DUMMY_HANDLER(200)
+       LAPIC_INTR_DUMMY_HANDLER(201)
+       LAPIC_INTR_DUMMY_HANDLER(202)
+       LAPIC_INTR_DUMMY_HANDLER(203)
+       LAPIC_INTR_DUMMY_HANDLER(204)
+       LAPIC_INTR_DUMMY_HANDLER(205)
+       LAPIC_INTR_DUMMY_HANDLER(206)
+       LAPIC_INTR_DUMMY_HANDLER(207)
+       LAPIC_INTR_DUMMY_HANDLER(208)
+       LAPIC_INTR_DUMMY_HANDLER(209)
+       LAPIC_INTR_DUMMY_HANDLER(210)
+       LAPIC_INTR_DUMMY_HANDLER(211)
+       LAPIC_INTR_DUMMY_HANDLER(212)
+       LAPIC_INTR_DUMMY_HANDLER(213)
+       LAPIC_INTR_DUMMY_HANDLER(214)
+       LAPIC_INTR_DUMMY_HANDLER(215)
+       LAPIC_INTR_DUMMY_HANDLER(216)
+       LAPIC_INTR_DUMMY_HANDLER(217)
+       LAPIC_INTR_DUMMY_HANDLER(218)
+       LAPIC_INTR_DUMMY_HANDLER(219)
+       LAPIC_INTR_DUMMY_HANDLER(220)
+       LAPIC_INTR_DUMMY_HANDLER(221)
+       LAPIC_INTR_DUMMY_HANDLER(222)
+       LAPIC_INTR_DUMMY_HANDLER(223)
+       LAPIC_INTR_DUMMY_HANDLER(224)
+       LAPIC_INTR_DUMMY_HANDLER(225)
+       LAPIC_INTR_DUMMY_HANDLER(226)
+       LAPIC_INTR_DUMMY_HANDLER(227)
+       LAPIC_INTR_DUMMY_HANDLER(228)
+       LAPIC_INTR_DUMMY_HANDLER(229)
+       LAPIC_INTR_DUMMY_HANDLER(230)
+       LAPIC_INTR_DUMMY_HANDLER(231)
+       LAPIC_INTR_DUMMY_HANDLER(232)
+       LAPIC_INTR_DUMMY_HANDLER(233)
+       LAPIC_INTR_DUMMY_HANDLER(234)
+       LAPIC_INTR_DUMMY_HANDLER(235)
+       LAPIC_INTR_DUMMY_HANDLER(236)
+       LAPIC_INTR_DUMMY_HANDLER(237)
+       LAPIC_INTR_DUMMY_HANDLER(238)
+       LAPIC_INTR_DUMMY_HANDLER(239)
+       LAPIC_INTR_DUMMY_HANDLER(240)
+       LAPIC_INTR_DUMMY_HANDLER(241)
+       LAPIC_INTR_DUMMY_HANDLER(242)
+       LAPIC_INTR_DUMMY_HANDLER(243)
+       LAPIC_INTR_DUMMY_HANDLER(244)
+       LAPIC_INTR_DUMMY_HANDLER(245)
+       LAPIC_INTR_DUMMY_HANDLER(246)
+       LAPIC_INTR_DUMMY_HANDLER(247)
+       LAPIC_INTR_DUMMY_HANDLER(248)
+       LAPIC_INTR_DUMMY_HANDLER(249)
+       LAPIC_INTR_DUMMY_HANDLER(250)
+       LAPIC_INTR_DUMMY_HANDLER(251)
+       LAPIC_INTR_DUMMY_HANDLER(252)
+       LAPIC_INTR_DUMMY_HANDLER(253)
+       LAPIC_INTR_DUMMY_HANDLER(254)
+       LAPIC_INTR_DUMMY_HANDLER(255)
+LABEL(lapic_intr_dummy_handles_end)
 
 
 #endif /* CONFIG_APIC_DEBUG */
index 2eaf244a6b0c3a92a6c45ee853a336137128b36a..5bb6d785cbca2ca501304585001e833f4ccc5d8f 100644 (file)
@@ -1,15 +1,12 @@
-.text
+#include <machine/asm.h>
 
 #define LD_ST_REG(reg)                                                 ;\
-.globl _ld_##reg                                                       ;\
-.globl _st_##reg                                                       ;\
-                                                                       ;\
-_ld_##reg:                                                             ;\
+ENTRY(ld_##reg)                                                        ;\
        mov     4(%esp), %eax                                           ;\
        mov     %eax,   %reg                                            ;\
        ret                                                             ;\
                                                                        ;\
-_st_##reg:                                                             ;\
+ENTRY(st_##reg)                                                        ;\
        mov     %reg,   %eax                                            ;\
        ret
 
index f7e4f7a77a7888a6d977d750197f01aea11b9e9d..923dd7cb77a28a12c6c705cdea997c254700101f 100644 (file)
@@ -1,10 +1,9 @@
 /*     inb() - Input one byte                          Author: Kees J. Bot */
 /*                                                             18 Mar 1996 */
 /*     unsigned inb(U16_t port); */
+#include <machine/asm.h>
 
-.text
-.globl _inb
-_inb:
+ENTRY(inb)
        push    %ebp
        movl    %esp, %ebp
        movl    8(%ebp), %edx   /* port */
index cae064f93792e03e1ee87fe11d750990772af03d..f4e0accf87272c2751b6d694384b5ed2ad19f7f9 100644 (file)
@@ -1,10 +1,9 @@
 /*     inl() - Input one dword                         Author: Kees J. Bot */
 /*                                                             18 Mar 1996 */
 /*     unsigned inl(U16_t port); */
+#include <machine/asm.h>
 
-.text
-.globl _inl
-_inl:
+ENTRY(inl)
        push    %ebp
        movl    %esp, %ebp
        movl    8(%ebp), %edx   /* port */
index 7d210c0c8d3fbeca449735645a5e5bb78b131f7b..492d8f3016a2cf831ed19d928d89af767307cf03 100644 (file)
@@ -3,14 +3,12 @@
 /*                                                             18 Mar 1996 */
 /*     void intr_disable(void); */
 /*     void intr_enable(void); */
+#include <machine/asm.h>
 
-.text
-.globl _intr_disable
-_intr_disable:
+ENTRY(intr_disable)
        cli
        ret
 
-.globl _intr_enable
-_intr_enable:
+ENTRY(intr_enable)
        sti
        ret
index 8bfdc1fa739f539767aaa4f25e3293fc5826215b..e22ef8826490575a391a1c1e2678574a32cf4211 100644 (file)
@@ -1,10 +1,9 @@
 /*     inw() - Input one word                          Author: Kees J. Bot */
 /*                                                             18 Mar 1996 */
 /*     unsigned inw(U16_t port); */
+#include <machine/asm.h>
 
-.text
-.globl _inw
-_inw:
+ENTRY(inw)
        push    %ebp
        movl    %esp, %ebp
        movl    8(%ebp), %edx   /* port */
index 302868ad434e8c598f2c43f359c87a119be143b5..7c0bf8d15752e9d61c4decf15a424244eec1a5b9 100644 (file)
@@ -1,10 +1,9 @@
 /*     outb() - Output one byte                        Author: Kees J. Bot */
 /*                                                             18 Mar 1996 */
 /*     void outb(U16_t port, U8_t value); */
+#include <machine/asm.h>
 
-.text
-.globl _outb
-_outb:
+ENTRY(outb)
        push    %ebp
        movl    %esp, %ebp
        movl    8(%ebp), %edx   /* port */
index 0b67fa1cbc1d06de28019a42c0b06130e282d693..7ba581be6b1e5e3a624acc8d3185225e94f3dfa3 100644 (file)
@@ -1,10 +1,9 @@
 /*     outl() - Output one dword                       Author: Kees J. Bot */
 /*                                                             18 Mar 1996 */
 /*     void outl(U16_t port, u32_t value); */
+#include <machine/asm.h>
 
-.text
-.globl _outl
-_outl:
+ENTRY(outl)
        push    %ebp
        movl    %esp, %ebp
        movl    8(%ebp), %edx   /* port */
index 165c3cabbb739176b9fcc2f8802eb3c3893b8a2d..57c45433e001fc89accee251d6e8c1e17b84d9e9 100644 (file)
@@ -1,10 +1,9 @@
 /*     outw() - Output one word                        Author: Kees J. Bot */
 /*                                                             18 Mar 1996 */
 /*     void outw(U16_t port, U16_t value); */
+#include <machine/asm.h>
 
-.text
-.globl _outw
-_outw:
+ENTRY(outw)
        push    %ebp
        movl    %esp, %ebp
        movl    8(%ebp), %edx   /* port */
index a1cfc4267e665ec4bc96d59cf07d9fc866e7e4ac..467fd518aec8b1149f42341782135dfa65f9bfbd 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <minix/config.h>
 #include <minix/const.h>
+#include <machine/asm.h>
 #include <machine/interrupt.h>
 #include <i386/vm.h>
 #include "archconst.h"
 
 /*
  * This file contains a number of assembly code utility routines needed by the
- * kernel.  They are:
+ * kernel.
  */
 
-.globl _monitor/* exit Minix and return to the monitor */
-.globl _int86  /* let the monitor make an 8086 interrupt call */
-#ifdef __ACK__
-.globl _exit   /* dummy for library routines */
-.globl __exit  /* dummy for library routines */
-.globl ___exit /* dummy for library routines */
-#endif
-.globl ___main /* dummy for GCC */
-.globl _phys_insw      /* transfer data from (disk controller) port to memory */
-.globl _phys_insb      /* likewise byte by byte */
-.globl _phys_outsw     /* transfer data from memory to (disk controller) port */
-.globl _phys_outsb     /* likewise byte by byte */
-.globl _phys_copy      /* copy data from anywhere to anywhere in memory */
-.globl _phys_copy_fault        /* phys_copy pagefault */
-.globl _phys_copy_fault_in_kernel /* phys_copy pagefault in kernel */
-.globl _phys_memset    /* write pattern anywhere in memory */
-.globl _mem_rdw        /* copy one word from [segment:offset] */
-.globl _reset  /* reset the system */
-.globl _halt_cpu/* halts the current cpu when idle */
-.globl _read_cpu_flags /* read the cpu flags */
-.globl _read_cr0       /* read cr0 */
-.globl _read_cr2       /* read cr2 */
-.globl _getcr3val
-.globl _write_cr0      /* write a value in cr0 */
-.globl _read_cr3
-.globl _write_cr3
-.globl _read_cr4
-.globl _write_cr4
-
-.globl _catch_pagefaults
-.globl _read_ds
-.globl  _read_cs
-.globl _read_ss
-.globl _idt_reload     /* reload idt when returning to monitor. */
-
-.globl _fninit                 /* non-waiting FPU initialization */
-.globl _fnstsw                 /* store status word (non-waiting) */
-.globl _fnstcw                 /* store control word (non-waiting) */
-.globl _fxsave 
-.globl _fnsave 
-.globl _fxrstor        
-.globl _frstor 
-.globl _clts   
 
 /*
  * The routines only guarantee to preserve the registers the C compiler 
  * direction bit in the flags). 
  */
 
-.text
 /*===========================================================================*/
 /*                             monitor                                      */
 /*===========================================================================*/
 /* PUBLIC void monitor(); */
-/* Return to the monitor. */
-
-_monitor:
-       movl    _mon_sp, %esp   /* restore monitor stack pointer */
+/* exit Minix and return to the monitor */
+ENTRY(monitor)
+       movl    _C_LABEL(mon_sp), %esp  /* restore monitor stack pointer */
        movw    $SS_SELECTOR, %dx       /* monitor data segment */
        mov     %dx, %ds
        mov     %dx, %es
@@ -90,12 +46,13 @@ _monitor:
 /*                             int86                                        */
 /*===========================================================================*/
 /* PUBLIC void int86(); */
-_int86:
-       cmpb    $0, _mon_return /* is the monitor there? */
+/* let the monitor make an 8086 interrupt call */
+ENTRY(int86)
+       cmpb    $0, _C_LABEL(mon_return)        /* is the monitor there? */
        jne     0f
        movb    $0x01, %ah      /* an int 13 error seems appropriate */
-       movb    %ah, _reg86+0   /* reg86.w.f = 1 (set carry flag) */
-       movb    %ah, _reg86+13  /* reg86.b.ah = 0x01 = "invalid command" */
+       movb    %ah, _C_LABEL(reg86)+0  /* reg86.w.f = 1 (set carry flag) */
+       movb    %ah, _C_LABEL(reg86)+13 /* reg86.b.ah = 0x01 = "invalid command" */
        ret
 0:
        push    %ebp    /* save C registers */
@@ -109,7 +66,7 @@ _int86:
        movb    %al, %ah
        inb     $INT_CTLMASK
        push    %eax    /* save interrupt masks */
-       movl    _irq_use, %eax  /* map of in-use IRQ's */
+       movl    _C_LABEL(irq_use), %eax /* map of in-use IRQ's */
        and     $~(1<<CLOCK_IRQ), %eax  /* keep the clock ticking */
        outb    $INT_CTLMASK    /* enable all unused IRQ's and vv. */
        movb    %ah, %al
@@ -117,17 +74,17 @@ _int86:
 
        mov     $SS_SELECTOR, %eax      /* monitor data segment */
        mov     %ax, %ss
-       xchgl   _mon_sp, %esp   /* switch stacks */
-       push    _reg86+36       /* parameters used in INT call */
-       push    _reg86+32
-       push    _reg86+28
-       push    _reg86+24
-       push    _reg86+20
-       push    _reg86+16
-       push    _reg86+12
-       push    _reg86+8
-       push    _reg86+4
-       push    _reg86+0
+       xchgl   _C_LABEL(mon_sp), %esp  /* switch stacks */
+       push    _C_LABEL(reg86)+36      /* parameters used in INT call */
+       push    _C_LABEL(reg86)+32
+       push    _C_LABEL(reg86)+28
+       push    _C_LABEL(reg86)+24
+       push    _C_LABEL(reg86)+20
+       push    _C_LABEL(reg86)+16
+       push    _C_LABEL(reg86)+12
+       push    _C_LABEL(reg86)+8
+       push    _C_LABEL(reg86)+4
+       push    _C_LABEL(reg86)+0
        mov     %ax, %ds        /* remaining data selectors */
        mov     %ax, %es
        mov     %ax, %fs
@@ -136,17 +93,17 @@ _int86:
        push    $return /* kernel return address and selector */
         ljmpw    *20+2*4+10*4+2*4(%esp)
 return:
-       pop     _reg86+0
-       pop     _reg86+4
-       pop     _reg86+8
-       pop     _reg86+12
-       pop     _reg86+16
-       pop     _reg86+20
-       pop     _reg86+24
-       pop     _reg86+28
-       pop     _reg86+32
-       pop     _reg86+36
-       lgdt    _gdt+GDT_SELECTOR       /* reload global descriptor table */
+       pop     _C_LABEL(reg86)+0
+       pop     _C_LABEL(reg86)+4
+       pop     _C_LABEL(reg86)+8
+       pop     _C_LABEL(reg86)+12
+       pop     _C_LABEL(reg86)+16
+       pop     _C_LABEL(reg86)+20
+       pop     _C_LABEL(reg86)+24
+       pop     _C_LABEL(reg86)+28
+       pop     _C_LABEL(reg86)+32
+       pop     _C_LABEL(reg86)+36
+       lgdt    _C_LABEL(gdt)+GDT_SELECTOR /* reload global descriptor table */
         ljmp    $CS_SELECTOR, $csinit
 csinit:
        mov     $DS_SELECTOR, %eax
@@ -155,8 +112,8 @@ csinit:
        mov     %ax, %fs
        mov     %ax, %gs
        mov     %ax, %ss
-       xchgl   _mon_sp, %esp   /* unswitch stacks */
-       lidt    _gdt+IDT_SELECTOR       /* reload interrupt descriptor table */
+       xchgl   _C_LABEL(mon_sp), %esp  /* unswitch stacks */
+       lidt    _C_LABEL(gdt)+IDT_SELECTOR /* reload interrupt descriptor table */
 
 #ifdef CONFIG_APIC
        cmpl    $0x0, lapic_addr
@@ -180,7 +137,7 @@ csinit:
        shl     $3, %eax
        mov     %eax, %ebx
        add     $TSS_SELECTOR, %eax
-       addl    _gdt+DESC_ACCESS, %eax
+       addl    _C_LABEL(gdt)+DESC_ACCESS, %eax
        and     $~0x02, %eax
        ltr     %bx     /* set TSS register */
 
@@ -195,7 +152,7 @@ csinit:
        outb    $INT2_CTLMASK
 
 6:
-       addl    %ecx, _lost_ticks       /* record lost clock ticks */
+       addl    %ecx, _C_LABEL(lost_ticks)      /* record lost clock ticks */
 
        popf    /* restore flags */
        pop     %ebx    /* restore C registers */
@@ -214,14 +171,14 @@ csinit:
  * GNU CC likes to call ___main from main() for nonobvious reasons. 
  */
 #ifdef __ACK__
-_exit:
-__exit:
-___exit:
+ENTRY(exit)
+ENTRY(_exit)
+ENTRY(__exit)
        sti
-       jmp     ___exit
+       jmp     _C_LABEL(__exit)
 #endif
 
-___main:
+ENTRY(__main)
        ret
 
 
@@ -232,8 +189,8 @@ ___main:
  * PUBLIC void phys_insw(Port_t port, phys_bytes buf, size_t count); 
  * Input an array from an I/O port.  Absolute address version of insw(). 
  */
-
-_phys_insw:
+/* transfer data from (disk controller) port to memory */
+ENTRY(phys_insw)
        push    %ebp
        mov     %esp, %ebp
        cld
@@ -260,8 +217,8 @@ _phys_insw:
  * PUBLIC void phys_insb(Port_t port, phys_bytes buf, size_t count); 
  * Input an array from an I/O port.  Absolute address version of insb(). 
  */
-
-_phys_insb:
+/* transfer data from (disk controller) port to memory byte by byte */
+ENTRY(phys_insb)
        push    %ebp
        mov     %esp, %ebp
        cld
@@ -287,9 +244,8 @@ _phys_insb:
  * PUBLIC void phys_outsw(Port_t port, phys_bytes buf, size_t count); 
  * Output an array to an I/O port.  Absolute address version of outsw(). 
  */
-
-.balign        16
-_phys_outsw:
+/* transfer data from memory to (disk controller) port */
+ENTRY(phys_outsw)
        push    %ebp
        mov     %esp, %ebp
        cld
@@ -316,9 +272,8 @@ _phys_outsw:
  * PUBLIC void phys_outsb(Port_t port, phys_bytes buf, size_t count);
  * Output an array to an I/O port.  Absolute address version of outsb().
  */
-
-.balign        16
-_phys_outsb:
+/* transfer data from memory to (disk controller) port byte by byte */
+ENTRY(phys_outsb)
        push    %ebp
        mov     %esp, %ebp
        cld
@@ -343,14 +298,11 @@ _phys_outsb:
 /*
  * PUBLIC phys_bytes phys_copy(phys_bytes source, phys_bytes destination,
  *                     phys_bytes bytecount); 
- * Copy a block of physical memory. 
+ * Copy a block of data from anywhere to anywhere in physical memory.
  */
-
        PC_ARGS = 4+4+4+4       /* 4 + 4 + 4 */
 /*             es edi esi eip   src dst len */
-
-.balign        16
-_phys_copy:
+ENTRY(phys_copy)
        cld
        push    %esi
        push    %edi
@@ -382,13 +334,13 @@ pc_small:
        rep     movsb %es:(%esi), %es:(%edi)
 
        mov     $0, %eax                /* 0 means: no fault */
-_phys_copy_fault:                      /* kernel can send us here */
+LABEL(phys_copy_fault)         /* kernel can send us here */
        pop     %es
        pop     %edi
        pop     %esi
        ret
 
-_phys_copy_fault_in_kernel:                    /* kernel can send us here */
+LABEL(phys_copy_fault_in_kernel)       /* kernel can send us here */
        pop     %es
        pop     %edi
        pop     %esi
@@ -417,10 +369,7 @@ _phys_copy_fault_in_kernel:                        /* kernel can send us here */
  * wrong pointers from userspace and the caller should return an error to
  * userspace as if wrong values or request were passed to the kernel
  */
-
-.balign 16
-.globl _copy_msg_from_user
-_copy_msg_from_user:
+ENTRY(copy_msg_from_user)
        push    %gs
 
        mov     8(%esp), %eax
@@ -450,8 +399,7 @@ _copy_msg_from_user:
        mov     %gs:8*4(%ecx), %eax
        mov     %eax, 8*4(%edx)
 
-.globl ___copy_msg_from_user_end
-___copy_msg_from_user_end:
+LABEL(__copy_msg_from_user_end)
 
        pop     %gs
 
@@ -470,10 +418,7 @@ ___copy_msg_from_user_end:
  *
  * All the other copy_msg_from_user() comments apply here as well!
  */
-
-.balign 16
-.globl _copy_msg_to_user
-_copy_msg_to_user:
+ENTRY(copy_msg_to_user)
        push    %gs
 
        mov     8(%esp), %eax
@@ -503,8 +448,7 @@ _copy_msg_to_user:
        mov     8*4(%ecx), %eax
        mov     %eax, %gs:8*4(%edx)
 
-.globl ___copy_msg_to_user_end
-___copy_msg_to_user_end:
+LABEL(__copy_msg_to_user_end)
 
        pop     %gs
 
@@ -518,9 +462,7 @@ ___copy_msg_to_user_end:
  * called from has to handle this situation. The exception handler redirect us
  * here to continue, clean up and report the error
  */
-.balign 16
-.globl ___user_copy_msg_pointer_failure
-___user_copy_msg_pointer_failure:
+ENTRY(__user_copy_msg_pointer_failure)
        pop     %gs
 
        movl    $-1, %eax
@@ -534,9 +476,7 @@ ___user_copy_msg_pointer_failure:
  *     phys_bytes bytecount); 
  * Fill a block of physical memory with pattern. 
  */
-
-.balign        16
-_phys_memset:
+ENTRY(phys_memset)
        push    %ebp
        mov     %esp, %ebp
        push    %esi
@@ -581,9 +521,7 @@ fill_done:
  * PUBLIC u16_t mem_rdw(U16_t segment, u16_t *offset); 
  * Load and return word at far pointer segment:offset. 
  */
-
-.balign        16
-_mem_rdw:
+ENTRY(mem_rdw)
        mov     %ds, %cx
        mov     4(%esp), %ds
        mov     4+4(%esp), %eax /* offset */
@@ -599,8 +537,7 @@ _mem_rdw:
  * PUBLIC void reset(); 
  * Reset the system by loading IDT with offset 0 and interrupting. 
  */
-
-_reset:
+ENTRY(reset)
        lidt    idt_zero
        int     $3      /* anything goes, the 386 will not like it */
 .data
@@ -617,7 +554,7 @@ idt_zero:
  * reanables interrupts and puts the cpu in the halts state. Once an interrupt
  * is handled the execution resumes by disabling interrupts and continues
  */
-_halt_cpu:
+ENTRY(halt_cpu)
        sti
        hlt /* interrupts enabled only after this instruction is executed! */
        /*
@@ -633,48 +570,50 @@ _halt_cpu:
  * PUBLIC unsigned long read_cpu_flags(void);
  * Read CPU status flags from C.
  */
-.balign        16
-_read_cpu_flags:
+ENTRY(read_cpu_flags)
        pushf
        mov     (%esp), %eax
        add     $4, %esp
        ret
 
-_read_ds:
+ENTRY(read_ds)
        mov     $0, %eax
        mov     %ds, %ax
        ret
 
-_read_cs:
+ENTRY(read_cs)
        mov     $0, %eax
        mov     %cs, %ax
        ret
 
-_read_ss:
+ENTRY(read_ss)
        mov     $0, %eax
        mov     %ss, %ax
        ret
 
-
 /*===========================================================================*/
 /*                            fpu_routines                                   */
 /*===========================================================================*/
-_fninit:
+
+/* non-waiting FPU initialization */
+ENTRY(fninit)
        fninit
        ret
 
-_clts:
+ENTRY(clts)
        clts
        ret
 
-_fnstsw:
+/* store status word (non-waiting) */
+ENTRY(fnstsw)
        xor     %eax, %eax
 
        /* DO NOT CHANGE THE OPERAND!!! gas2ack does not handle it yet */
        fnstsw  %ax
        ret
 
-_fnstcw:
+/* store control word (non-waiting) */
+ENTRY(fnstcw)
        push    %eax
        mov     8(%esp), %eax
 
@@ -686,7 +625,7 @@ _fnstcw:
 /*===========================================================================*/
 /*                           fxsave                                    */
 /*===========================================================================*/
-_fxsave:
+ENTRY(fxsave)
        mov     4(%esp), %eax
        fxsave  (%eax)          /* Do not change the operand! (gas2ack) */
        ret
@@ -694,7 +633,7 @@ _fxsave:
 /*===========================================================================*/
 /*                           fnsave                                    */
 /*===========================================================================*/
-_fnsave:
+ENTRY(fnsave)
        mov     4(%esp), %eax
        fnsave  (%eax)          /* Do not change the operand! (gas2ack) */
        fwait   /* required for compatibility with processors prior pentium */
@@ -703,7 +642,7 @@ _fnsave:
 /*===========================================================================*/
 /*                           fxrstor                                   */
 /*===========================================================================*/
-_fxrstor:
+ENTRY(fxrstor)
        mov     4(%esp), %eax
        fxrstor (%eax)          /* Do not change the operand! (gas2ack) */
        ret
@@ -711,7 +650,7 @@ _fxrstor:
 /*===========================================================================*/
 /*                           frstor                                    */
 /*===========================================================================*/
-_frstor:
+ENTRY(frstor)
        mov     4(%esp), %eax
        frstor  (%eax)          /* Do not change the operand! (gas2ack) */
        ret
@@ -721,7 +660,7 @@ _frstor:
 /*                           read_cr0                                       */
 /*===========================================================================*/
 /* PUBLIC unsigned long read_cr0(void); */
-_read_cr0:
+ENTRY(read_cr0)
        push    %ebp
        mov     %esp, %ebp
        mov     %cr0, %eax
@@ -732,7 +671,7 @@ _read_cr0:
 /*                           write_cr0                                      */
 /*===========================================================================*/
 /* PUBLIC void write_cr0(unsigned long value); */
-_write_cr0:
+ENTRY(write_cr0)
        push    %ebp
        mov     %esp, %ebp
        mov     8(%ebp), %eax
@@ -746,7 +685,7 @@ _write_cr0:
 /*                           read_cr2                                       */
 /*===========================================================================*/
 /* PUBLIC reg_t read_cr2(void); */
-_read_cr2:
+ENTRY(read_cr2)
        mov     %cr2, %eax
        ret
 
@@ -754,7 +693,7 @@ _read_cr2:
 /*                           read_cr3                                       */
 /*===========================================================================*/
 /* PUBLIC unsigned long read_cr3(void); */
-_read_cr3:
+ENTRY(read_cr3)
        push    %ebp
        mov     %esp, %ebp
 
@@ -767,7 +706,7 @@ _read_cr3:
 /*                           read_cr4                                       */
 /*===========================================================================*/
 /* PUBLIC unsigned long read_cr4(void); */
-_read_cr4:
+ENTRY(read_cr4)
        push    %ebp
        mov     %esp, %ebp
 
@@ -780,7 +719,7 @@ _read_cr4:
 /*                           write_cr4                                      */
 /*===========================================================================*/
 /* PUBLIC void write_cr4(unsigned long value); */
-_write_cr4:
+ENTRY(write_cr4)
        push    %ebp
        mov     %esp, %ebp
        mov     8(%ebp), %eax
@@ -796,7 +735,7 @@ _write_cr4:
 /*                           write_cr3                                      */
 /*===========================================================================*/
 /* PUBLIC void write_cr3(unsigned long value); */
-_write_cr3:
+ENTRY(write_cr3)
        push    %ebp
        mov     %esp, %ebp
        mov     8(%ebp), %eax
@@ -811,7 +750,7 @@ _write_cr3:
 /*                             getcr3val                                    */
 /*===========================================================================*/
 /* PUBLIC unsigned long getcr3val(void); */
-_getcr3val:
+ENTRY(getcr3val)
        mov     %cr3, %eax
        ret
 
@@ -820,8 +759,7 @@ _getcr3val:
  *
  * void ia32_msr_read(u32_t reg, u32_t * hi, u32_t * lo)
  */
-.globl _ia32_msr_read
-_ia32_msr_read:
+ENTRY(ia32_msr_read)
        push    %ebp
        mov     %esp, %ebp
 
@@ -840,8 +778,7 @@ _ia32_msr_read:
  *
  * void ia32_msr_write(u32_t reg, u32_t hi, u32_t lo)
  */
-.globl _ia32_msr_write
-_ia32_msr_write:
+ENTRY(ia32_msr_write)
        push    %ebp
        mov     %esp, %ebp
 
@@ -857,9 +794,9 @@ _ia32_msr_write:
 /*                           idt_reload                                     */
 /*===========================================================================*/
 /*  PUBLIC void idt_reload (void); */
-.balign        16
-_idt_reload:
-       lidt    _gdt+IDT_SELECTOR       /*  reload interrupt descriptor table */
+/* reload idt when returning to monitor. */
+ENTRY(idt_reload)
+       lidt    _C_LABEL(gdt)+IDT_SELECTOR /*  reload interrupt descriptor table */
        ret
 
 /*
@@ -870,8 +807,7 @@ _idt_reload:
        mov     reg, %ax        ;\
        mov     %ax, reg        ;
 
-.globl _reload_ds
-_reload_ds:
+ENTRY(reload_ds)
        RELOAD_SEG_REG(%ds)
        ret
 
@@ -884,10 +820,7 @@ _reload_ds:
  * same value in which case it would only result in an extra TLB flush which is
  * not desirable
  */
- .balign 16
-.globl _switch_address_space
-_switch_address_space:
-
+ENTRY(switch_address_space)
        /* read the process pointer */
        mov     4(%esp), %edx
        /* enable process' segment descriptors  */
@@ -906,7 +839,7 @@ _switch_address_space:
        cmp     %ecx, %eax
        je      0f
        mov     %eax, %cr3
-       mov     %edx, _ptproc
+       mov     %edx, _C_LABEL(ptproc)
 0:
        ret
 
@@ -915,11 +848,10 @@ _switch_address_space:
 /*===========================================================================*/
 /* PUBLIC void poweroff(); */
 /* Jump to 16-bit poweroff code */
-.globl _poweroff_jmp
-_poweroff_jmp:
+ENTRY(poweroff_jmp)
        cli
        /* Make real mode descriptor */
-       mov     $(_gdt + SS_SELECTOR), %edi
+       mov     $(_C_LABEL(gdt) + SS_SELECTOR), %edi
        mov     $0x100, %eax
        movw %ax, 2(%edi)
        shr     $16, %eax
index 5c5574a7a54efc38d6ad3a6c72381d907541c496..5cdad83af47fc873951cd26939abf153675c0e5d 100644 (file)
@@ -3,6 +3,7 @@
 
 #include <minix/config.h>
 #include <minix/const.h>
+#include <machine/asm.h>
 #include <machine/interrupt.h>
 #include "archconst.h"
 #include "kernel/const.h"
 
 /*
  * This file contains a number of 16-bit assembly code utility routines needed by the
- * kernel.  They are:
+ * kernel.
  */
 
-.globl _poweroff16 /* enter real mode */
-.globl _poweroff16_end
-
 .text
 .code16
 
 /*===========================================================================*/
 /* PUBLIC void poweroff16(); */
 /* Power down system */
-_poweroff16:
+ENTRY(poweroff16)
        /* Assume eax is already set to required value of cr0*/
 .byte  0x0F,0x22,0xC0  /* mov %cr0,%eax */
-       ljmp    $0,$(BIOS_POWEROFF_ENTRY + real_mode - _poweroff16)
+       ljmp    $0,$(BIOS_POWEROFF_ENTRY + real_mode - _C_LABEL(poweroff16))
 real_mode:
        mov     $((BIOS_POWEROFF_ENTRY >> 4) + 0x200),%ax
        mov     %ax, %ds
@@ -88,7 +86,7 @@ apm_err:
        mov     $0x07, %bx
        mov     $POWEROFF_MSG_LEN, %cx
        mov     $0x0300, %dx
-       mov     $(poweroff_msg - _poweroff16), %bp
+       mov     $(poweroff_msg - _C_LABEL(poweroff16)), %bp
        int     $0x10
 0:     hlt
        jmp     0b
@@ -99,4 +97,4 @@ kb_wait:
        jnz     kb_wait
        ret
 /*mark the end for copy*/
-_poweroff16_end:
+LABEL(poweroff16_end)
index 75557e6fdb212005f72a3bf731dc9b52d347c17a..42d25cd7370c6da565952f4f4a6f1004f9fb4857 100644 (file)
@@ -47,6 +47,7 @@ begbss:
 #include <minix/config.h>
 #include <minix/const.h>
 #include <minix/com.h>
+#include <machine/asm.h>
 #include <machine/interrupt.h>
 #include "archconst.h"
 #include "kernel/const.h"
@@ -57,59 +58,11 @@ begbss:
 /* Selected 386 tss offsets. */
 #define TSS3_S_SP0     4
 
-/*
- * Exported functions 
- * Note: in assembly language the .define statement applied to a function name  
- * is loosely equivalent to a prototype in C code -- it makes it possible to 
- * link to an entity declared in the assembly code but does not create 
- * the entity. 
- */
-
-.globl _restore_user_context
-.globl  _copr_not_available_handler
-.globl _reload_cr3
-
-.globl _divide_error
-.globl _single_step_exception
-.globl _nmi
-.globl _breakpoint_exception
-.globl _overflow
-.globl _bounds_check
-.globl _inval_opcode
-.globl _copr_not_available
-.globl _double_fault
-.globl _copr_seg_overrun
-.globl _inval_tss
-.globl _segment_not_present
-.globl _stack_exception
-.globl _general_protection
-.globl _page_fault
-.globl _copr_error
-.globl _alignment_check
-.globl _machine_check
-.globl _simd_exception
-.globl _params_size
-.globl _params_offset
-.globl _mon_ds
-.globl _switch_to_user
-.globl _save_fpu
-
-.globl _hwint00        /* handlers for hardware interrupts */
-.globl _hwint01
-.globl _hwint02
-.globl _hwint03
-.globl _hwint04
-.globl _hwint05
-.globl _hwint06
-.globl _hwint07
-.globl _hwint08
-.globl _hwint09
-.globl _hwint10
-.globl _hwint11
-.globl _hwint12
-.globl _hwint13
-.globl _hwint14
-.globl _hwint15
+IMPORT(copr_not_available_handler)
+IMPORT(params_size)
+IMPORT(params_offset)
+IMPORT(mon_ds)
+IMPORT(switch_to_user)
 
 /* Exported variables. */
 .globl begbss
@@ -178,16 +131,16 @@ kernel_init: /* after pre-init*/
        push    %edi
        cmp     $0, 4(%ebp)     /* monitor return vector is */
        je      noret   /* nonzero if return possible */
-       incl    _mon_return
+       incl    _C_LABEL(mon_return)
 noret:
-       movl    %esp, _mon_sp   /* save stack pointer for later return */
+       movl    %esp, _C_LABEL(mon_sp) /* save stack pointer for later return */
 
 /* Copy the monitor global descriptor table to the address space of kernel and */
 /* switch over to it.  Prot_init() can then update it with immediate effect. */
 
-       sgdt    _gdt+GDT_SELECTOR       /* get the monitor gdtr */
-       movl    _gdt+GDT_SELECTOR+2, %esi       /* absolute address of GDT */
-       mov     $_gdt, %ebx     /* address of kernel GDT */
+       sgdt    _C_LABEL(gdt)+GDT_SELECTOR      /* get the monitor gdtr */
+       movl    _C_LABEL(gdt)+GDT_SELECTOR+2, %esi      /* absolute address of GDT */
+       mov     $_C_LABEL(gdt), %ebx    /* address of kernel GDT */
        mov     $8*8, %ecx      /* copying eight descriptors */
 copygdt:
        movb    %es:(%esi), %al
@@ -195,28 +148,28 @@ copygdt:
        inc     %esi
        inc     %ebx
        loop    copygdt
-       movl    _gdt+DS_SELECTOR+2, %eax        /* base of kernel data */
+       movl    _C_LABEL(gdt)+DS_SELECTOR+2, %eax /* base of kernel data */
        and     $0x00FFFFFF, %eax       /* only 24 bits */
-       add     $_gdt, %eax     /* eax = vir2phys(gdt) */
-       movl    %eax, _gdt+GDT_SELECTOR+2       /* set base of GDT */
-       lgdt    _gdt+GDT_SELECTOR       /* switch over to kernel GDT */
+       add     $_C_LABEL(gdt), %eax    /* eax = vir2phys(gdt) */
+       movl    %eax, _C_LABEL(gdt)+GDT_SELECTOR+2 /* set base of GDT */
+       lgdt    _C_LABEL(gdt)+GDT_SELECTOR      /* switch over to kernel GDT */
 
 /* Locate boot parameters, set up kernel segment registers and stack. */
        mov     8(%ebp), %ebx   /* boot parameters offset */
        mov     12(%ebp), %edx  /* boot parameters length */
        mov     16(%ebp), %eax  /* address of a.out headers */
-       movl    %eax, _aout
+       movl    %eax, _C_LABEL(aout)
        mov     %ds, %ax        /* kernel data */
        mov     %ax, %es
        mov     %ax, %fs
        mov     %ax, %gs
        mov     %ax, %ss
-       mov     $_k_boot_stktop, %esp   /* set sp to point to the top of kernel stack */
+       mov     $_C_LABEL(k_boot_stktop), %esp  /* set sp to point to the top of kernel stack */
 
 /* Save boot parameters into these global variables for i386 code */
-       movl    %edx, _params_size
-       movl    %ebx, _params_offset
-       movl    $SS_SELECTOR, _mon_ds
+       movl    %edx, _C_LABEL(params_size)
+       movl    %ebx, _C_LABEL(params_offset)
+       movl    $SS_SELECTOR, _C_LABEL(mon_ds)
 
 /* Call C startup code to set up a proper environment to run main(). */
        push    %edx
@@ -224,14 +177,14 @@ copygdt:
        push    $SS_SELECTOR
        push    $DS_SELECTOR
        push    $CS_SELECTOR
-       call    _cstart /* cstart(cs, ds, mds, parmoff, parmlen) */
+       call    _C_LABEL(cstart) /* cstart(cs, ds, mds, parmoff, parmlen) */
        add     $5*4, %esp
 
 /* Reload gdtr, idtr and the segment registers to global descriptor table set */
 /* up by prot_init(). */
 
-       lgdt    _gdt+GDT_SELECTOR
-       lidt    _gdt+IDT_SELECTOR
+       lgdt    _C_LABEL(gdt)+GDT_SELECTOR
+       lidt    _C_LABEL(gdt)+IDT_SELECTOR
 
        ljmp    $CS_SELECTOR, $csinit
 csinit:
@@ -245,7 +198,7 @@ csinit:
        ltr     %ax
        push    $0      /* set flags to known good state */
        popf    /* esp, clear nested task and int enable */
-       jmp     _main   /* main() */
+       jmp     _C_LABEL(main)  /* main() */
 
 
 /*===========================================================================*/
@@ -255,7 +208,7 @@ csinit:
 
 #define PIC_IRQ_HANDLER(irq)   \
        push    $irq                                                            ;\
-       call    _irq_handle             /* intr_handle(irq_handlers[irq]) */    ;\
+       call    _C_LABEL(irq_handle)    /* intr_handle(irq_handlers[irq]) */    ;\
        add     $4, %esp                                                        ;
 
 /*===========================================================================*/
@@ -269,16 +222,16 @@ csinit:
        SAVE_PROCESS_CTX(0)                                             ;\
        push    %ebp                                                    ;\
        movl    $0, %ebp        /* for stack trace */                   ;\
-       call    _context_stop                                           ;\
+       call    _C_LABEL(context_stop)                                  ;\
        add     $4, %esp                                                ;\
        PIC_IRQ_HANDLER(irq)                                            ;\
        movb    $END_OF_INT, %al                                        ;\
        outb    $INT_CTL        /* reenable interrupts in master pic */ ;\
-       jmp     _switch_to_user                                         ;\
+       jmp     _C_LABEL(switch_to_user)                                ;\
                                                                        \
 0:                                                                     \
        pusha                                                           ;\
-       call    _context_stop_idle                                      ;\
+       call    _C_LABEL(context_stop_idle)                             ;\
        PIC_IRQ_HANDLER(irq)                                            ;\
        movb    $END_OF_INT, %al                                        ;\
        outb    $INT_CTL        /* reenable interrupts in master pic */ ;\
@@ -287,43 +240,35 @@ csinit:
        iret                                                            ;
 
 /* Each of these entry points is an expansion of the hwint_master macro */
-.balign        16
-_hwint00:
+ENTRY(hwint00)
 /* Interrupt routine for irq 0 (the clock). */
        hwint_master(0)
 
-.balign        16
-_hwint01:
+ENTRY(hwint01)
 /* Interrupt routine for irq 1 (keyboard) */
        hwint_master(1)
 
-.balign        16
-_hwint02:
+ENTRY(hwint02)
 /* Interrupt routine for irq 2 (cascade!) */
        hwint_master(2)
 
-.balign        16
-_hwint03:
+ENTRY(hwint03)
 /* Interrupt routine for irq 3 (second serial) */
        hwint_master(3)
 
-.balign        16
-_hwint04:
+ENTRY(hwint04)
 /* Interrupt routine for irq 4 (first serial) */
        hwint_master(4)
 
-.balign        16
-_hwint05:
+ENTRY(hwint05)
 /* Interrupt routine for irq 5 (XT winchester) */
        hwint_master(5)
 
-.balign        16
-_hwint06:
+ENTRY(hwint06)
 /* Interrupt routine for irq 6 (floppy) */
        hwint_master(6)
 
-.balign        16
-_hwint07:
+ENTRY(hwint07)
 /* Interrupt routine for irq 7 (printer) */
        hwint_master(7)
 
@@ -337,17 +282,17 @@ _hwint07:
        SAVE_PROCESS_CTX(0)                                             ;\
        push    %ebp                                                    ;\
        movl    $0, %ebp        /* for stack trace */                   ;\
-       call    _context_stop                                           ;\
+       call    _C_LABEL(context_stop)                                  ;\
        add     $4, %esp                                                ;\
        PIC_IRQ_HANDLER(irq)                                            ;\
        movb    $END_OF_INT, %al                                        ;\
        outb    $INT_CTL        /* reenable interrupts in master pic */ ;\
        outb    $INT2_CTL       /* reenable slave 8259            */    ;\
-       jmp     _switch_to_user                                         ;\
+       jmp     _C_LABEL(switch_to_user)                                ;\
                                                                        \
 0:                                                                     \
        pusha                                                           ;\
-       call    _context_stop_idle                                      ;\
+       call    _C_LABEL(context_stop_idle)                             ;\
        PIC_IRQ_HANDLER(irq)                                            ;\
        movb    $END_OF_INT, %al                                        ;\
        outb    $INT_CTL        /* reenable interrupts in master pic */ ;\
@@ -357,52 +302,42 @@ _hwint07:
        iret                                                            ;
 
 /* Each of these entry points is an expansion of the hwint_slave macro */
-.balign        16
-_hwint08:
+ENTRY(hwint08)
 /* Interrupt routine for irq 8 (realtime clock) */
        hwint_slave(8)
 
-.balign        16
-_hwint09:
+ENTRY(hwint09)
 /* Interrupt routine for irq 9 (irq 2 redirected) */
        hwint_slave(9)
 
-.balign        16
-_hwint10:
+ENTRY(hwint10)
 /* Interrupt routine for irq 10 */
        hwint_slave(10)
 
-.balign        16
-_hwint11:
+ENTRY(hwint11)
 /* Interrupt routine for irq 11 */
        hwint_slave(11)
 
-.balign        16
-_hwint12:
+ENTRY(hwint12)
 /* Interrupt routine for irq 12 */
        hwint_slave(12)
 
-.balign        16
-_hwint13:
+ENTRY(hwint13)
 /* Interrupt routine for irq 13 (FPU exception) */
        hwint_slave(13)
 
-.balign        16
-_hwint14:
+ENTRY(hwint14)
 /* Interrupt routine for irq 14 (AT winchester) */
        hwint_slave(14)
 
-.balign        16
-_hwint15:
+ENTRY(hwint15)
 /* Interrupt routine for irq 15 */
        hwint_slave(15)
 
 /*
  * IPC is only from a process to kernel
  */
-.balign 16
-.globl _ipc_entry
-_ipc_entry:
+ENTRY(ipc_entry)
 
        SAVE_PROCESS_CTX(0)
 
@@ -422,25 +357,23 @@ _ipc_entry:
        push    %ebp
        /* for stack trace */
        movl    $0, %ebp
-       call    _context_stop
+       call    _C_LABEL(context_stop)
        add     $4, %esp
 
-       call    _do_ipc
+       call    _C_LABEL(do_ipc)
 
        /* restore the current process pointer and save the return value */
        add     $3 * 4, %esp
        pop     %esi
        mov     %eax, AXREG(%esi)
 
-       jmp     _switch_to_user
+       jmp     _C_LABEL(switch_to_user)
 
 
 /*
  * kernel call is only from a process to kernel
  */
-.balign 16
-.globl _kernel_call_entry
-_kernel_call_entry:
+ENTRY(kernel_call_entry)
 
        SAVE_PROCESS_CTX(0)
 
@@ -458,15 +391,15 @@ _kernel_call_entry:
        push    %ebp
        /* for stack trace */
        movl    $0, %ebp
-       call    _context_stop
+       call    _C_LABEL(context_stop)
        add     $4, %esp
 
-       call    _kernel_call
+       call    _C_LABEL(kernel_call)
 
        /* restore the current process pointer and save the return value */
        add     $8, %esp
 
-       jmp     _switch_to_user
+       jmp     _C_LABEL(switch_to_user)
 
 
 .balign 16
@@ -490,7 +423,7 @@ exception_entry_from_user:
        push    %ebp
        /* for stack trace clear %ebp */
        movl    $0, %ebp
-       call    _context_stop
+       call    _C_LABEL(context_stop)
        add     $4, %esp
 
        /*
@@ -500,9 +433,9 @@ exception_entry_from_user:
         */
        push    %esp
        push    $0      /* it's not a nested exception */
-       call    _exception_handler
+       call    _C_LABEL(exception_handler)
 
-       jmp     _switch_to_user
+       jmp     _C_LABEL(switch_to_user)
 
 exception_entry_nested:
 
@@ -511,7 +444,7 @@ exception_entry_nested:
        add     $(8 * 4), %eax
        push    %eax
        pushl   $1                      /* it's a nested exception */
-       call    _exception_handler
+       call    _C_LABEL(exception_handler)
        add     $8, %esp
        popa
 
@@ -523,7 +456,7 @@ exception_entry_nested:
 /*===========================================================================*/
 /*                             restart                                      */
 /*===========================================================================*/
-_restore_user_context:
+ENTRY(restore_user_context)
        mov     4(%esp), %ebp   /* will assume P_STACKBASE == 0 */
 
        /* reconstruct the stack for iret */
@@ -558,13 +491,13 @@ _restore_user_context:
        pushl   $0              ;\
        EXCEPTION_ERR_CODE(vector)
 
-_divide_error:
+LABEL(divide_error)
        EXCEPTION_NO_ERR_CODE(DIVIDE_VECTOR)
 
-_single_step_exception:
+LABEL(single_step_exception)
        EXCEPTION_NO_ERR_CODE(DEBUG_VECTOR)
 
-_nmi:
+LABEL(nmi)
 #ifndef CONFIG_WATCHDOG
        EXCEPTION_NO_ERR_CODE(NMI_VECTOR)
 #else
@@ -597,7 +530,7 @@ _nmi:
        mov     %si, %es
 
        push    %esp
-       call    _nmi_watchdog_handler
+       call    _C_LABEL(nmi_watchdog_handler)
        add     $4, %esp
 
        /* restore all the important registers as they were before the trap */
@@ -610,71 +543,71 @@ _nmi:
        iret
 #endif
 
-_breakpoint_exception:
+LABEL(breakpoint_exception)
        EXCEPTION_NO_ERR_CODE(BREAKPOINT_VECTOR)
 
-_overflow:
+LABEL(overflow)
        EXCEPTION_NO_ERR_CODE(OVERFLOW_VECTOR)
 
-_bounds_check:
+LABEL(bounds_check)
        EXCEPTION_NO_ERR_CODE(BOUNDS_VECTOR)
 
-_inval_opcode:
+LABEL(inval_opcode)
        EXCEPTION_NO_ERR_CODE(INVAL_OP_VECTOR)
 
-_copr_not_available:
+LABEL(copr_not_available)
        TEST_INT_IN_KERNEL(4, copr_not_available_in_kernel)
        cld                     /* set direction flag to a known value */
        SAVE_PROCESS_CTX(0)
        /* stop user process cycles */
        push    %ebp
        mov     $0, %ebp
-       call    _context_stop
-       jmp     _copr_not_available_handler
+       call    _C_LABEL(context_stop)
+       jmp     _C_LABEL(copr_not_available_handler)
 
 copr_not_available_in_kernel:
        pushl   $0
        pushl   $COPROC_NOT_VECTOR
        jmp     exception_entry_nested
 
-_double_fault:
+LABEL(double_fault)
        EXCEPTION_ERR_CODE(DOUBLE_FAULT_VECTOR)
 
-_copr_seg_overrun:
+LABEL(copr_seg_overrun)
        EXCEPTION_NO_ERR_CODE(COPROC_SEG_VECTOR)
 
-_inval_tss:
+LABEL(inval_tss)
        EXCEPTION_ERR_CODE(INVAL_TSS_VECTOR)
 
-_segment_not_present:
+LABEL(segment_not_present)
        EXCEPTION_ERR_CODE(SEG_NOT_VECTOR)
 
-_stack_exception:
+LABEL(stack_exception)
        EXCEPTION_ERR_CODE(STACK_FAULT_VECTOR)
 
-_general_protection:
+LABEL(general_protection)
        EXCEPTION_ERR_CODE(PROTECTION_VECTOR)
 
-_page_fault:
+LABEL(page_fault)
        EXCEPTION_ERR_CODE(PAGE_FAULT_VECTOR)
 
-_copr_error:
+LABEL(copr_error)
        EXCEPTION_NO_ERR_CODE(COPROC_ERR_VECTOR)
 
-_alignment_check:
+LABEL(alignment_check)
        EXCEPTION_NO_ERR_CODE(ALIGNMENT_CHECK_VECTOR)
 
-_machine_check:
+LABEL(machine_check)
        EXCEPTION_NO_ERR_CODE(MACHINE_CHECK_VECTOR)
 
-_simd_exception:
+LABEL(simd_exception)
        EXCEPTION_NO_ERR_CODE(SIMD_EXCEPTION_VECTOR)
 
 /*===========================================================================*/
 /*                             reload_cr3                                   */
 /*===========================================================================*/
 /* PUBLIC void reload_cr3(void); */
-_reload_cr3:
+ENTRY(reload_cr3)
        push    %ebp
        mov     %esp, %ebp
        mov     %cr3, %eax
@@ -696,7 +629,6 @@ _reload_cr3:
 /*
  * the kernel stack
  */
-.globl _k_boot_stktop
 k_boot_stack:
 .space 4096            /* kernel stack */ /* FIXME use macro here */
-_k_boot_stktop:                /* top of kernel stack */
+LABEL(k_boot_stktop)   /* top of kernel stack */
index fc2d94534c93fc97055d588dd500aa2429399a32..07c7d8099ae3a17563d2aae77f0c55cb46f1037d 100644 (file)
@@ -2,6 +2,7 @@
 #include <minix/config.h>
 #include <minix/const.h>
 #include <minix/com.h>
+#include <machine/asm.h>
 #include <machine/interrupt.h>
 #include "archconst.h"
 #include "kernel/const.h"
@@ -11,7 +12,7 @@
 
 #define GDT_SET_ENTRY(selector, base, limit) \
        mov     %ebp, %edi; \
-       add     $(_gdt + selector), %edi; \
+       add     $(_C_LABEL(gdt) + selector), %edi; \
        mov     base, %eax; \
        movw %ax, 2(%edi); \
        shr     $16, %eax; \
        andb    $0xf0, 6(%edi); \
        or      %ax, 6(%edi); \
        
-.globl _pre_init
-.globl multiboot_init
-.globl kernel_init
+IMPORT(pre_init)
+.extern kernel_init
 
+.globl multiboot_init
 multiboot_init:
        /* Get size of kernel text */
        mov     MULTIBOOT_LOAD_ADDRESS + MULTIBOOT_KERNEL_a_text, %ecx
@@ -44,7 +45,7 @@ multiboot_init:
        /* Calculate and save kernel data base address */
        mov     $(MULTIBOOT_LOAD_ADDRESS + MULTIBOOT_ENTRY_OFFSET), %ebp
        add     %eax, %ebp
-       mov     %ebp, _kernel_data_addr(%ebp)
+       mov     %ebp, _C_LABEL(kernel_data_addr)(%ebp)
        
        /* Init text seg */
        GDT_SET_ENTRY(CS_SELECTOR, \
@@ -68,10 +69,10 @@ multiboot_init:
        
        mov     $(GDT_SIZE*DESC_SIZE), %eax
        mov     %ebp, %edi
-       add     $(_gdt + GDT_SELECTOR), %edi
+       add     $(_C_LABEL(gdt) + GDT_SELECTOR), %edi
        mov     %ax, (%edi)
        mov     %ebp, %eax
-       add     $_gdt, %eax
+       add     $_C_LABEL(gdt), %eax
        mov     %eax, 2(%edi)
        lgdt    (%edi)
        
@@ -86,14 +87,14 @@ reload_cs:
        mov     $(multiboot_stack + MULTIBOOT_STACK_SIZE), %esp
 
        push    %ebx
-       call    _pre_init
+       call    _C_LABEL(pre_init)
        
        add     $4, %esp
        
        /* return to old boot code of kernel */
        push    %eax
        push    $MULTIBOOT_PARAM_BUF_SIZE
-       push    $_multiboot_param_buf
+       push    $_C_LABEL(multiboot_param_buf)
        push    $0
        
        mov     $ES_SELECTOR, %eax
@@ -102,16 +103,13 @@ reload_cs:
        jmp     kernel_init
 
 .data
-.globl _kernel_data_addr
-_kernel_data_addr:
-.long  0
-.globl _a_out_headers
-_a_out_headers:
-.space NR_BOOT_PROCS * 32 /* is A_MINHDR */
+LABEL(kernel_data_addr)
+       .long   0
+LABEL(a_out_headers)
+       .space  NR_BOOT_PROCS * 32 /* is A_MINHDR */
 
-.globl _multiboot_param_buf
-_multiboot_param_buf:
-.space MULTIBOOT_PARAM_BUF_SIZE
+LABEL(multiboot_param_buf)
+       .space  MULTIBOOT_PARAM_BUF_SIZE
 
 multiboot_stack:
 .space MULTIBOOT_STACK_SIZE + 4
index 573bd7ff887cdef4bcffd2d14e93d17934b38ddc..945667d9ddebf5fdd609f4841742025700c0a6a0 100644 (file)
@@ -1,11 +1,9 @@
 /*     add64() - 64 bit addition                       Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _add64
-
-_add64:
+ENTRY(add64)
 /* u64_t add64(u64_t i, u64_t j); */
        movl    4(%esp), %eax
        movl    8(%esp), %edx
index 41a0a93a695c30a3d0cf04033766d3fed62a01be..cbf2160e353d9c55dc5ac8c20f02948323bf2ad4 100644 (file)
@@ -1,13 +1,11 @@
 /*     add64u() - unsigned to 64 bit addition          Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _add64u, _add64ul
-
-_add64u:
+ENTRY(add64u)
 /* u64_t add64u(u64_t i, unsigned j); */
-_add64ul:
+ENTRY(add64ul)
 /* u64_t add64ul(u64_t i, unsigned long j); */
        movl    4(%esp), %eax
        movl    8(%esp), %edx
index 84a00d4700792e7cdbe873f1b191b234427de0a4..5c61e3d7ad230e05978281cf381200c9bfffca3c 100644 (file)
@@ -1,11 +1,9 @@
 /*     bsr64() - 64 bit bit scan reverse       Author: Erik van der Kouwe */
 /*                                                            15 May 2010 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _bsr64
-
-_bsr64:
+ENTRY(bsr64)
 /* int bsr64(u64_t i); */
        bsr     8(%esp),        %eax    /* check high-order DWORD */
        jnz     0f                      /* non-zero: return index+32 */
index cdcaab3fab5e6c3980e88ecc2cd5817c41016f1a..0c073540b1e7e292f8d6b65f227fa7ec655efbb9 100644 (file)
@@ -1,9 +1,8 @@
 /*     cmp64*() - 64 bit compare                       Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
-.text
-.globl _cmp64, _cmp64u, _cmp64ul
+#include <machine/asm.h>
 
-_cmp64:
+ENTRY(cmp64)
 /* int cmp64(u64_t i, u64_t j); */
        movl    %esp, %ecx
 0:
@@ -20,9 +19,9 @@ _cmp64:
        adcl    $0, %eax        /* eax = (i > j) - (i < j) */
        ret
 
-_cmp64u:
+ENTRY(cmp64u)
 /* int cmp64u(u64_t i, unsigned j); */
-_cmp64ul:
+ENTRY(cmp64ul)
 /* int cmp64ul(u64_t i, unsigned long j); */
        movl    %esp, %ecx
        push    16(%ecx)
index ac8e4451aa517f8c2fb48edd6101b67095b6b8bc..93c9264de2edeaa6095c7c8adfcf70a1481b7ccc 100644 (file)
@@ -1,11 +1,10 @@
 /*     cv64u() - 64 bit converted to unsigned          Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
-.text
-.globl _cv64u, _cv64ul
+#include <machine/asm.h>
 
-_cv64u:
+ENTRY(cv64u)
 /* unsigned cv64u(u64_t i); */
-_cv64ul:
+ENTRY(cv64ul)
 /* unsigned long cv64ul(u64_t i); */
        movl    4(%esp), %eax
        cmpl    $0, 8(%esp)     /* return ULONG_MAX if really big */
index 8513f9d0e833b217dd12f7876d6855ab2bb421f8..2395412f1a04ee9ee22d433027f9233dd7967e18 100644 (file)
@@ -1,13 +1,11 @@
 /*     cvu64() - unsigned converted to 64 bit          Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _cvu64, _cvul64
-
-_cvu64:
+ENTRY(cvu64)
 /* u64_t cvu64(unsigned i); */
-_cvul64:
+ENTRY(cvul64)
 /* u64_t cvul64(unsigned long i); */
        movl    4(%esp), %eax
        movl    8(%esp), %edx
index 818459b449f2781dadbc1642a26e6ae4b33466ba..18719cdbe9d4dba90821e441faad9fb53809149f 100644 (file)
@@ -1,9 +1,8 @@
 /*     diff64() - 64 bit subtraction giving unsigned   Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
-.text
-.globl _diff64
+#include <machine/asm.h>
 
-_diff64:
+ENTRY(diff64)
 /* unsigned diff64(u64_t i, u64_t j); */
        movl    4(%esp), %eax
        subl    12(%esp), %eax
index 164166f8f2742eb7abc6a8ceb0b0c034142bdf31..aaee0929964fc8f16e613b3c4d307ce10073be8a 100644 (file)
@@ -2,11 +2,9 @@
 /*                                                     Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _div64u, _div64u64, _rem64u
-
-_div64u:
+ENTRY(div64u)
 /* unsigned long div64u(u64_t i, unsigned j); */
        xorl    %edx, %edx
        movl    8(%esp), %eax   /* i = (ih<<32) + il */
@@ -15,7 +13,7 @@ _div64u:
        divl    12(%esp)        /* i / j = (q<<32) + ((r<<32) + il) / j */
        ret
 
-_div64u64:
+ENTRY(div64u64)
 /* u64_t div64u64(u64_t i, unsigned j); */
        xorl    %edx, %edx
        movl    12(%esp), %eax  /* i = (ih<<32) + il */
@@ -28,10 +26,10 @@ _div64u64:
        movl    %ecx, %eax      /* return pointer to result struct */
        ret     BYTES_TO_POP_ON_STRUCT_RETURN
 
-_rem64u:
+ENTRY(rem64u)
 /* unsigned rem64u(u64_t i, unsigned j); */
        pop     %ecx
-       call    _div64u
+       call    _C_LABEL(div64u)
        movl    %edx, %eax
        jmp     *%ecx
 
index bd224fb0d369c337a3288b327f9320f3ca36b2ab..9cc1f00c8e687bb89c1cada8f736c53bd12eced4 100644 (file)
@@ -1,15 +1,14 @@
 /*     ex64*() - extract low or high 32 bits of a 64 bit number */
 /*                                                     Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
-.text
-.globl _ex64lo, _ex64hi
+#include <machine/asm.h>
 
-_ex64lo:
+ENTRY(ex64lo)
 /* unsigned long ex64lo(u64_t i); */
        movl    4(%esp), %eax
        ret
 
-_ex64hi:
+ENTRY(ex64hi)
 /* unsigned long ex64hi(u64_t i); */
        movl    8(%esp), %eax
        ret
index 27b5a1d9892f19ed1e475bf7b3af90b30d65cea6..7215fc75180d67ef49ac2bb34d18888152562515 100644 (file)
@@ -2,11 +2,9 @@
 /*                                                     Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _make64
-
-_make64:
+ENTRY(make64)
 /* u64_t make64(unsigned long lo, unsigned long hi); */
        movl    4(%esp), %eax
        movl    8(%esp), %edx
index fd693a62e5bbf2cf4b6877eddbf3d2527a73e4b8..411a109ce3a0effdf5370d9899280afe3c649673 100644 (file)
@@ -2,11 +2,9 @@
 /*                                                     Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _mul64u
-
-_mul64u:
+ENTRY(mul64u)
 /* u64_t mul64u(unsigned long i, unsigned j); */
        movl    4(%esp), %ecx
        movl    8(%esp), %eax
index fc1d80ad7283141f5cb9863086e72b9d1634d323..b2f7535228f18869cb8643ace70cfb48c2934fd5 100644 (file)
@@ -1,11 +1,9 @@
 /*     sub64() - 64 bit subtraction                    Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _sub64
-
-_sub64:
+ENTRY(sub64)
 /* u64_t sub64(u64_t i, u64_t j); */
        movl    4(%esp), %eax
        movl    8(%esp), %edx
index 2f5c2d45ffb5c18c37d634b2288d366523b7a0b8..f8001e1c0b83e16c5690c406a281e6c691f79534 100644 (file)
@@ -1,13 +1,11 @@
 /*     sub64() - unsigned from 64 bit subtraction      Author: Kees J. Bot */
 /*                                                             7 Dec 1995 */
 #include <minix/compiler.h>
+#include <machine/asm.h>
 
-.text
-.globl _sub64u, _sub64ul
-
-_sub64u:
+ENTRY(sub64u)
 /* u64_t sub64u(u64_t i, unsigned j); */
-_sub64ul:
+ENTRY(sub64ul)
 /* u64_t sub64ul(u64_t i, unsigned long j); */
        movl    4(%esp), %eax
        movl    8(%esp), %edx
index 804652325e66790dc49c054fd929fe957f4ec712..373330ac2150962184a879771d57717c4d976678 100644 (file)
@@ -1,11 +1,9 @@
 /*     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
+#include <machine/asm.h>
 
 /* u16_t fpu_cw_get(void) */
-_fpu_cw_get:
+ENTRY(fpu_cw_get)
 /* clear unused bits just to be sure */
        xor     %eax, %eax
        push    %eax
@@ -14,7 +12,7 @@ _fpu_cw_get:
        ret
 
 /* void fpu_cw_set(u16_t fpu_cw) */
-_fpu_cw_set:
+ENTRY(fpu_cw_set)
 /* load control word from parameter */
        fldcw   4(%esp)
        ret
index 0561dd06c810972471b912558b32e4892c1fa2c5..80c67f0aa4243a13e9c844b3ca40daa29bbe0098 100644 (file)
@@ -1,11 +1,9 @@
 /*     fpu_rndint() - round integer    Author: Erik van der Kouwe */
 /*                                     17 Dec 2009 */
-.text
-.globl _fpu_rndint
-.globl _fpu_remainder
+#include <machine/asm.h>
 
 /* void fpu_rndint(double *value) */
-_fpu_rndint:
+ENTRY(fpu_rndint)
 /* move the value onto the floating point stack */
        mov     4(%esp), %eax
        fldl    (%eax)
@@ -18,7 +16,7 @@ _fpu_rndint:
        ret
 
 /* void fpu_remainder(double *x, double y) */
-_fpu_remainder:
+ENTRY(fpu_remainder)
 /* move the values onto the floating point stack */
        fldl    8(%esp)
        mov     4(%esp), %edx
index ce36acacd094db7a0c3805eb68c2059f8729849f..85a9bf31186c09280d02a7c33b290481a40741fb 100644 (file)
@@ -1,36 +1,33 @@
 /* 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
+#include <machine/asm.h>
 
 /* u16_t fpu_compare(double x, double y) */
-_fpu_compare:
+ENTRY(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
+       jmp     _C_LABEL(fpu_sw_get)
 
 /* u16_t fpu_sw_get(void) */
-_fpu_sw_get:
+ENTRY(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:
+ENTRY(fpu_xam)
 /* move the value onto the floating point stack */
        fldl    4(%esp)
 
 /* examine value and get status word */
        fxam
-       call    _fpu_sw_get
+       call    _C_LABEL(fpu_sw_get)
 
 /* pop the value */
        fstp    %st
index 92d7ca9266234719f3ceca7fbbba897aba6eaea4..9b0929fcdc3d8fc59f19dc1fb47f88fdfcb505a1 100644 (file)
@@ -4,10 +4,9 @@
 /* void _cpuid(u32_t *eax, u32_t *ebx, u32_t *ecx, u32_t *edx); */
 /* 0 for OK, nonzero for unsupported */
 
-.globl __cpuid
+#include <machine/asm.h>
 
-.text
-__cpuid:
+ENTRY(_cpuid)
 /* save work registers */
        push    %ebp
        push    %ebx
index 0c9b598fefabc413f6e6beafb15d840575d56b5f..cf7251cb8c5e94263a641ad6d5aed675aafc8156 100644 (file)
@@ -2,10 +2,9 @@
 /*     alloca() - allocate space on the stack          Author: Kees J. Bot */
 /*                                                             2 Dec 1993 */
 
-.text
-.balign        16
-.globl _alloca
-_alloca:
+#include <machine/asm.h>
+
+ENTRY(alloca)
 #if __ACK__
        pop     %ecx    /* Return address */
        pop     %eax    /* Bytes to allocate */
index 0da4e61bdd24cbda42c666066d07a4215bfd8816..8b0a2de3be9652989c6d8ec513b3646c76907366 100644 (file)
@@ -4,10 +4,9 @@
 /* */
 /* Created:    Sep 7, 1992 by Philip Homburg */
 
+#include <machine/asm.h>
 
-.text
-.globl _get_bp
-_get_bp:
+ENTRY(get_bp)
        movl    %ebp, %eax
        ret
 
index f4b893b1b4dce5f3a92c7c0bd21af532053d5f24..f1daeba07dbcce3eb384d7ffb596ad678188a964 100644 (file)
@@ -1,14 +1,10 @@
 /*     getprocessor() - determine processor type       Author: Kees J. Bot */
 /*                                                             26 Jan 1994 */
-
-.text
+#include <machine/asm.h>
 
 /* int getprocessor(void); */
 /*     Return 386, 486, 586, ... */
-
-.globl _getprocessor
-
-_getprocessor:
+ENTRY(getprocessor)
        push    %ebp
        movl    %esp, %ebp
        andl    $0xFFFFFFFC, %esp       /* Align stack to avoid AC fault */
index 0d162d3f9841e5c7a9ef781123922422167a5490..518fa00886898de8427084d68cf9f7106e1cba85 100644 (file)
@@ -2,12 +2,9 @@
 /*                                                             9 May 1995 */
 /* See RFC 1071, "Computing the Internet checksum" */
 /* See also the C version of this code. */
+#include <machine/asm.h>
 
-.text
-
-.globl _oneC_sum
-.balign        16
-_oneC_sum:
+ENTRY(oneC_sum)
        push    %ebp
        movl    %esp, %ebp
        push    %esi
@@ -36,7 +33,7 @@ aligned:
        adcl    $0, %eax        /* Add carry back in for one`s complement */
 
        jmp     add6test
-.balign        16
+_ALIGN_TEXT
 add6:
        addl    (%esi), %eax    /* Six times unrolled loop, see below */
        adcl    4(%esi), %eax
@@ -52,7 +49,7 @@ add6test:
        addl    $24, %edi
 
        jmp     add1test
-.balign        16
+_ALIGN_TEXT
 add1:
        addl    (%esi), %eax    /* while ((edi -= 4) >= 0) */
        adcl    $0, %eax        /*      eax += *esi++; */
@@ -83,7 +80,7 @@ done:
 #else
 .data
 #endif
-.balign        4
+.balign 4
 mask:
 .long  0x000000FF, 0x0000FFFF, 0x00FFFFFF
 
index 623faaf290992ca3d7ebc999fa769134b5deecf0..27e237e364c0b237d3826b9c8b58c2bfd57aa261 100644 (file)
@@ -1,3 +1,4 @@
+#include <machine/asm.h>
 
 #ifdef __ACK__
 .text
@@ -14,9 +15,11 @@ begdata:
 begbss:
 #endif
 
-.extern _getuctx
-.extern _setuctx
-.extern _resumecontext
+
+IMPORT(getuctx)
+IMPORT(setuctx)
+IMPORT(resumecontext)
+
 
 /* Offsets into ucontext_t structure. Keep in sync with <sys/ucontext.h>! */
 #define UC_FLAGS       0 
@@ -55,16 +58,11 @@ begbss:
 #define EFAULT         14
 #define EINVAL                 22
 
+
 /* int getcontext(ucontext_t *ucp) 
  *     Initialise the structure pointed to by ucp to the current user context
  *     of the calling thread. */
-
-
-.text
-
-.globl _getcontext
-.balign        16
-_getcontext:
+ENTRY(getcontext)
        /* In case a process does not use the FPU and is neither interested in
         * saving its signal mask, then we can skip the context switch to
         * PM and kernel altogether and only save general-purpose registers. */
@@ -78,7 +76,7 @@ _getcontext:
        /* Check null pointer */
        cmp $0, %edx                    /* edx == NULL? */
        jne 3f                          /* Not null, continue */
-       movl $EFAULT, (_errno) 
+       movl $EFAULT, (_C_LABEL(errno))
        xor %eax, %eax
        dec %eax                        /* return -1 */
        ret
@@ -98,7 +96,7 @@ _getcontext:
 0:
        push %ecx                       /* Save ecx */
        push %edx                
-       call _getuctx                   /* getuctx(ucp) */
+       call _C_LABEL(getuctx)          /* getuctx(ucp) */
        pop %edx                        /* clean up stack and restore edx */
        pop %ecx                        /* Restore ecx */
 
@@ -131,12 +129,7 @@ _getcontext:
  *     program execution continues as if the corresponding call of getcontext()
  *     had just returned. If ucp was created with makecontext(), program
  *     execution continues with the function passed to makecontext(). */
-.text
-
-.globl _setcontext
-.balign        16
-_setcontext:
+ENTRY(setcontext)
        /* In case a process does not use the FPU and is neither interested in
         * restoring its signal mask, then we can skip the context switch to
         * PM and kernel altogether and restore state here. */
@@ -146,7 +139,7 @@ _setcontext:
        /* Check null pointer */
        cmp $0, %edx                    /* edx == NULL? */
        jnz 3f                          /* Not null, continue */
-       movl $EFAULT, (_errno)
+       movl $EFAULT, (_C_LABEL(errno))
        xor %eax, %eax
        dec %eax                        /* return -1 */
        ret
@@ -158,7 +151,7 @@ _setcontext:
        pop %ebx                        /* restore ebx */
        cmp $MCF_MAGIC, %ecx    /* is the magic value set (is context valid)?*/
        jz 4f                           /* is set, proceed */
-       movl $EINVAL, (_errno)          /* not set, return error code */
+       movl $EINVAL, (_C_LABEL(errno)) /* not set, return error code */
        xor %eax, %eax
        dec %eax                        /* return -1 */
        ret     
@@ -176,7 +169,7 @@ _setcontext:
 
 0:     push %ecx                       /* Save ecx */
        push %edx                
-       call _setuctx                   /* setuctx(ucp) */
+       call _C_LABEL(setuctx)          /* setuctx(ucp) */
        pop %edx                        /* Clean up stack and restore edx */
        pop %ecx                        /* Restore ecx */
 
@@ -200,12 +193,7 @@ _setcontext:
  *     arguments to `func' from the stack. Finally, a call to resumecontext
  *     will start the next context in the linked list (or exit the program if
  *     there is no context). */
-
-.text
-
-.globl _ctx_start
-.balign        16
-_ctx_start:
+ENTRY(ctx_start)
        /* 0(esp) -> func
         * 4(esp) -> arg1
         * ...
@@ -216,7 +204,7 @@ _ctx_start:
        call *%eax                      /* func(arg1, ..., argn) */
        mov %esi, %esp                  /* Clean up stack */
        /* ucp is now at the top of the stack again */
-       call _resumecontext     /* resumecontext(ucp) */
+       call _C_LABEL(resumecontext)    /* resumecontext(ucp) */
        ret                     /* never reached */
 
 
index 66f5cf44f3e91f280f5f447ff7180623e48e73db..01182b0580f74ff1a8df0ebdc38a7ae9f1b75d68 100644 (file)
@@ -1,9 +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:
+/* It calls _sigreturn, which is the normal "system call" routine. */
+/* Both __sigreturn and _sigreturn are needed. */
+#include <machine/asm.h>
+
+IMPORT(_sigreturn)
+ENTRY(__sigreturn)
        addl    $16, %esp
-       jmp     __sigreturn
+       jmp     _C_LABEL(_sigreturn)
index 399bd7508fb2dfdc04341fe21e518c9254b4c4e5..5d5d778116a8d20ade28c054e360cc00c4a5848d 100644 (file)
@@ -1,6 +1,5 @@
 #include <minix/ipcconst.h>
-
-.globl __notify, __send, __senda, __sendnb, __receive, __sendrec, __do_kernel_call
+#include <machine/asm.h>
 
        IPCVEC = 33     /* ipc trap to kernel  */
        KERVEC = 32     /* syscall trap to kernel */
@@ -13,8 +12,7 @@
 /*                           IPC assembly routines                       * */
 /**========================================================================* */
 /* all message passing routines save ebx, but destroy eax and ecx. */
-.text
-__send:
+ENTRY(_send)
        push    %ebp
        movl    %esp, %ebp
        push    %ebx
@@ -26,7 +24,7 @@ __send:
        pop     %ebp
        ret
 
-__receive:
+ENTRY(_receive)
        push    %ebp
        movl    %esp, %ebp
        push    %ebx
@@ -40,7 +38,7 @@ __receive:
        pop     %ebp
        ret
 
-__sendrec:
+ENTRY(_sendrec)
        push    %ebp
        movl    %esp, %ebp
        push    %ebx
@@ -52,7 +50,7 @@ __sendrec:
        pop     %ebp
        ret
 
-__notify:
+ENTRY(_notify)
        push    %ebp
        movl    %esp, %ebp
        push    %ebx
@@ -63,7 +61,7 @@ __notify:
        pop     %ebp
        ret
 
-__sendnb:
+ENTRY(_sendnb)
        push    %ebp
        movl    %esp, %ebp
        push    %ebx
@@ -75,7 +73,7 @@ __sendnb:
        pop     %ebp
        ret
 
-__do_kernel_call:
+ENTRY(_do_kernel_call)
        /* pass the message pointer to kernel in the %eax register */
        movl    4(%esp), %eax
        int     $KERVEC
index 614b1ae00d83970dbde4a34b7bf064ed2d10a0de..a38c2c9fc0274ddffe53e87ccc96c330b71ed31e 100644 (file)
@@ -1,15 +1,12 @@
 #include <minix/ipcconst.h>
-
-.globl __senda
+#include <machine/asm.h>
 
        SYSVEC = 33
 
        MSGTAB = 8      /* message table */
        TABCOUNT = 12   /* number of entries in message table */
 
-.text
-
-__senda:
+ENTRY(_senda)
        push    %ebp
        movl    %esp, %ebp
        push    %ebx
index 0fa693f3ce569ee8c1e5a822b3690974e7dd38bf..8e8579071e852afc5e01dc0773b1f5813fe676c2 100644 (file)
@@ -4,10 +4,9 @@
 /* void *_memmove(void *s1, const void *s2, size_t n) */
 /*     Copy a chunk of memory.  Handle overlap. */
 /* */
-.text
-.globl __memmove, __memcpy
-.balign        16
-__memmove:
+#include <machine/asm.h>
+
+ENTRY(_memmove)
        push    %ebp
        movl    %esp, %ebp
        push    %esi
@@ -19,7 +18,7 @@ __memmove:
        subl    %esi, %eax
        cmpl    %ecx, %eax
        jb      downwards       /* if (s2 - s1) < n then copy downwards */
-__memcpy:
+LABEL(_memcpy)
        cld     /* Clear direction bit: upwards */
        cmpl    $16, %ecx
        jb      upbyte  /* Don't bother being smart with short arrays */
index aaa62f07f1b5c3c33e043ab509c849eaa9491219..d985751f2fa7d0108422fc6e67b23607a5d91a37 100644 (file)
@@ -4,10 +4,9 @@
 /* char *_strncat(char *s1, const char *s2, size_t edx) */
 /*     Append string s2 to s1. */
 /* */
-.text
-.globl __strncat
-.balign        16
-__strncat:
+#include <machine/asm.h>
+
+ENTRY(_strncat)
        push    %ebp
        movl    %esp, %ebp
        push    %esi
index c4f89705bf60d262842b57985ac6ee57e3fa8ccb..9fb90ca10d2842707b3ee91b707966ea894f4c85 100644 (file)
@@ -4,10 +4,9 @@
 /* int strncmp(const char *s1, const char *s2, size_t ecx) */
 /*     Compare two strings. */
 /* */
-.text
-.globl __strncmp
-.balign        16
-__strncmp:
+#include <machine/asm.h>
+
+ENTRY(_strncmp)
        push    %ebp
        movl    %esp, %ebp
        push    %esi
index 63bd6fcee3b0e1404065042f1a5542a9d1991d6c..9128d8d0a5a1aab3e82d39cc0fb9af7a16fce892 100644 (file)
@@ -4,10 +4,9 @@
 /* char *_strncpy(char *s1, const char *s2, size_t ecx) */
 /*     Copy string s2 to s1. */
 /* */
-.text
-.globl __strncpy
-.balign        16
-__strncpy:
+#include <machine/asm.h>
+
+ENTRY(_strncpy)
        movl    12(%ebp), %edi  /* edi = string s2 */
        xorb    %al, %al        /* Look for a zero byte */
        movl    %ecx, %edx      /* Save maximum count */
index 46bbf7dc07a397fba18a67639b5789fec98bbb0e..9d586a7ee393fcb7ffd3a72b1a3504dc3a0eae49 100644 (file)
@@ -4,10 +4,9 @@
 /* size_t _strnlen(const char *s, size_t ecx) */
 /*     Return the length of a string. */
 /* */
-.text
-.globl __strnlen
-.balign        16
-__strnlen:
+#include <machine/asm.h>
+
+ENTRY(_strnlen)
        push    %ebp
        movl    %esp, %ebp
        push    %edi
index f976534b93c65d7492b4aa7abb9ac5716bdda3b7..ece14b4c03b6852340689d1ff35542d4314b170e 100644 (file)
@@ -7,16 +7,15 @@
 /*     (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:
+#include <machine/asm.h>
+
+ENTRY(bcmp)
        push    %ebp
        movl    %esp, %ebp
        push    16(%ebp)
        push    12(%ebp)
        push    8(%ebp)
-       call    _memcmp /* Let memcmp do the work */
+       call    _C_LABEL(memcmp) /* Let memcmp do the work */
        testl   %eax, %eax
        je      equal
        subl    8(%ebp), %edx   /* Memcmp was nice enough to leave "esi" in edx */
index 47540d291a9dad489c56be1e42279f2a426b6399..9d68340e5376e423d415e95cc19d14f56c061e94 100644 (file)
@@ -5,11 +5,10 @@
 /*     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:
+#include <machine/asm.h>
+
+ENTRY(bcopy)
        movl    4(%esp), %eax   /* Exchange string arguments */
        xchgl   8(%esp), %eax
        movl    %eax, 4(%esp)
-       jmp     __memmove       /* Call the proper routine */
+       jmp     _C_LABEL(_memmove) /* Call the proper routine */
index 07f0db09e1dead3dbc33dc64df26b7f3b9807fbd..0782164ba3a50d9997f6bff51ce436ec32747de2 100644 (file)
@@ -5,15 +5,14 @@
 /*     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:
+#include <machine/asm.h>
+
+ENTRY(bzero)
        push    %ebp
        movl    %esp, %ebp
        push    12(%ebp)        /* Size */
        push    $0      /* Zero */
        push    8(%ebp) /* String */
-       call    _memset /* Call the proper routine */
+       call    _C_LABEL(memset) /* Call the proper routine */
        leave
        ret
index 12ea7ea52eebb640f603c925919036efc8974ef7..6d77cef408dc03096b935ca656c3002fe565a5af 100644 (file)
@@ -5,8 +5,7 @@
 /*     Look for a character in a string.  Has suffered from a hostile */
 /*     takeover by strchr(). */
 /* */
-.text
-.globl _index
-.balign        16
-_index:
-       jmp     _strchr
+#include <machine/asm.h>
+
+ENTRY(index)
+       jmp     _C_LABEL(strchr)
index 7607374fc3be8aa1dfb9231ea419544d28ffd0ac..64a5df2dc75bce26bf830c2a355b7571e5169289 100644 (file)
@@ -4,10 +4,9 @@
 /* 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:
+#include <machine/asm.h>
+
+ENTRY(memchr)
        push    %ebp
        movl    %esp, %ebp
        push    %edi
index 6a2c5a97d504aa2f67aff55b83786bb8caa14856..e7e23d9c21c4786936d16c2a05744efcc95b8495 100644 (file)
@@ -4,10 +4,9 @@
 /* int memcmp(const void *s1, const void *s2, size_t n) */
 /*     Compare two chunks of memory. */
 /* */
-.text
-.globl _memcmp
-.balign        16
-_memcmp:
+#include <machine/asm.h>
+
+ENTRY(memcmp)
        cld
        push    %ebp
        movl    %esp, %ebp
index ed698423efbec9fc008aa56d42443a97ef986dbb..98c79921f4af81b6c015b79deb00c1780de7b687 100644 (file)
@@ -8,10 +8,9 @@
 /*     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:
+#include <machine/asm.h>
+
+ENTRY(memcpy)
        push    %ebp
        movl    %esp, %ebp
        push    %esi
@@ -20,4 +19,4 @@ _memcpy:
        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 */
+       jmp     _C_LABEL(_memcpy) /* Call the part of __memmove that copies up */
index f42ce0543b9171b7bc265cecff0bbf570c2d051c..b790464ac7cb93591361586258938916a43f11b9 100644 (file)
@@ -4,8 +4,7 @@
 /* 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 */
+#include <machine/asm.h>
+
+ENTRY(memmove)
+       jmp     _C_LABEL(_memmove)      /* Call common code */
index 22f0836791788e06ae0dd2a6171021f099d65655..16d016643828789c62fff0eeeaa73e20b4b75fdc 100644 (file)
@@ -4,10 +4,9 @@
 /* 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:
+#include <machine/asm.h>
+
+ENTRY(memset)
        push    %ebp
        movl    %esp, %ebp
        push    %edi
index 24e9cfb383734265a6b64657d669c4843057e38e..b2073bd23e7ad5501edf64ad8ab8ec54602241f8 100644 (file)
@@ -5,8 +5,7 @@
 /*     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
+#include <machine/asm.h>
+
+ENTRY(rindex)
+       jmp     _C_LABEL(strrchr)
index 9b9df6b4524737afe6ab4ce5370965a5d1ebf0f5..589da58af80021f888eb776be6a1b9507a94f3ef 100644 (file)
@@ -4,9 +4,8 @@
 /* char *strcat(char *s1, const char *s2) */
 /*     Append string s2 to s1. */
 /* */
-.text
-.globl _strcat
-.balign        16
-_strcat:
+#include <machine/asm.h>
+
+ENTRY(strcat)
        movl    $-1, %edx       /* Unlimited length */
-       jmp     __strncat       /* Common code */
+       jmp     _C_LABEL(_strncat) /* Common code */
index 4c10f59c8da888034f7b4de09bca86ad1e6ca009..3f27568901b7f92632d9b4d1de66e8ac7b51439f 100644 (file)
@@ -4,10 +4,9 @@
 /* char *strchr(const char *s, int c) */
 /*     Look for a character in a string. */
 /* */
-.text
-.globl _strchr
-.balign        16
-_strchr:
+#include <machine/asm.h>
+
+ENTRY(strchr)
        push    %ebp
        movl    %esp, %ebp
        push    %edi
index 2cb1e08439f7f1cb215798f498a4dfd4118419cc..9d577394f3b01892753d29e6372c97ed06c0d21b 100644 (file)
@@ -4,9 +4,8 @@
 /* int strcmp(const char *s1, const char *s2) */
 /*     Compare two strings. */
 /* */
-.text
-.globl _strcmp
-.balign        16
-_strcmp:
+#include <machine/asm.h>
+
+ENTRY(strcmp)
        movl    $-1, %ecx       /* Unlimited length */
-       jmp     __strncmp       /* Common code */
+       jmp     _C_LABEL(_strncmp) /* Common code */
index d7affdc230a9b042795c83e8fa9fe6973b098ee4..03be30d876b0d76d0eb22da623e434d83178ed4d 100644 (file)
@@ -4,16 +4,15 @@
 /* char *strcpy(char *s1, const char *s2) */
 /*     Copy string s2 to s1. */
 /* */
-.text
-.globl _strcpy
-.balign        16
-_strcpy:
+#include <machine/asm.h>
+
+ENTRY(strcpy)
        push    %ebp
        movl    %esp, %ebp
        push    %esi
        push    %edi
        movl    $-1, %ecx       /* Unlimited length */
-       call    __strncpy       /* Common code */
+       call    _C_LABEL(_strncpy) /* Common code */
        movl    8(%ebp), %eax   /* Return s1 */
        pop     %edi
        pop     %esi
index 6b38c198fdbf35b4e0f68cb255822f16db8d3a2f..1dd4aea0ab2e23958621f188dfcd5c3dff3d19f7 100644 (file)
@@ -4,9 +4,8 @@
 /* size_t strlen(const char *s) */
 /*     Return the length of a string. */
 /* */
-.text
-.globl _strlen
-.balign        16
-_strlen:
+#include <machine/asm.h>
+
+ENTRY(strlen)
        movl    $-1, %ecx       /* Unlimited length */
-       jmp     __strnlen       /* Common code */
+       jmp     _C_LABEL(_strnlen) /* Common code */
index a2ac7d7e9d7e6c683df3485ad287bbc49f298288..23731e7067b5dc44709e21892e829d3384498090 100644 (file)
@@ -4,9 +4,8 @@
 /* size_t strncat(char *s1, const char *s2, size_t n) */
 /*     Append string s2 to s1. */
 /* */
-.text
-.globl _strncat
-.balign        16
-_strncat:
+#include <machine/asm.h>
+
+ENTRY(strncat)
        movl    12(%esp), %edx  /* Maximum length */
-       jmp     __strncat       /* Common code */
+       jmp     _C_LABEL(_strncat) /* Common code */
index a95349b018171fefea34dae45b310e259b079671..0c5b8ba2a489bb85e78344c7dfb66613f5b79ba3 100644 (file)
@@ -4,9 +4,8 @@
 /* int strncmp(const char *s1, const char *s2, size_t n) */
 /*     Compare two strings. */
 /* */
-.text
-.globl _strncmp
-.balign        16
-_strncmp:
+#include <machine/asm.h>
+
+ENTRY(strncmp)
        movl    12(%esp), %ecx  /* Maximum length */
-       jmp     __strncmp       /* Common code */
+       jmp     _C_LABEL(_strncmp) /* Common code */
index f903dbba9e36278b64cad000014061c1674b38b5..cc70ab5fab18db517d4d216c4c645e623febab46 100644 (file)
@@ -4,16 +4,15 @@
 /* char *strncpy(char *s1, const char *s2, size_t n) */
 /*     Copy string s2 to s1. */
 /* */
-.text
-.globl _strncpy
-.balign        16
-_strncpy:
+#include <machine/asm.h>
+
+ENTRY(strncpy)
        push    %ebp
        movl    %esp, %ebp
        push    %esi
        push    %edi
        movl    16(%ebp), %ecx  /* Maximum length */
-       call    __strncpy       /* Common code */
+       call    _C_LABEL(_strncpy) /* Common code */
        movl    %edx, %ecx      /* Number of bytes not copied */
 
        rep stosb       /* strncpy always copies n bytes by null padding */
index 2551f86e40b0a54a5ed4433e9b98892b3adcf8ba..f4d27d44b6b5e4aaa712c74767020d451a72e7a8 100644 (file)
@@ -4,9 +4,8 @@
 /* size_t strnlen(const char *s, size_t n) */
 /*     Return the length of a string. */
 /* */
-.text
-.globl _strnlen
-.balign        16
-_strnlen:
+#include <machine/asm.h>
+
+ENTRY(strnlen)
        movl    8(%esp), %ecx   /* Maximum length */
-       jmp     __strnlen       /* Common code */
+       jmp     _C_LABEL(_strnlen) /* Common code */
index 74c03e431027b68097f847c9f62770267edeb440..a124635053489b4545c8683cfec715fdbaff3aa7 100644 (file)
@@ -4,10 +4,9 @@
 /* char *strrchr(const char *s, int c) */
 /*     Look for the last occurrence a character in a string. */
 /* */
-.text
-.globl _strrchr
-.balign        16
-_strrchr:
+#include <machine/asm.h>
+
+ENTRY(strrchr)
        push    %ebp
        movl    %esp, %ebp
        push    %edi
index eb2b25f394f7911f49f8b250acddeac7b91f3084..51e2f1270ae968afdf372cb73c87efce8b1cbaca 100644 (file)
@@ -1,10 +1,9 @@
 / __setjmp.gnu.s
 /
 / Created:     Oct 14, 1993 by Philip Homburg <philip@cs.vu.nl>
+#include <machine/asm.h>
 
-.text
-.globl ___setjmp
-___setjmp:
+ENTRY(__setjmp)
        movl    4(%esp), %eax           /* jmp_buf */
        movl    %edx, 28(%eax)          /* save edx */
        movl    0(%esp), %edx
@@ -22,7 +21,7 @@ ___setjmp:
        jz              1f
        leal    4(%eax), %edx           /* pointer to sigset_t */
        push    %edx
-       call    ___newsigset            /* save mask     */
+       call    _C_LABEL(__newsigset)   /* save mask     */
        addl    $4, %esp
 1:
        movl    $0, %eax
index 91ce07a234930b64476d59bb57a6c35b78b7ed5a..8194b2097c1daa6426fc3129d24998ae182966b9 100644 (file)
@@ -1,16 +1,15 @@
 / longjmp.gnu.s
 /
 / Created:     Oct 15, 1993 by Philip Homburg <philip@cs.vu.nl>
+#include <machine/asm.h>
 
-.text
-.globl _longjmp
-_longjmp:
+ENTRY(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 */
+       call    _C_LABEL(__oldsigset)   /* restore mask */
        addl    $4, %esp
        movl    4(%esp), %eax           /* jmp_buf */
 1:
index 854f70880f493df4708286ea41fd09a0305ab9d2..470ebaec8338b14ed32dbad26ac5bb9a9a17c6ca 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        ___exit
-.globl __exit
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(__exit)
+ENTRY(_exit)
+       jmp     _C_LABEL(__exit)
 
-__exit:
-       jmp     ___exit
index 52f8eeaef13e3fa8c973852b71334b02d9d9fa12..ce0c9549561b54a03763d8c2cbb8ea9e5e2d9065 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        ___pm_findproc
-.globl __pm_findproc
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(__pm_findproc)
+ENTRY(_pm_findproc)
+       jmp     _C_LABEL(__pm_findproc)
 
-__pm_findproc:
-       jmp     ___pm_findproc
index 635c7b92ca4c6e76ab2a58796787a5c9c8ca8b31..1e0a86ef294a23ffbb0b32c2b4f3c079be4df19c 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __access
-.globl _access
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_access)
+ENTRY(access)
+       jmp     _C_LABEL(_access)
 
-_access:
-       jmp     __access
index d911015dbde7823137fffafd17bdb71f805e612f..37af0c957081db22b1f18eeef3e312aadb6701a4 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __adddma
-.globl _adddma
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_adddma)
+ENTRY(adddma)
+       jmp     _C_LABEL(_adddma)
 
-_adddma:
-       jmp     __adddma
index 1dc3116b8ee49f826f42a836cdd41b79f4193892..5256d706f6d1093f5076b7521ba5108034c31653 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __alarm
-.globl _alarm
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_alarm)
+ENTRY(alarm)
+       jmp     _C_LABEL(_alarm)
 
-_alarm:
-       jmp     __alarm
index e176f844e171e9da0a69ad89e89c04b7c25ef88e..c097632da951b7f136f4ab90a3c8c30a48930ec6 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __brk
-.globl _brk
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_brk)
+ENTRY(brk)
+       jmp     _C_LABEL(_brk)
 
-_brk:
-       jmp     __brk
index 7f889edf1335ad82ae4f2fe7ed7140e9a1c76a72..9e308bcb958ce688c908c267a0fa46c238222dc6 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __cfgetispeed
-.globl _cfgetispeed
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_cfgetispeed)
+ENTRY(cfgetispeed)
+       jmp     _C_LABEL(_cfgetispeed)
 
-_cfgetispeed:
-       jmp     __cfgetispeed
index 2566bef77edc5ac87eb1298b2750b46d5acfe9ff..a2734e33d576c81768bd6d69f649578ff7cedf98 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __cfgetospeed
-.globl _cfgetospeed
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_cfgetospeed)
+ENTRY(cfgetospeed)
+       jmp     _C_LABEL(_cfgetospeed)
 
-_cfgetospeed:
-       jmp     __cfgetospeed
index e3a2b962d26f57bb3332fa1f4d87a36f8ffdda83..230b9bb157f7445befba4b9b3a84b84a73d1c074 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __cfsetispeed
-.globl _cfsetispeed
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_cfsetispeed)
+ENTRY(cfsetispeed)
+       jmp     _C_LABEL(_cfsetispeed)
 
-_cfsetispeed:
-       jmp     __cfsetispeed
index 29bd8d9e022bc9e875b8a34e7201ac688537f238..d6b1cead4373cc29a709c711bdd46e51ce74dae7 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __cfsetospeed
-.globl _cfsetospeed
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_cfsetospeed)
+ENTRY(cfsetospeed)
+       jmp     _C_LABEL(_cfsetospeed)
 
-_cfsetospeed:
-       jmp     __cfsetospeed
index 941ef95501e2e0abbf9e2ea8efe579604009b1e3..e234a244e9157d5d4eeedeb1e9231be821e01a2e 100644 (file)
@@ -1,11 +1,10 @@
-.text
-.extern        __chdir
-.globl _chdir
-.extern        __fchdir
-.globl _fchdir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_chdir)
+ENTRY(chdir)
+       jmp     _C_LABEL(_chdir)
+
+IMPORT(_fchdir)
+ENTRY(fchdir)
+       jmp     _C_LABEL(_fchdir)
 
-_chdir:
-       jmp     __chdir
-_fchdir:
-       jmp     __fchdir
index 629d40cd8ae4d333dfea09c5fc8dd99e274cf719..cb78d3f9c0909f8012d8e7e013325e3537a03df6 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __chmod
-.globl _chmod
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_chmod)
+ENTRY(chmod)
+       jmp     _C_LABEL(_chmod)
 
-_chmod:
-       jmp     __chmod
index 9318670e65ce6fa1b35ed5afee264d9396f84797..c93bc4edd352f39e037422fc222924ac5a8a0b80 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __chown
-.globl _chown
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_chown)
+ENTRY(chown)
+       jmp     _C_LABEL(_chown)
 
-_chown:
-       jmp     __chown
index 4e091ee4879fb71a806321fbd3873fc069ddc73f..fa5985108ac7f8b770459d4ea0132c0989928be4 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __chroot
-.globl _chroot
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_chroot)
+ENTRY(chroot)
+       jmp     _C_LABEL(_chroot)
 
-_chroot:
-       jmp     __chroot
index 9f87c3dcd5c888fef17f90f4b41d48e1430daa54..34fc82677855df993c1f08cdc0bda55ba0a26f8d 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __close
-.globl _close
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_close)
+ENTRY(close)
+       jmp     _C_LABEL(_close)
 
-_close:
-       jmp     __close
index 3164858fe2884e6c27477f9fd8d994b119cd5fab..56a42614cc3c4d5aeefadd78eb1bb8366e87a0aa 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __closedir
-.globl _closedir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_closedir)
+ENTRY(closedir)
+       jmp     _C_LABEL(_closedir)
 
-_closedir:
-       jmp     __closedir
index 7bcfe8defccddf131f95b413ea47608672407417..5622ec6656ff3b617486a340e5257e62bb16ba3d 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __cprofile
-.globl _cprofile
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_cprofile)
+ENTRY(cprofile)
+       jmp     _C_LABEL(_cprofile)
 
-_cprofile:
-       jmp     __cprofile
index 0d3cc2b58ab0f667c5cc30006699642e877aef42..82cf0d368604634ac13bb4383a6ad1fc071c0c76 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __creat
-.globl _creat
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_creat)
+ENTRY(creat)
+       jmp     _C_LABEL(_creat)
 
-_creat:
-       jmp     __creat
index a15c442b97d5d043c78a3400ecf0b0a7b10fc0c9..98a452e0c9ec42d948e4bff0581195d1468d0290 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __deldma
-.globl _deldma
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_deldma)
+ENTRY(deldma)
+       jmp     _C_LABEL(_deldma)
 
-_deldma:
-       jmp     __deldma
index 1957b693178d00d28b6480b1337e1166b6759a15..a318063efda7582e9a4bf743f93eb4fdd2fc0d8c 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __dup
-.globl _dup
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_dup)
+ENTRY(dup)
+       jmp     _C_LABEL(_dup)
 
-_dup:
-       jmp     __dup
index 26f426e212848594fb8cc067d3f4a5bbeb67ccef..2cefff8934ad98adbc79b56a124d97ecf2a3eb19 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __dup2
-.globl _dup2
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_dup2)
+ENTRY(dup2)
+       jmp     _C_LABEL(_dup2)
 
-_dup2:
-       jmp     __dup2
index 6c44c28f702696d3278408706faba16cd556c683..89368f4736d16fad32d7613f9113b47e2fb50aa1 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __execl
-.globl _execl
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_execl)
+ENTRY(execl)
+       jmp     _C_LABEL(_execl)
 
-_execl:
-       jmp     __execl
index 8f7b3697b8a2d78ce7cbe872e32a1cc26e04d5c2..cd221e4dc6b8a95c1586fbdaaf7538bc890ec8ad 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __execle
-.globl _execle
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_execle)
+ENTRY(execle)
+       jmp     _C_LABEL(_execle)
 
-_execle:
-       jmp     __execle
index c35d4ea626ae2f06de64325f2bb75bcffe8c56bf..aea8517fca992a380bf1fe60aff2df96f4c5d96c 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __execlp
-.globl _execlp
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_execlp)
+ENTRY(execlp)
+       jmp     _C_LABEL(_execlp)
 
-_execlp:
-       jmp     __execlp
index 991c24ea07129b167c5de90cb0365487c3747b2d..25ceaeebc07f72096b35d9fb2b451425cd21fa8c 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __execv
-.globl _execv
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_execv)
+ENTRY(execv)
+       jmp     _C_LABEL(_execv)
 
-_execv:
-       jmp     __execv
index 818756fb0965a9d5e4c7062267e950e1c22e6bb2..1cc63b814c39b56cc5db4c4580287b8caebf4f0f 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __execve
-.globl _execve
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_execve)
+ENTRY(execve)
+       jmp     _C_LABEL(_execve)
 
-_execve:
-       jmp     __execve
index cb2d66aad6fc7acc7b5ff0b26fb8bdbdfda290a2..aefdb285da8b299c5507ae773875a6ca99cabca4 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __execvp
-.globl _execvp
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_execvp)
+ENTRY(execvp)
+       jmp     _C_LABEL(_execvp)
 
-_execvp:
-       jmp     __execvp
index 1eba9dd53c48ce6855ba231ea77cb300281bfed3..ce219df3dbac83de8d1e8dc31f41203b3035fecb 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fchmod
-.globl _fchmod
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fchmod)
+ENTRY(fchmod)
+       jmp     _C_LABEL(_fchmod)
 
-_fchmod:
-       jmp     __fchmod
index 91bf31b09164d25aeabe83891bca643a06d45695..6d23bf9ccd5d4e80c36d0d414415c51998c9e2af 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fchown
-.globl _fchown
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fchown)
+ENTRY(fchown)
+       jmp     _C_LABEL(_fchown)
 
-_fchown:
-       jmp     __fchown
index d3ce7d71fefa952ff263a99306c5a7096d135a00..804b2b3fcb3b20a83a40fad586db4b4b8b6fd684 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fcntl
-.globl _fcntl
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fcntl)
+ENTRY(fcntl)
+       jmp     _C_LABEL(_fcntl)
 
-_fcntl:
-       jmp     __fcntl
index ef5101e16a9c5e1413cd26e88dbd6b4e6edf0f2c..a0fa84fa7a99b6928c4a178618780e55c54722a8 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fork
-.globl _fork
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fork)
+ENTRY(fork)
+       jmp     _C_LABEL(_fork)
 
-_fork:
-       jmp     __fork
index 2b556ddcceb81c9cccc458940ec97a14b2eeaffc..970e756178b59690e0de3d6ea74e6a99558fdac8 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fpathconf
-.globl _fpathconf
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fpathconf)
+ENTRY(fpathconf)
+       jmp     _C_LABEL(_fpathconf)
 
-_fpathconf:
-       jmp     __fpathconf
index 64e1c14044fe20199ae0f51438a6f9278d803d44..d419ef5f1122dba7c4ca68f2efca3c2525d6bb8a 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fstat
-.globl _fstat
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fstat)
+ENTRY(fstat)
+       jmp     _C_LABEL(_fstat)
 
-_fstat:
-       jmp     __fstat
index 9c35e84658e3afa941bd53e8720152c9be9e5f3a..1b9eba44b69ff954305916249941108e34d0c84f 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fstatfs
-.globl _fstatfs
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fstatfs)
+ENTRY(fstatfs)
+       jmp     _C_LABEL(_fstatfs)
 
-_fstatfs:
-       jmp     __fstatfs
index 096218c54c1b678e46467cb1186b8de23c179efe..52e2c40767f5aed1089ce540f062638e7bf22bdf 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __fstatvfs
-.globl _fstatvfs
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_fstatvfs)
+ENTRY(fstatvfs)
+       jmp     _C_LABEL(_fstatvfs)
 
-_fstatvfs:
-       jmp     __fstatvfs
index 16b28e314902e9901b12f845aee68b140a0ff8b3..d8a5cc02fccb8ed93b67ba82126235391656c3df 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getcwd
-.globl _getcwd
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getcwd)
+ENTRY(getcwd)
+       jmp     _C_LABEL(_getcwd)
 
-_getcwd:
-       jmp     __getcwd
index 6d7497dc4c2d8379b9c3d722ec10cd3520dc9f1d..cac5c7152e642e0aac9642536fb2c8345f90955a 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getdents
-.globl _getdents
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getdents)
+ENTRY(getdents)
+       jmp     _C_LABEL(_getdents)
 
-_getdents:
-       jmp     __getdents
index 2d0a6513de0e5cee0c1028522fd519f9fc965df0..2439a5b2a7aa64c4098e3421e526771406d19b58 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getdma
-.globl _getdma
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getdma)
+ENTRY(getdma)
+       jmp     _C_LABEL(_getdma)
 
-_getdma:
-       jmp     __getdma
index d7a2115a246a7fdcaddb306aabe379349c6ae5ff..a18d8c7079214ee3c239cb279caf8f3c63f4a70e 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getegid
-.globl _getegid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getegid)
+ENTRY(getegid)
+       jmp     _C_LABEL(_getegid)
 
-_getegid:
-       jmp     __getegid
index 7cfff3cbe3296631fbd9a5d6453b0ec119d0d60a..603371dcd983eccc54b8aacbf64fb56c00eeff61 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __geteuid
-.globl _geteuid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_geteuid)
+ENTRY(geteuid)
+       jmp     _C_LABEL(_geteuid)
 
-_geteuid:
-       jmp     __geteuid
index e62eaa71e9a880a7356ee9e6082bfcc4f5482f19..484da0df3ddb349ffc043b6f18b53e30867cd49d 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getgid
-.globl _getgid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getgid)
+ENTRY(getgid)
+       jmp     _C_LABEL(_getgid)
 
-_getgid:
-       jmp     __getgid
index cffb429995fdda94ed91ded0ae7e015a08e0e967..3c7de3d43c6209314082ba6c514353d2bf199f33 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getgroups
-.globl _getgroups
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getgroups)
+ENTRY(getgroups)
+       jmp     _C_LABEL(_getgroups)
 
-_getgroups:
-       jmp     __getgroups
index a30dba63010e6ddb091850c72f44aea41b835f7c..db20d7862caffbc4047956d1f674b25db7f0b853 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getitimer
-.globl _getitimer
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getitimer)
+ENTRY(getitimer)
+       jmp     _C_LABEL(_getitimer)
 
-_getitimer:
-       jmp     __getitimer
index bbd4a0eb9bd9fac1f68df0f85688d796cf971bd0..d4c51cbc61e14f1b48039b4851b8d14002e30870 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getngid
-.globl _getngid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getngid)
+ENTRY(getngid)
+       jmp     _C_LABEL(_getngid)
 
-_getngid:
-       jmp     __getngid
index f9750665951aea49496adc61236d6010c6ac66ca..3fdf2e99d1f4ca4d8db02c9fe10855a0019e19f1 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getnpid
-.globl _getnpid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getnpid)
+ENTRY(getnpid)
+       jmp     _C_LABEL(_getnpid)
 
-_getnpid:
-       jmp     __getnpid
index 18a44908e60bc5e6bdce7439fddc3de9c6cfb0ed..5006e93c775b4e355b70b74b5f28754df4054a06 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getnprocnr
-.globl _getnprocnr
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getnprocnr)
+ENTRY(getnprocnr)
+       jmp     _C_LABEL(_getnprocnr)
 
-_getnprocnr:
-       jmp     __getnprocnr
index 4e436e64931523c7079bbe4a554a8030cd0848da..c2f1fb9a8a9f31f3be7a616353a2a5bbe0a15529 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getnucred
-.globl _getnucred
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getnucred)
+ENTRY(getnucred)
+       jmp     _C_LABEL(_getnucred)
 
-_getnucred:
-       jmp     __getnucred
index 05c65bb6ae4976de620f2162714d1671916e6266..90296636b98400fcac033ce05ffc56a312375aaa 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getnuid
-.globl _getnuid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getnuid)
+ENTRY(getnuid)
+       jmp     _C_LABEL(_getnuid)
 
-_getnuid:
-       jmp     __getnuid
index 22d79abdd5e3f486d76ea584547bb16dcbb160a9..ba58c212db14caab8597b01cac3f9fb61919c3f2 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getpgrp
-.globl _getpgrp
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getpgrp)
+ENTRY(getpgrp)
+       jmp     _C_LABEL(_getpgrp)
 
-_getpgrp:
-       jmp     __getpgrp
index 474b90b8b0d399eb64f79970edf6adae227b2fe8..211c5fcaecc4d5f81040404f05a00a564964bd6b 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getpid
-.globl _getpid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getpid)
+ENTRY(getpid)
+       jmp     _C_LABEL(_getpid)
 
-_getpid:
-       jmp     __getpid
index 060d9206be773245e7bd19af0d81692ee47e01a0..bda02d518da38422b4e32e45858a390945cda2ea 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getppid
-.globl _getppid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getppid)
+ENTRY(getppid)
+       jmp     _C_LABEL(_getppid)
 
-_getppid:
-       jmp     __getppid
index 647b7d295a30d1936b9b1daa3f899d09234749fa..8172928d3bd3b3232fe22f313dc8dbdd20d16756 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getpprocnr
-.globl _getpprocnr
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getpprocnr)
+ENTRY(getpprocnr)
+       jmp     _C_LABEL(_getpprocnr)
 
-_getpprocnr:
-       jmp     __getpprocnr
index 5b394fb1f7adf69f056dd36188555fab94c69b9b..dd2051a66ccd52a4a96e01e91baa72e07a41b946 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getprocnr
-.globl _getprocnr
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getprocnr)
+ENTRY(getprocnr)
+       jmp     _C_LABEL(_getprocnr)
 
-_getprocnr:
-       jmp     __getprocnr
index e9211e0555305ba89062842bae7e9d14e702047b..26646cd976be5806c1c90303e108b52641ea5675 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getsigset
-.globl _getsigset
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getsigset)
+ENTRY(getsigset)
+       jmp     _C_LABEL(_getsigset)
 
-_getsigset:
-       jmp     __getsigset
index e9bfaae08d5f8cefdd5ae91dde42018bc54703d1..cd413b4b10ddac53eefdfa59d69853de3972c371 100644 (file)
@@ -1,11 +1,10 @@
-.text
-.extern        __getsysinfo
-.globl _getsysinfo
-.extern        __getsysinfo_up
-.globl _getsysinfo_up
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getsysinfo)
+ENTRY(getsysinfo)
+       jmp     _C_LABEL(_getsysinfo)
+
+IMPORT(_getsysinfo_up)
+ENTRY(getsysinfo_up)
+       jmp     _C_LABEL(_getsysinfo_up)
 
-_getsysinfo:
-       jmp     __getsysinfo
-_getsysinfo_up:
-       jmp     __getsysinfo_up
index d703b0d0fdd053b761bfbd051d34aa06b1d94241..712c433f5a32f0aa00c24789d302ae4f50957137 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __getuid
-.globl _getuid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_getuid)
+ENTRY(getuid)
+       jmp     _C_LABEL(_getuid)
 
-_getuid:
-       jmp     __getuid
index 6ede264a383b2a1f910f356904b19611b0496317..d0876cbbf238ce77e868f51fe52f73a3e0976e17 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __ioctl
-.globl _ioctl
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_ioctl)
+ENTRY(ioctl)
+       jmp     _C_LABEL(_ioctl)
 
-_ioctl:
-       jmp     __ioctl
index 24ffe3eb1c22d7391528ddc12e4c6552217c3832..559fd65517ff590fb01368159c55f4bddc140cd9 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __isatty
-.globl _isatty
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_isatty)
+ENTRY(isatty)
+       jmp     _C_LABEL(_isatty)
 
-_isatty:
-       jmp     __isatty
index 396e73ddbbde38fb2295de5e934b6b10914f922a..bbbdcdb3aa056fadfc8b0faa3a559c2594e17cc7 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __kill
-.globl _kill
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_kill)
+ENTRY(kill)
+       jmp     _C_LABEL(_kill)
 
-_kill:
-       jmp     __kill
index f6b17aa1b98fa489c00c72f3423374b451bfee76..cff838f122ec1db5777c288ed2f8e7be10454e5a 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __killpg
-.globl _killpg
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_killpg)
+ENTRY(killpg)
+       jmp     _C_LABEL(_killpg)
 
-_killpg:
-       jmp     __killpg
index 2856aef07dd41c6a2bb1dc1f4453eff7e4c9eb71..b8b01a681f94bf2004be1b2ed4f241f8df230298 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __link
-.globl _link
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_link)
+ENTRY(link)
+       jmp     _C_LABEL(_link)
 
-_link:
-       jmp     __link
index ebca729a415f05e42e8efc556c51c3a12c741d6d..d5d1bea45176207c1ef34803ea1a755175eb892b 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __lseek
-.globl _lseek
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_lseek)
+ENTRY(lseek)
+       jmp     _C_LABEL(_lseek)
 
-_lseek:
-       jmp     __lseek
index 771f5bbf3cdb4c4190c297277cef8c3cf76b784b..b445dd5909a6304d616e01728992024f6661b6bd 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __lseek64
-.globl _lseek64
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_lseek64)
+ENTRY(lseek64)
+       jmp     _C_LABEL(_lseek64)
 
-_lseek64:
-       jmp     __lseek64
index 2361529ccbb7db1736da465f7df0de38671bf8f7..88e7df846bbd00fffd18f1c20548f781752dba41 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __lstat
-.globl _lstat
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_lstat)
+ENTRY(lstat)
+       jmp     _C_LABEL(_lstat)
 
-_lstat:
-       jmp     __lstat
index ac935e0cf2227705f565429ef896f59986c2bd6e..10f328cf0910324947e5f5e6b8d53c8fccf4be78 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __mapdriver
-.globl _mapdriver
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_mapdriver)
+ENTRY(mapdriver)
+       jmp     _C_LABEL(_mapdriver)
 
-_mapdriver:
-       jmp     __mapdriver
index 8abb1f9ee9e18e15472b6ea95823f8c6bf3ba778..20bde084181d499de5c191288f8ee7e8b5480151 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __mkdir
-.globl _mkdir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_mkdir)
+ENTRY(mkdir)
+       jmp     _C_LABEL(_mkdir)
 
-_mkdir:
-       jmp     __mkdir
index 07a29d5aeef3abde623c0573b6750e62163048a8..60df68bbed2e83d1c266b723a883e7276f9ff545 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __mkfifo
-.globl _mkfifo
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_mkfifo)
+ENTRY(mkfifo)
+       jmp     _C_LABEL(_mkfifo)
 
-_mkfifo:
-       jmp     __mkfifo
index 16794f3a0d7ee6c7247319f796a7ed3ec351c012..dd0565c1038d9297c3a853c7cfbf5035fbc7ef93 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __mknod
-.globl _mknod
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_mknod)
+ENTRY(mknod)
+       jmp     _C_LABEL(_mknod)
 
-_mknod:
-       jmp     __mknod
index 6a10fe4b526537ae2b6f371bc0338878adaefcec..d8afedad88172e9f8d4200589d86a1d87886e2f5 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __mmap
-.globl _mmap
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_mmap)
+ENTRY(mmap)
+       jmp     _C_LABEL(_mmap)
 
-_mmap:
-       jmp     __mmap
index 22f09c519be52d0d75794d1647fdfdf7a0dcd42f..0bb46c8cd7b93735fb189c9ad4e652acda9d5bf2 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __mount
-.globl _mount
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_mount)
+ENTRY(mount)
+       jmp     _C_LABEL(_mount)
 
-_mount:
-       jmp     __mount
index c7da555f024e4b8735d30386a79fa015120a296e..5ca046694ec2effffcee961464ed0ec1232ad9c5 100644 (file)
@@ -1,12 +1,10 @@
-.text
-.extern        __munmap
-.globl _munmap
-.extern        __munmap_text
-.globl _munmap_text
-.balign        2
+#include <machine/asm.h>
 
-_munmap:
-       jmp     __munmap
+IMPORT(_munmap)
+ENTRY(munmap)
+       jmp     _C_LABEL(_munmap)
+
+IMPORT(_munmap_text)
+ENTRY(munmap_text)
+       jmp     _C_LABEL(_munmap_text)
 
-_munmap_text:
-       jmp     __munmap_text
index 66eb3ecbb60683bbbdd5596ea84755cdbb59cec7..63db02df5160b2d74b456ecd747e0ddd93995bbd 100644 (file)
@@ -1,6 +1,6 @@
-.text
-.extern        __nanosleep
-.globl _nanosleep
+#include <machine/asm.h>
+
+IMPORT(_nanosleep)
+ENTRY(nanosleep)
+       jmp     _C_LABEL(_nanosleep)
 
-_nanosleep:
-       jmp     __nanosleep
index e178bd39f0cd9e50ef5075371240debb6eb6e888..0c66064339e4e1fa0748e9077d4a9782aa183512 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __open
-.globl _open
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_open)
+ENTRY(open)
+       jmp     _C_LABEL(_open)
 
-_open:
-       jmp     __open
index cbfd761f5cc4f95d2c3ce9e5efb81a1c53f53f73..9b9f3c3a63f2dbac3a04bbbf740b39ab06a0221e 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __opendir
-.globl _opendir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_opendir)
+ENTRY(opendir)
+       jmp     _C_LABEL(_opendir)
 
-_opendir:
-       jmp     __opendir
index a891a790b832fe02b944fa17d847d869478de7f4..340400f80831d15fdaaed2d7e72817d0624344d8 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __pathconf
-.globl _pathconf
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_pathconf)
+ENTRY(pathconf)
+       jmp     _C_LABEL(_pathconf)
 
-_pathconf:
-       jmp     __pathconf
index 69c5e8fd1b6bfb96cf582cd6ff2a55e49e8d04bb..1f55503cb5f8446b1cba0084564a94c3f9e75689 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __pause
-.globl _pause
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_pause)
+ENTRY(pause)
+       jmp     _C_LABEL(_pause)
 
-_pause:
-       jmp     __pause
index e66f1ac07712c86a09a67e2374a79e0da358ce2f..29ee2f3dcafc1a6e3e53c1b413b2ef26208a6595 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __pipe
-.globl _pipe
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_pipe)
+ENTRY(pipe)
+       jmp     _C_LABEL(_pipe)
 
-_pipe:
-       jmp     __pipe
index d88e67850dc42fce0212dffa7724509e063d22ee..cd1b8944028fb8e63cfe6f93973d7e60ed525ef5 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __ptrace
-.globl _ptrace
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_ptrace)
+ENTRY(ptrace)
+       jmp     _C_LABEL(_ptrace)
 
-_ptrace:
-       jmp     __ptrace
index a12fdb0279cfc1a60c189b4ddfb03ec09a465682..da015ae737d21eb8af3a5c1edd3fd1c8cbb1c274 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __read
-.globl _read
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_read)
+ENTRY(read)
+       jmp     _C_LABEL(_read)
 
-_read:
-       jmp     __read
index 063c6e9752d7de419c8686063587905df0b36bbc..42cae1de82d4dd7ac3b24127288821f9e2ebf3bd 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __readdir
-.globl _readdir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_readdir)
+ENTRY(readdir)
+       jmp     _C_LABEL(_readdir)
 
-_readdir:
-       jmp     __readdir
index 4036b71623d6cb9c17e443926b899d7b506aa9af..91590970af42358c2ef25f6859a518220e8482f4 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __readlink
-.globl _readlink
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_readlink)
+ENTRY(readlink)
+       jmp     _C_LABEL(_readlink)
 
-_readlink:
-       jmp     __readlink
index cbac2654eb3b2edac6da6038e3cffcdeb421c46e..06b64137b05bf1c029f7965507d921e43881078f 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __reboot
-.globl _reboot
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_reboot)
+ENTRY(reboot)
+       jmp     _C_LABEL(_reboot)
 
-_reboot:
-       jmp     __reboot
index 2ea65c559b20d3d58d9dc693668b8a0f3e9bd708..cfc35dc90a07cd0f0df8e896f8132f98b2064030 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __rename
-.globl _rename
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_rename)
+ENTRY(rename)
+       jmp     _C_LABEL(_rename)
 
-_rename:
-       jmp     __rename
index 092917673540ef6c29cd2f9495ac526a4864f34e..8c4c29efe6c8ea319a2efe41b31c434e027359be 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __rewinddir
-.globl _rewinddir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_rewinddir)
+ENTRY(rewinddir)
+       jmp     _C_LABEL(_rewinddir)
 
-_rewinddir:
-       jmp     __rewinddir
index ed25ee453e6c7ec12ae56d7eb9dcbdda66fe3b31..0e634d8a37e49d04c2c1a4f215210a2c62a1eea8 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __rmdir
-.globl _rmdir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_rmdir)
+ENTRY(rmdir)
+       jmp     _C_LABEL(_rmdir)
 
-_rmdir:
-       jmp     __rmdir
index 82cbf06dcd768e6ffb39d58a4e31793fedef66bd..3648db77fcb5bfffea460942205491c14625b859 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sbrk
-.globl _sbrk
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sbrk)
+ENTRY(sbrk)
+       jmp     _C_LABEL(_sbrk)
 
-_sbrk:
-       jmp     __sbrk
index 4f1aa79dd6f5d036d210b3826494e0e33fb8a62a..61738a3fd7f46d6b3a0340c068c5cb1e59452c24 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __seekdir
-.globl _seekdir
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_seekdir)
+ENTRY(seekdir)
+       jmp     _C_LABEL(_seekdir)
 
-_seekdir:
-       jmp     __seekdir
index 5e8598af474094e8d99e53da4b3453192d527fee..e5da271363198ecad96c766f3539dea6152546fd 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __select
-.globl _select
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_select)
+ENTRY(select)
+       jmp     _C_LABEL(_select)
 
-_select:
-       jmp     __select
index ab45f1aa2521ee4859f995f7d28f5f7a20e6bd5c..2045815f53b51c830e234071d311e4082181d31c 100644 (file)
@@ -1,11 +1,10 @@
-.text
-.extern        __setgid
-.globl _setgid
-.globl _setegid
-.balign        2
+#include <machine/asm.h>
 
-_setgid:
-       jmp     __setgid
+IMPORT(_setgid)
+ENTRY(setgid)
+       jmp     _C_LABEL(_setgid)
+
+IMPORT(_setegid)
+ENTRY(setegid)
+       jmp     _C_LABEL(_setegid)
 
-_setegid:
-       jmp     __setegid
index edc5702cd75807a666d9ae3d5c4839b3701c27e7..4bdabd2a783c05c2fe8ae57eef6f60c20b1149eb 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __setgroups
-.globl _setgroups
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_setgroups)
+ENTRY(setgroups)
+       jmp     _C_LABEL(_setgroups)
 
-_setgroups:
-       jmp     __setgroups
index c4ab9934d1ac0ea9332fa8cda7b9fbb322a7c658..eecf89802d8be5c1934cab8e0c8c72e4e2afe984 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __setitimer
-.globl _setitimer
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_setitimer)
+ENTRY(setitimer)
+       jmp     _C_LABEL(_setitimer)
 
-_setitimer:
-       jmp     __setitimer
index 8d49d48fdde9b5492132a0820a4d383eb5d17df4..3b22131af4fd46ccaf5b39668083d0270aa1d7db 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __setsid
-.globl _setsid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_setsid)
+ENTRY(setsid)
+       jmp     _C_LABEL(_setsid)
 
-_setsid:
-       jmp     __setsid
index e2600b6c6292df8fd7cdb78b256e26d470258a3e..838088a30e338b114a40804bf6d63ce7071d3a38 100644 (file)
@@ -1,11 +1,10 @@
-.text
-.extern        __setuid
-.globl _setuid
-.globl _seteuid
-.balign        2
+#include <machine/asm.h>
 
-_setuid:
-       jmp     __setuid
+IMPORT(_setuid)
+ENTRY(setuid)
+       jmp     _C_LABEL(_setuid)
+
+IMPORT(_seteuid)
+ENTRY(seteuid)
+       jmp     _C_LABEL(_seteuid)
 
-_seteuid:
-       jmp     __seteuid
index 7899bdd131d428e20d2e2c6aee79a6a3f95e6b17..ef6eb07784f9052400047f5553b50edf675d9a81 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigaction
-.globl _sigaction
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigaction)
+ENTRY(sigaction)
+       jmp     _C_LABEL(_sigaction)
 
-_sigaction:
-       jmp     __sigaction
index b1189250c81b11e89f3a9b229707d6f3c79865f7..dcef837a35a41133c79410e5de0cd695d706797c 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigaddset
-.globl _sigaddset
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigaddset)
+ENTRY(sigaddset)
+       jmp     _C_LABEL(_sigaddset)
 
-_sigaddset:
-       jmp     __sigaddset
index be30fe108548e1a94d40ec9454247d9db2b72d2f..1e36da84d149476b0836cc592a4ae470e32a4891 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigdelset
-.globl _sigdelset
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigdelset)
+ENTRY(sigdelset)
+       jmp     _C_LABEL(_sigdelset)
 
-_sigdelset:
-       jmp     __sigdelset
index f5170de587ddb54aa8d7fd0da7f0f6fe204e3e14..755cbb63aa84ab48600a5339797c9d163e3a1ae0 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigemptyset
-.globl _sigemptyset
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigemptyset)
+ENTRY(sigemptyset)
+       jmp     _C_LABEL(_sigemptyset)
 
-_sigemptyset:
-       jmp     __sigemptyset
index 4fcecf388b39e9a8733ad5cfe49f4362c2a02938..2aa563a93c9e3e900de3b2b058d21a14fa34a4d8 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigfillset
-.globl _sigfillset
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigfillset)
+ENTRY(sigfillset)
+       jmp     _C_LABEL(_sigfillset)
 
-_sigfillset:
-       jmp     __sigfillset
index 31189e98059d2a5a2ce06f21ede8b7c98d2d55e4..c403a7ac16c34d3e6a39929a6727864cc0ced8f8 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigismember
-.globl _sigismember
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigismember)
+ENTRY(sigismember)
+       jmp     _C_LABEL(_sigismember)
 
-_sigismember:
-       jmp     __sigismember
index 43ef7e9e933b8a84f03b2b2c15219601220ce692..4cd828dfe89f37ffbade7d1c3c1b36aa60b3c448 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigpending
-.globl _sigpending
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigpending)
+ENTRY(sigpending)
+       jmp     _C_LABEL(_sigpending)
 
-_sigpending:
-       jmp     __sigpending
index d3b343bfd0dd8f40cdba46f33552f494fe290b9f..95727946c2510c5f94eebfa6c369d5ef1cb920be 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigprocmask
-.globl _sigprocmask
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigprocmask)
+ENTRY(sigprocmask)
+       jmp     _C_LABEL(_sigprocmask)
 
-_sigprocmask:
-       jmp     __sigprocmask
index 7211fcd15b5b2523815145d20413a43ce84dd800..1be4ce18a4b88e439a90044964f0bc0569d12925 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigreturn
-.globl _sigreturn
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigreturn)
+ENTRY(sigreturn)
+       jmp     _C_LABEL(_sigreturn)
 
-_sigreturn:
-       jmp     __sigreturn
index 8bef82a193d6244f2709446c1ae5f932078fab3b..9b38ab56153686ef6d2023a140317d8fb2a4cb39 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sigsuspend
-.globl _sigsuspend
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sigsuspend)
+ENTRY(sigsuspend)
+       jmp     _C_LABEL(_sigsuspend)
 
-_sigsuspend:
-       jmp     __sigsuspend
index afd5f2779a5e9fc7ba769278c94b833381f73bc5..0f7177d9f0174fe0d0e0ab9d6e63be7dcb3ff370 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sleep
-.globl _sleep
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sleep)
+ENTRY(sleep)
+       jmp     _C_LABEL(_sleep)
 
-_sleep:
-       jmp     __sleep
index 3621ad2d7e86c47fe32c1d81d2c3220a3e0baed4..a59e9342e89aa074bf10c8011e0230273f5ca287 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sprofile
-.globl _sprofile
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sprofile)
+ENTRY(sprofile)
+       jmp     _C_LABEL(_sprofile)
 
-_sprofile:
-       jmp     __sprofile
index 64fc110bab20b0f7012dea2dc9734fde6e31270e..d38bb195fda0cab8eed923193678063ea0b39238 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __stat
-.globl _stat
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_stat)
+ENTRY(stat)
+       jmp     _C_LABEL(_stat)
 
-_stat:
-       jmp     __stat
index 9d14d71e314755b154c5543071a19cf6a63cc53b..8b698b9362a4f29446da802e86c345712c403c61 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __statvfs
-.globl _statvfs
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_statvfs)
+ENTRY(statvfs)
+       jmp     _C_LABEL(_statvfs)
 
-_statvfs:
-       jmp     __statvfs
index bf8b0fbed46cf5bed2e74f2e6ef7c6c8242817ea..24f4fb17bb5016357e082126be2808b66806c710 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __stime
-.globl _stime
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_stime)
+ENTRY(stime)
+       jmp     _C_LABEL(_stime)
 
-_stime:
-       jmp     __stime
index 53914debefe1cf8568443493667ef8bcd9168817..d29a15505c7448f20e2698db1e705263df0e5d19 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __svrctl
-.globl _svrctl
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_svrctl)
+ENTRY(svrctl)
+       jmp     _C_LABEL(_svrctl)
 
-_svrctl:
-       jmp     __svrctl
index 4c16db2ba0c11bdc635aa5e9a107a4a24f3ae8a1..4f4ce5d5e19e1c1c53f15e235c52c317a8bb456f 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __symlink
-.globl _symlink
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_symlink)
+ENTRY(symlink)
+       jmp     _C_LABEL(_symlink)
 
-_symlink:
-       jmp     __symlink
index f29208a9d9959eda0b3179054b67d9c72e54d95c..d7035b3ffa8cd5c0d5e95dd166b48d182f18182c 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sync
-.globl _sync
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sync)
+ENTRY(sync)
+       jmp     _C_LABEL(_sync)
 
-_sync:
-       jmp     __sync
index 7add73abf0d80b8d643787ddf728f59124b04994..3cc75850288b4815bddb6c70ff820c3aa2077b28 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __sysuname
-.globl _sysuname
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_sysuname)
+ENTRY(sysuname)
+       jmp     _C_LABEL(_sysuname)
 
-_sysuname:
-       jmp     __sysuname
index 50ab346b3a3951184165fb79cde9d4b88bc9dc5e..cd2250914914ddbe9aec7d224063ef239dbe40d9 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __tcdrain
-.globl _tcdrain
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_tcdrain)
+ENTRY(tcdrain)
+       jmp     _C_LABEL(_tcdrain)
 
-_tcdrain:
-       jmp     __tcdrain
index 3304165ccde42a41c112a9e4428d24f924aad5f7..e488fcd61ef28fb161029e0cd72f9c47cb533cc0 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __tcflow
-.globl _tcflow
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_tcflow)
+ENTRY(tcflow)
+       jmp     _C_LABEL(_tcflow)
 
-_tcflow:
-       jmp     __tcflow
index a6f0b321a72672d2d287d56f91732d1a2eb98162..d85fde0a894dfa4d9503b054212a88a5042ee43a 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __tcflush
-.globl _tcflush
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_tcflush)
+ENTRY(tcflush)
+       jmp     _C_LABEL(_tcflush)
 
-_tcflush:
-       jmp     __tcflush
index 866c0ae044b9956a7e81a293e5d01c7561e95b04..a282100b3a9d55d8825f0f1480707d732f5b1698 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __tcgetattr
-.globl _tcgetattr
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_tcgetattr)
+ENTRY(tcgetattr)
+       jmp     _C_LABEL(_tcgetattr)
 
-_tcgetattr:
-       jmp     __tcgetattr
index 1d14e18cee242c3be6d8c4ba2c09078bef746cb4..6e6d58590161df73c2ca86ea8f137be8697c73d0 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __tcsendbreak
-.globl _tcsendbreak
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_tcsendbreak)
+ENTRY(tcsendbreak)
+       jmp     _C_LABEL(_tcsendbreak)
 
-_tcsendbreak:
-       jmp     __tcsendbreak
index f1a8bde4d15624f438def091e9f5b1cb81ac469c..d8b9a17fff371ae336dc7af9f93d3272560a9068 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __tcsetattr
-.globl _tcsetattr
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_tcsetattr)
+ENTRY(tcsetattr)
+       jmp     _C_LABEL(_tcsetattr)
 
-_tcsetattr:
-       jmp     __tcsetattr
index 0ba1389e4343117e51e470280b68903deb973f4c..1a557734a8d9110bf7c9bfa4a34d7d80c23118a6 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __time
-.globl _time
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_time)
+ENTRY(time)
+       jmp     _C_LABEL(_time)
 
-_time:
-       jmp     __time
index 5bf1e9b44c0815977780c86f0abd70a1a670af6a..2bc0f8cc3c20d2b8891165456f48cc75bb85b7e9 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __times
-.globl _times
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_times)
+ENTRY(times)
+       jmp     _C_LABEL(_times)
 
-_times:
-       jmp     __times
index 19ca7c115d9d69299b5dcee2f915cc81de629342..84647d826b93f6ec9b34d8e821efc47f936e416d 100644 (file)
@@ -1,13 +1,10 @@
-.text
-.extern        __truncate
-.extern        __ftruncate
-.globl _truncate
-.globl _ftruncate
-.balign        2
+#include <machine/asm.h>
 
-_truncate:
-       jmp     __truncate
+IMPORT(_truncate)
+ENTRY(truncate)
+       jmp     _C_LABEL(_truncate)
+
+IMPORT(_ftruncate)
+ENTRY(ftruncate)
+       jmp     _C_LABEL(_ftruncate)
 
-.balign        2
-_ftruncate:
-       jmp     __ftruncate
index ea9440e8136d24201ae93bbfdabd31693f15194d..b6e9129e708ca693585124007ab25219b0262923 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __umask
-.globl _umask
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_umask)
+ENTRY(umask)
+       jmp     _C_LABEL(_umask)
 
-_umask:
-       jmp     __umask
index 017507324f4b56c47e35c1f095473d0891c07dc8..169e6c4fce13842701276894ec52bd5982878e19 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __umount
-.globl _umount
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_umount)
+ENTRY(umount)
+       jmp     _C_LABEL(_umount)
 
-_umount:
-       jmp     __umount
index 90e5e1cd3c76b6f5c73c058fe6a1ca05ff18868e..ddf7076f3539fb5651647b70e45d041342697106 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __uname
-.globl _uname
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_uname)
+ENTRY(uname)
+       jmp     _C_LABEL(_uname)
 
-_uname:
-       jmp     __uname
index c2fd587ef889550b516d7194fe0752d8fd07cba3..30dedc1e7ce9ab46983087272dca2b6ffba8ce51 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __unlink
-.globl _unlink
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_unlink)
+ENTRY(unlink)
+       jmp     _C_LABEL(_unlink)
 
-_unlink:
-       jmp     __unlink
index caf8ac2955a1f810a68227f7d8534463cf869156..7ae24ab23864af8a92d765002a0a145b040a8414 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __utime
-.globl _utime
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_utime)
+ENTRY(utime)
+       jmp     _C_LABEL(_utime)
 
-_utime:
-       jmp     __utime
index 9ba1aefcbcb7d39e1149131a7caeb80098cdb978..fa3635cb0e83c50677e2efe4b003ac9dcda3881e 100644 (file)
@@ -1,15 +1,14 @@
-.text
-.extern        __vm_adddma
-.globl _vm_adddma
-.extern        __vm_deldma
-.globl _vm_deldma
-.extern        __vm_getdma
-.globl _vm_getdma
-.balign        2
-
-_vm_adddma:
-       jmp     __vm_adddma
-_vm_deldma:
-       jmp     __vm_deldma
-_vm_getdma:
-       jmp     __vm_getdma
+#include <machine/asm.h>
+
+IMPORT(_vm_adddma)
+ENTRY(vm_adddma)
+       jmp     _C_LABEL(_vm_adddma)
+
+IMPORT(_vm_deldma)
+ENTRY(vm_deldma)
+       jmp     _C_LABEL(_vm_deldma)
+
+IMPORT(_vm_getdma)
+ENTRY(vm_getdma)
+       jmp     _C_LABEL(_vm_getdma)
+
index 1e0ae8955fd6148fae6e2b82d3af353dd06389bb..ed6b2e0f219cff55376bed26aab086955da04765 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_getphys
-.globl _vm_getphys
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_getphys)
+ENTRY(vm_getphys)
+       jmp     _C_LABEL(_vm_getphys)
 
-_vm_getphys:
-       jmp     __vm_getphys
index e7cb9ef7c1514b471ed364904ca4605fb282e2c7..80ae3398d1a8b276c84af1ca0ece6952d6994223 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_getrefcount
-.globl _vm_getrefcount
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_getrefcount)
+ENTRY(vm_getrefcount)
+       jmp     _C_LABEL(_vm_getrefcount)
 
-_vm_getrefcount:
-       jmp     __vm_getrefcount
index a56b213b94d8ff1fec6d95c97d0657ad12cf89f3..7341a447887b688c2533ba1af59e2868d3f5a8a0 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_memctl
-.globl _vm_memctl
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_memctl)
+ENTRY(vm_memctl)
+       jmp     _C_LABEL(_vm_memctl)
 
-_vm_memctl:
-       jmp     __vm_memctl
index e474211cfad4f509897b7803709757f78ba89d30..c73c95c88a5e4fcb9f4db6a310cbb67b5cd17716 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_query_exit
-.globl _vm_query_exit
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_query_exit)
+ENTRY(vm_query_exit)
+       jmp     _C_LABEL(_vm_query_exit)
 
-_vm_query_exit:
-       jmp     __vm_query_exit
index c4c68f844f395ef1ef04a591ff5509e28202e3b5..286e656356cf56c9a52454cdb1db3ab2c668dad2 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_remap
-.globl _vm_remap
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_remap)
+ENTRY(vm_remap)
+       jmp     _C_LABEL(_vm_remap)
 
-_vm_remap:
-       jmp     __vm_remap
index 7f865b8ffad7450f2288d044fc3c34592b847bf3..9a502d4bca3ce50a753908c1c391a4487d79b79e 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_set_priv
-.globl _vm_set_priv
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_set_priv)
+ENTRY(vm_set_priv)
+       jmp     _C_LABEL(_vm_set_priv)
 
-_vm_set_priv:
-       jmp     __vm_set_priv
index c6564c2254c4bbf1caf87957c4093c6e83b661e2..5660fea3dba1a0fcbbd69c0aaa613f1b3a738195 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_unmap
-.globl _vm_unmap
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_unmap)
+ENTRY(vm_unmap)
+       jmp     _C_LABEL(_vm_unmap)
 
-_vm_unmap:
-       jmp     __vm_unmap
index 3f8c7149c030ae951d53d9bc4457d5594ea8205c..c4f0eb2c3bfb8b868df7c51e5c101d1c3c7e44c5 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __vm_update
-.globl _vm_update
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_vm_update)
+ENTRY(vm_update)
+       jmp     _C_LABEL(_vm_update)
 
-_vm_update:
-       jmp     __vm_update
index 80b8f2c97bfb6851911170a1a9b3671b017dcbdd..bb0d6f2e8c398399acc38465c32b6ce939c68242 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __wait
-.globl _wait
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_wait)
+ENTRY(wait)
+       jmp     _C_LABEL(_wait)
 
-_wait:
-       jmp     __wait
index 2efa266a77f00ac655c42de135c72cb55a7982b4..c9ffc8bb6e4dc90f7251bc9727dbc9e7c6512b39 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __waitpid
-.globl _waitpid
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_waitpid)
+ENTRY(waitpid)
+       jmp     _C_LABEL(_waitpid)
 
-_waitpid:
-       jmp     __waitpid
index efb64637761d92e0902055436b9e7fa4727e46fe..712d4b6e73a97a024641bbd45cc0175481884bb3 100644 (file)
@@ -1,7 +1,6 @@
-.text
-.extern        __write
-.globl _write
-.balign        2
+#include <machine/asm.h>
+
+IMPORT(_write)
+ENTRY(write)
+       jmp     _C_LABEL(_write)
 
-_write:
-       jmp     __write
index e33ae487c880219dc7e4178e806e92888a9c15d2..e7e51e6468c9584ae1c9f34f07040a9f52b306e9 100644 (file)
@@ -1,8 +1,5 @@
 /* Part of libhgfs - (c) 2009, D.C. van Moolenbroek */
-
-.globl ___libhgfs_backdoor
-.globl ___libhgfs_backdoor_in
-.globl ___libhgfs_backdoor_out
+#include <machine/asm.h>
 
 .text
 
@@ -10,8 +7,7 @@
        BD_PORT = 0x5658
        IO_PORT = 0x5659
 
-.balign        16
-___libhgfs_backdoor:
+ENTRY(__libhgfs_backdoor)
        pushl   %ebx
        pushl   %esi
        pushl   %edi
@@ -37,8 +33,7 @@ ___libhgfs_backdoor:
        popl    %ebx
        ret
 
-.balign        16
-___libhgfs_backdoor_in:
+ENTRY(__libhgfs_backdoor_in)
        pushl   %ebx
        pushl   %esi
        pushl   %edi
@@ -71,8 +66,7 @@ ___libhgfs_backdoor_in:
        popl    %ebx
        ret
 
-.balign        16
-___libhgfs_backdoor_out:
+ENTRY(__libhgfs_backdoor_out)
        pushl   %ebx
        pushl   %esi
        pushl   %edi
index 143d30d642ea0ef506754be96bdeaade231ac929..81ab97d2a95b07e46de0608d75d7b45eb4dc672a 100644 (file)
@@ -1,14 +1,11 @@
 /*  */
 /* sections */
+#include <machine/asm.h>
 
-
-.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:
+ENTRY(read_tsc)
        push    %edx
        push    %eax
 .byte  0x0f    /* this is the RDTSC instruction  */
@@ -26,8 +23,7 @@ _read_tsc:
 /**===========================================================================* */
 /* 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:
+ENTRY(read_host_time_ns)
         pushl   %edx
         pushl   %eax
         pushl   %ecx
index fd65e26a4de106b4ec74a909a303a8531ff968ca..eb8c6a38d9b4ba874a943a6812d3b0da364167cf 100644 (file)
@@ -1,13 +1,11 @@
-.globl _i386_invlpg
-
-.text
+#include <machine/asm.h>
 
 /**===========================================================================* */
 /**                              i386_invlpg                                  * */
 /**===========================================================================* */
 /* PUBLIC void i386_invlpg(u32_t addr) */
 /* Tell the processor to invalidate a tlb entry at virtual address addr. */
-_i386_invlpg:
+ENTRY(i386_invlpg)
        push    %ebp
        mov     %esp, %ebp
        push    %eax
index 1065ff67cacb07e12449f678ce0bc00fba088dd8..cd1a55c90d24d2dfb923ab52655cf60b2cd8ae2e 100644 (file)
@@ -1,8 +1,8 @@
+#include <machine/asm.h>
 
-.globl _check_context_loop
-.globl _remaining_invocations
-.globl _origstate
-.globl _newstate
+IMPORT(remaining_invocations)
+IMPORT(origstate)
+IMPORT(newstate)
 
 #define JUNK 0xCC0FFEE0
 
@@ -16,9 +16,8 @@
        COPY(dest, 0); COPY(dest, 1); COPY(dest, 2); COPY(dest, 3); \
        COPY(dest, 4); COPY(dest, 5); COPY(dest, 6); COPY(dest, 7); 
 
-.text
 /* void check_context_loop() */
-_check_context_loop:
+ENTRY(check_context_loop)
        /* Save original context so we can restore it. */
        pusha
 
@@ -40,7 +39,7 @@ _check_context_loop:
        pusha
 cont:
        /* Check if we're done. */
-       cmpl    $0, (_remaining_invocations)
+       cmpl    $0, (_C_LABEL(remaining_invocations))
        jz      done
 
        /* We're not done. */
@@ -53,11 +52,11 @@ done:
         * so we can copy it.
         */
        pusha
-       COPYA(_newstate);
+       COPYA(_C_LABEL(newstate));
        popa
 
        /* copy and restore junked state */
-       COPYA(_origstate);
+       COPYA(_C_LABEL(origstate));
        popa
 
        /* restore original state and return */