123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- /*
- SYS.h
- */
- #ifndef SYS_H
- #define SYS_H
- #define SYS_call_0(x) \
- LABEL_(x); \
- BODY(x)
- #define _SYS_call_0(x) \
- LABEL__(x); \
- BODY(x)
- #define SYS_call_1(x) \
- LABEL_(x); \
- ENTRY1; \
- BODY(x)
- #define _SYS_call_1(x) \
- LABEL__(x); \
- ENTRY1; \
- BODY(x)
- #define SYS_call_2(x) \
- LABEL_(x); \
- ENTRY2; \
- BODY(x)
- #define _SYS_call_2(x) \
- LABEL__(x); \
- ENTRY2; \
- BODY(x)
- #define SYS_call_3(x) \
- LABEL_(x); \
- ENTRY3; \
- BODY(x)
- #define _SYS_call_3(x) \
- LABEL__(x); \
- ENTRY3; \
- BODY(x)
- #define SYS_call_4(x) \
- LABEL_(x); \
- ENTRY4; \
- BODY(x)
- #define _SYS_call_4(x) \
- LABEL__(x); \
- ENTRY4; \
- BODY(x)
- #define SYS_call_5(x) \
- LABEL_(x); \
- ENTRY5; \
- BODY(x)
- #define _SYS_call_5(x) \
- LABEL__(x); \
- ENTRY5; \
- BODY(x)
- #define SYS_call_6(x) \
- LABEL_(x); \
- ENTRY6; \
- BODY(x)
- #define _SYS_call_6(x) \
- LABEL__(x); \
- ENTRY6; \
- BODY(x)
- #define BODY(x) \
- b x; \
- nop
- #if __STDC__
- #define LABEL_(x) \
- .global $ ## x; \
- $ ## x:
- #define LABEL__(x) \
- .global $_ ## x; \
- $_ ## x:
- #else
- #define LABEL_(x) \
- .global $/**/x; \
- $/**/x:
- #define LABEL__(x) \
- .global $_/**/x; \
- $_/**/x:
- #endif
- #define ENTRY1 \
- ld [%l0], %o0 \
- #define ENTRY2 \
- ENTRY1; \
- ld [%l0+4], %o1 \
- #define ENTRY3 \
- ENTRY2; \
- ld [%l0+8], %o2 \
- #define ENTRY4 \
- ENTRY3; \
- ld [%l0+12], %o3 \
- #define ENTRY5 \
- ENTRY4; \
- ld [%l0+16], %o4 \
- #define ENTRY6 \
- ENTRY5; \
- ld [%l0+20], %o5 \
- #endif /* SYS_H */
|