[BACK]Return to SYS.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / arch / powerpc64

Annotation of src/lib/libc/arch/powerpc64/SYS.h, Revision 1.2

1.2     ! mrg         1: /*     $NetBSD: SYS.h,v 1.1 2006/07/01 16:37:20 ross Exp $     */
1.1       ross        2:
                      3: #include <machine/asm.h>
                      4: #include <sys/syscall.h>
                      5:
                      6: #ifdef __STDC__
                      7: #define        _DOSYSCALL(x)           li      %r0,(SYS_ ## x)         ;\
                      8:                                sc
                      9: #else
                     10: #define        _DOSYSCALL(x)           li      %r0,(SYS_/**/x)         ;\
                     11:                                sc
                     12: #endif /* __STDC__ */
                     13:
                     14: #define        _SYSCALL_NOERROR(x,y)   .text                           ;\
                     15:                                .align  2                       ;\
                     16:                        ENTRY(x)                                ;\
                     17:                                _DOSYSCALL(y)
                     18:
                     19: #define _SYSCALL(x,y)          .text                           ;\
                     20:                                .align  2                       ;\
                     21:                        2:      b       PIC_PLT(_C_LABEL(__cerror));\
1.2     ! mrg        22:                                nop                             ;\
1.1       ross       23:                                _SYSCALL_NOERROR(x,y)           ;\
                     24:                                bso     2b
                     25:
                     26: #define SYSCALL_NOERROR(x)     _SYSCALL_NOERROR(x,x)
                     27:
                     28: #define SYSCALL(x)             _SYSCALL(x,x)
                     29:
                     30: #define PSEUDO_NOERROR(x,y)    _SYSCALL_NOERROR(x,y)           ;\
                     31:                                blr
                     32:
                     33: #define PSEUDO(x,y)            _SYSCALL_NOERROR(x,y)           ;\
                     34:                                bnslr                           ;\
1.2     ! mrg        35:                                b       PIC_PLT(_C_LABEL(__cerror));\
        !            36:                                nop
1.1       ross       37:
                     38: #define RSYSCALL_NOERROR(x)    PSEUDO_NOERROR(x,x)
                     39:
                     40: #define RSYSCALL(x)            PSEUDO(x,x)
                     41:
                     42: #define        WSYSCALL(weak,strong)   WEAK_ALIAS(weak,strong)         ;\
                     43:                                PSEUDO(strong,weak)

CVSweb <webmaster@jp.NetBSD.org>