Go to the documentation of this file.
15 #define __BN_program 4
22 #define __BN_munmap 11
23 #define __BN_gethwaddr 12
24 #define __BN_getserialnum 13
25 #define __BN_getbenv 14
26 #define __BN_setbenv 15
27 #define __BN_setpmask 16
28 #define __BN_readenv 17
29 #define __BN_flash_chattr_range 18
30 #define __BN_flash_erase_range 19
31 #define __BN_flash_write_range 20
37 #define __bsc_return(type, res) \
39 if ((unsigned long)(res) >= (unsigned long)(-64)) { \
48 #define _bsc0(type,name) \
51 register long __res __asm__ ("%d0") = __BN_##name; \
52 __asm__ __volatile__ ("trap #2" \
56 __bsc_return(type,__res); \
59 #define _bsc1(type,name,atype,a) \
62 register long __res __asm__ ("%d0") = __BN_##name; \
63 register long __a __asm__ ("%d1") = (long)a; \
64 __asm__ __volatile__ ("trap #2" \
66 : "0" (__res), "d" (__a) \
68 __bsc_return(type,__res); \
71 #define _bsc2(type,name,atype,a,btype,b) \
72 type name(atype a, btype b) \
74 register long __res __asm__ ("%d0") = __BN_##name; \
75 register long __a __asm__ ("%d1") = (long)a; \
76 register long __b __asm__ ("%d2") = (long)b; \
77 __asm__ __volatile__ ("trap #2" \
79 : "0" (__res), "d" (__a), "d" (__b) \
81 __bsc_return(type,__res); \
84 #define _bsc3(type,name,atype,a,btype,b,ctype,c) \
85 type name(atype a, btype b, ctype c) \
87 register long __res __asm__ ("%d0") = __BN_##name; \
88 register long __a __asm__ ("%d1") = (long)a; \
89 register long __b __asm__ ("%d2") = (long)b; \
90 register long __c __asm__ ("%d3") = (long)c; \
91 __asm__ __volatile__ ("trap #2" \
93 : "0" (__res), "d" (__a), "d" (__b), \
96 __bsc_return(type,__res); \
99 #define _bsc4(type,name,atype,a,btype,b,ctype,c,dtype,d) \
100 type name(atype a, btype b, ctype c, dtype d) \
102 register long __res __asm__ ("%d0") = __BN_##name; \
103 register long __a __asm__ ("%d1") = (long)a; \
104 register long __b __asm__ ("%d2") = (long)b; \
105 register long __c __asm__ ("%d3") = (long)c; \
106 register long __d __asm__ ("%d4") = (long)d; \
107 __asm__ __volatile__ ("trap #2" \
109 : "0" (__res), "d" (__a), "d" (__b), \
110 "d" (__c), "d" (__d) \
112 __bsc_return(type,__res); \
115 #define _bsc5(type,name,atype,a,btype,b,ctype,c,dtype,d,etype,e) \
116 type name(atype a, btype b, ctype c, dtype d, etype e) \
118 register long __res __asm__ ("%d0") = __BN_##name; \
119 register long __a __asm__ ("%d1") = (long)a; \
120 register long __b __asm__ ("%d2") = (long)b; \
121 register long __c __asm__ ("%d3") = (long)c; \
122 register long __d __asm__ ("%d4") = (long)d; \
123 register long __e __asm__ ("%d5") = (long)e; \
124 __asm__ __volatile__ ("trap #2" \
126 : "0" (__res), "d" (__a), "d" (__b), \
127 "d" (__c), "d" (__d), "d" (__e) \
129 __bsc_return(type,__res); \