mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-14 15:20:04 +00:00
mips: Use 'long int' and 'long long int' in linux syscall code
Style fixes only, no functional change.
(cherry picked from commit d3fbb18aa3
)
This commit is contained in:
parent
9ea3686266
commit
ae1b6b13d4
@ -22,9 +22,9 @@
|
|||||||
.text
|
.text
|
||||||
.set nomips16
|
.set nomips16
|
||||||
|
|
||||||
/* long long __mips_syscall5 (long arg1, long arg2, long arg3, long arg4,
|
/* long long int __mips_syscall5 (long int arg1, long int arg2, long int arg3,
|
||||||
long arg5,
|
long int arg4, long int arg5,
|
||||||
long number) */
|
long int number) */
|
||||||
|
|
||||||
ENTRY(__mips_syscall5)
|
ENTRY(__mips_syscall5)
|
||||||
lw v0, 20(sp)
|
lw v0, 20(sp)
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
.text
|
.text
|
||||||
.set nomips16
|
.set nomips16
|
||||||
|
|
||||||
/* long long __mips_syscall6 (long arg1, long arg2, long arg3, long arg4,
|
/* long long int __mips_syscall6 (long int arg1, long int arg2, long int arg3,
|
||||||
long arg5, long arg6,
|
long int arg4, long int arg5, long int arg6,
|
||||||
long number) */
|
long int number) */
|
||||||
|
|
||||||
ENTRY(__mips_syscall6)
|
ENTRY(__mips_syscall6)
|
||||||
lw v0, 24(sp)
|
lw v0, 24(sp)
|
||||||
|
@ -22,9 +22,10 @@
|
|||||||
.text
|
.text
|
||||||
.set nomips16
|
.set nomips16
|
||||||
|
|
||||||
/* long long __mips_syscall7 (long arg1, long arg2, long arg3, long arg4,
|
/* long long int __mips_syscall7 (long int arg1, long int arg2, long int arg3,
|
||||||
long arg5, long arg6, long arg7,
|
long int arg4, long int arg5, long int arg6,
|
||||||
long number) */
|
long int arg7,
|
||||||
|
long int number) */
|
||||||
|
|
||||||
ENTRY(__mips_syscall7)
|
ENTRY(__mips_syscall7)
|
||||||
lw v0, 28(sp)
|
lw v0, 28(sp)
|
||||||
|
@ -19,51 +19,57 @@
|
|||||||
#ifndef MIPS16_SYSCALL_H
|
#ifndef MIPS16_SYSCALL_H
|
||||||
#define MIPS16_SYSCALL_H 1
|
#define MIPS16_SYSCALL_H 1
|
||||||
|
|
||||||
long long __nomips16 __mips16_syscall0 (long number);
|
long long int __nomips16 __mips16_syscall0 (long int number);
|
||||||
#define __mips16_syscall0(dummy, number) \
|
#define __mips16_syscall0(dummy, number) \
|
||||||
__mips16_syscall0 ((long) (number))
|
__mips16_syscall0 ((long int) (number))
|
||||||
|
|
||||||
long long __nomips16 __mips16_syscall1 (long a0,
|
long long int __nomips16 __mips16_syscall1 (long int a0,
|
||||||
long number);
|
long int number);
|
||||||
#define __mips16_syscall1(a0, number) \
|
#define __mips16_syscall1(a0, number) \
|
||||||
__mips16_syscall1 ((long) (a0), \
|
__mips16_syscall1 ((long int) (a0), \
|
||||||
(long) (number))
|
(long int) (number))
|
||||||
|
|
||||||
long long __nomips16 __mips16_syscall2 (long a0, long a1,
|
long long int __nomips16 __mips16_syscall2 (long int a0, long int a1,
|
||||||
long number);
|
long int number);
|
||||||
#define __mips16_syscall2(a0, a1, number) \
|
#define __mips16_syscall2(a0, a1, number) \
|
||||||
__mips16_syscall2 ((long) (a0), (long) (a1), \
|
__mips16_syscall2 ((long int) (a0), (long int) (a1), \
|
||||||
(long) (number))
|
(long int) (number))
|
||||||
|
|
||||||
long long __nomips16 __mips16_syscall3 (long a0, long a1, long a2,
|
long long int __nomips16 __mips16_syscall3 (long int a0, long int a1,
|
||||||
long number);
|
long int a2,
|
||||||
|
long int number);
|
||||||
#define __mips16_syscall3(a0, a1, a2, number) \
|
#define __mips16_syscall3(a0, a1, a2, number) \
|
||||||
__mips16_syscall3 ((long) (a0), (long) (a1), (long) (a2), \
|
__mips16_syscall3 ((long int) (a0), (long int) (a1), \
|
||||||
(long) (number))
|
(long int) (a2), \
|
||||||
|
(long int) (number))
|
||||||
|
|
||||||
long long __nomips16 __mips16_syscall4 (long a0, long a1, long a2, long a3,
|
long long int __nomips16 __mips16_syscall4 (long int a0, long int a1,
|
||||||
long number);
|
long int a2, long int a3,
|
||||||
|
long int number);
|
||||||
#define __mips16_syscall4(a0, a1, a2, a3, number) \
|
#define __mips16_syscall4(a0, a1, a2, a3, number) \
|
||||||
__mips16_syscall4 ((long) (a0), (long) (a1), (long) (a2), \
|
__mips16_syscall4 ((long int) (a0), (long int) (a1), \
|
||||||
(long) (a3), \
|
(long int) (a2), (long int) (a3), \
|
||||||
(long) (number))
|
(long int) (number))
|
||||||
|
|
||||||
/* The remaining ones use regular MIPS wrappers. */
|
/* The remaining ones use regular MIPS wrappers. */
|
||||||
|
|
||||||
#define __mips16_syscall5(a0, a1, a2, a3, a4, number) \
|
#define __mips16_syscall5(a0, a1, a2, a3, a4, number) \
|
||||||
__mips_syscall5 ((long) (a0), (long) (a1), (long) (a2), \
|
__mips_syscall5 ((long int) (a0), (long int) (a1), \
|
||||||
(long) (a3), (long) (a4), \
|
(long int) (a2), (long int) (a3), \
|
||||||
(long) (number))
|
(long int) (a4), \
|
||||||
|
(long int) (number))
|
||||||
|
|
||||||
#define __mips16_syscall6(a0, a1, a2, a3, a4, a5, number) \
|
#define __mips16_syscall6(a0, a1, a2, a3, a4, a5, number) \
|
||||||
__mips_syscall6 ((long) (a0), (long) (a1), (long) (a2), \
|
__mips_syscall6 ((long int) (a0), (long int) (a1), \
|
||||||
(long) (a3), (long) (a4), (long) (a5), \
|
(long int) (a2), (long int) (a3), \
|
||||||
(long) (number))
|
(long int) (a4), (long int) (a5), \
|
||||||
|
(long int) (number))
|
||||||
|
|
||||||
#define __mips16_syscall7(a0, a1, a2, a3, a4, a5, a6, number) \
|
#define __mips16_syscall7(a0, a1, a2, a3, a4, a5, a6, number) \
|
||||||
__mips_syscall7 ((long) (a0), (long) (a1), (long) (a2), \
|
__mips_syscall7 ((long int) (a0), (long int) (a1), \
|
||||||
(long) (a3), (long) (a4), (long) (a5), \
|
(long int) (a2), (long int) (a3), \
|
||||||
(long) (a6), \
|
(long int) (a4), (long int) (a5), \
|
||||||
(long) (number))
|
(long int) (a6), \
|
||||||
|
(long int) (number))
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
#undef __mips16_syscall0
|
#undef __mips16_syscall0
|
||||||
|
|
||||||
long long __nomips16
|
long long int __nomips16
|
||||||
__mips16_syscall0 (long number)
|
__mips16_syscall0 (long int number)
|
||||||
{
|
{
|
||||||
union __mips_syscall_return ret;
|
union __mips_syscall_return ret;
|
||||||
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 0);
|
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 0);
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
#undef __mips16_syscall1
|
#undef __mips16_syscall1
|
||||||
|
|
||||||
long long __nomips16
|
long long int __nomips16
|
||||||
__mips16_syscall1 (long a0,
|
__mips16_syscall1 (long int a0,
|
||||||
long number)
|
long int number)
|
||||||
{
|
{
|
||||||
union __mips_syscall_return ret;
|
union __mips_syscall_return ret;
|
||||||
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 1,
|
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 1,
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
#undef __mips16_syscall2
|
#undef __mips16_syscall2
|
||||||
|
|
||||||
long long __nomips16
|
long long int __nomips16
|
||||||
__mips16_syscall2 (long a0, long a1,
|
__mips16_syscall2 (long int a0, long int a1,
|
||||||
long number)
|
long int number)
|
||||||
{
|
{
|
||||||
union __mips_syscall_return ret;
|
union __mips_syscall_return ret;
|
||||||
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 2,
|
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 2,
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
#undef __mips16_syscall3
|
#undef __mips16_syscall3
|
||||||
|
|
||||||
long long __nomips16
|
long long int __nomips16
|
||||||
__mips16_syscall3 (long a0, long a1, long a2,
|
__mips16_syscall3 (long int a0, long int a1, long int a2,
|
||||||
long number)
|
long int number)
|
||||||
{
|
{
|
||||||
union __mips_syscall_return ret;
|
union __mips_syscall_return ret;
|
||||||
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 3,
|
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 3,
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
|
|
||||||
#undef __mips16_syscall4
|
#undef __mips16_syscall4
|
||||||
|
|
||||||
long long __nomips16
|
long long int __nomips16
|
||||||
__mips16_syscall4 (long a0, long a1, long a2, long a3,
|
__mips16_syscall4 (long int a0, long int a1, long int a2, long int a3,
|
||||||
long number)
|
long int number)
|
||||||
{
|
{
|
||||||
union __mips_syscall_return ret;
|
union __mips_syscall_return ret;
|
||||||
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 4,
|
ret.reg.v0 = INTERNAL_SYSCALL_MIPS16 (number, ret.reg.v1, 4,
|
||||||
|
@ -52,7 +52,7 @@
|
|||||||
#undef INLINE_SYSCALL
|
#undef INLINE_SYSCALL
|
||||||
#define INLINE_SYSCALL(name, nr, args...) \
|
#define INLINE_SYSCALL(name, nr, args...) \
|
||||||
({ INTERNAL_SYSCALL_DECL (_sc_err); \
|
({ INTERNAL_SYSCALL_DECL (_sc_err); \
|
||||||
long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
|
long int result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
|
||||||
if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
|
if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
|
||||||
{ \
|
{ \
|
||||||
__set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
|
__set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
|
||||||
@ -61,10 +61,10 @@
|
|||||||
result_var; })
|
result_var; })
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_DECL
|
#undef INTERNAL_SYSCALL_DECL
|
||||||
#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
|
#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERROR_P
|
#undef INTERNAL_SYSCALL_ERROR_P
|
||||||
#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err))
|
#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long int) (err))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERRNO
|
#undef INTERNAL_SYSCALL_ERRNO
|
||||||
#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
|
#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
|
||||||
@ -103,11 +103,11 @@
|
|||||||
|
|
||||||
union __mips_syscall_return
|
union __mips_syscall_return
|
||||||
{
|
{
|
||||||
long long val;
|
long long int val;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
long v0;
|
long int v0;
|
||||||
long v1;
|
long int v1;
|
||||||
}
|
}
|
||||||
reg;
|
reg;
|
||||||
};
|
};
|
||||||
@ -152,13 +152,13 @@ union __mips_syscall_return
|
|||||||
|
|
||||||
#define internal_syscall0(v0_init, input, number, err, dummy...) \
|
#define internal_syscall0(v0_init, input, number, err, dummy...) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -175,14 +175,14 @@ union __mips_syscall_return
|
|||||||
|
|
||||||
#define internal_syscall1(v0_init, input, number, err, arg1) \
|
#define internal_syscall1(v0_init, input, number, err, arg1) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -199,15 +199,15 @@ union __mips_syscall_return
|
|||||||
|
|
||||||
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
|
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -225,16 +225,16 @@ union __mips_syscall_return
|
|||||||
#define internal_syscall3(v0_init, input, number, err, \
|
#define internal_syscall3(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3) \
|
arg1, arg2, arg3) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a2 asm ("$6") = (long) (arg3); \
|
register long int __a2 asm ("$6") = (long int) (arg3); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -252,16 +252,16 @@ union __mips_syscall_return
|
|||||||
#define internal_syscall4(v0_init, input, number, err, \
|
#define internal_syscall4(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4) \
|
arg1, arg2, arg3, arg4) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a2 asm ("$6") = (long) (arg3); \
|
register long int __a2 asm ("$6") = (long int) (arg3); \
|
||||||
register long __a3 asm ("$7") = (long) (arg4); \
|
register long int __a3 asm ("$7") = (long int) (arg4); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -285,63 +285,66 @@ union __mips_syscall_return
|
|||||||
compiler specifics required for the stack arguments to be pushed,
|
compiler specifics required for the stack arguments to be pushed,
|
||||||
which would be the case if these syscalls were inlined. */
|
which would be the case if these syscalls were inlined. */
|
||||||
|
|
||||||
long long __nomips16 __mips_syscall5 (long arg1, long arg2, long arg3,
|
long long int __nomips16 __mips_syscall5 (long int arg1, long int arg2,
|
||||||
long arg4, long arg5,
|
long int arg3, long int arg4,
|
||||||
long number);
|
long int arg5,
|
||||||
|
long int number);
|
||||||
libc_hidden_proto (__mips_syscall5, nomips16)
|
libc_hidden_proto (__mips_syscall5, nomips16)
|
||||||
|
|
||||||
#define internal_syscall5(v0_init, input, number, err, \
|
#define internal_syscall5(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4, arg5) \
|
arg1, arg2, arg3, arg4, arg5) \
|
||||||
({ \
|
({ \
|
||||||
union __mips_syscall_return _sc_ret; \
|
union __mips_syscall_return _sc_ret; \
|
||||||
_sc_ret.val = __mips_syscall5 ((long) (arg1), \
|
_sc_ret.val = __mips_syscall5 ((long int) (arg1), \
|
||||||
(long) (arg2), \
|
(long int) (arg2), \
|
||||||
(long) (arg3), \
|
(long int) (arg3), \
|
||||||
(long) (arg4), \
|
(long int) (arg4), \
|
||||||
(long) (arg5), \
|
(long int) (arg5), \
|
||||||
(long) (number)); \
|
(long int) (number)); \
|
||||||
err = _sc_ret.reg.v1; \
|
err = _sc_ret.reg.v1; \
|
||||||
_sc_ret.reg.v0; \
|
_sc_ret.reg.v0; \
|
||||||
})
|
})
|
||||||
|
|
||||||
long long __nomips16 __mips_syscall6 (long arg1, long arg2, long arg3,
|
long long int __nomips16 __mips_syscall6 (long int arg1, long int arg2,
|
||||||
long arg4, long arg5, long arg6,
|
long int arg3, long int arg4,
|
||||||
long number);
|
long int arg5, long int arg6,
|
||||||
|
long int number);
|
||||||
libc_hidden_proto (__mips_syscall6, nomips16)
|
libc_hidden_proto (__mips_syscall6, nomips16)
|
||||||
|
|
||||||
#define internal_syscall6(v0_init, input, number, err, \
|
#define internal_syscall6(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4, arg5, arg6) \
|
arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||||
({ \
|
({ \
|
||||||
union __mips_syscall_return _sc_ret; \
|
union __mips_syscall_return _sc_ret; \
|
||||||
_sc_ret.val = __mips_syscall6 ((long) (arg1), \
|
_sc_ret.val = __mips_syscall6 ((long int) (arg1), \
|
||||||
(long) (arg2), \
|
(long int) (arg2), \
|
||||||
(long) (arg3), \
|
(long int) (arg3), \
|
||||||
(long) (arg4), \
|
(long int) (arg4), \
|
||||||
(long) (arg5), \
|
(long int) (arg5), \
|
||||||
(long) (arg6), \
|
(long int) (arg6), \
|
||||||
(long) (number)); \
|
(long int) (number)); \
|
||||||
err = _sc_ret.reg.v1; \
|
err = _sc_ret.reg.v1; \
|
||||||
_sc_ret.reg.v0; \
|
_sc_ret.reg.v0; \
|
||||||
})
|
})
|
||||||
|
|
||||||
long long __nomips16 __mips_syscall7 (long arg1, long arg2, long arg3,
|
long long int __nomips16 __mips_syscall7 (long int arg1, long int arg2,
|
||||||
long arg4, long arg5, long arg6,
|
long int arg3, long int arg4,
|
||||||
long arg7,
|
long int arg5, long int arg6,
|
||||||
long number);
|
long int arg7,
|
||||||
|
long int number);
|
||||||
libc_hidden_proto (__mips_syscall7, nomips16)
|
libc_hidden_proto (__mips_syscall7, nomips16)
|
||||||
|
|
||||||
#define internal_syscall7(v0_init, input, number, err, \
|
#define internal_syscall7(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
|
arg1, arg2, arg3, arg4, arg5, arg6, arg7) \
|
||||||
({ \
|
({ \
|
||||||
union __mips_syscall_return _sc_ret; \
|
union __mips_syscall_return _sc_ret; \
|
||||||
_sc_ret.val = __mips_syscall7 ((long) (arg1), \
|
_sc_ret.val = __mips_syscall7 ((long int) (arg1), \
|
||||||
(long) (arg2), \
|
(long int) (arg2), \
|
||||||
(long) (arg3), \
|
(long int) (arg3), \
|
||||||
(long) (arg4), \
|
(long int) (arg4), \
|
||||||
(long) (arg5), \
|
(long int) (arg5), \
|
||||||
(long) (arg6), \
|
(long int) (arg6), \
|
||||||
(long) (arg7), \
|
(long int) (arg7), \
|
||||||
(long) (number)); \
|
(long int) (number)); \
|
||||||
err = _sc_ret.reg.v1; \
|
err = _sc_ret.reg.v1; \
|
||||||
_sc_ret.reg.v0; \
|
_sc_ret.reg.v0; \
|
||||||
})
|
})
|
||||||
|
@ -47,14 +47,14 @@
|
|||||||
|
|
||||||
/* Convert X to a long long, without losing any bits if it is one
|
/* Convert X to a long long, without losing any bits if it is one
|
||||||
already or warning if it is a 32-bit pointer. */
|
already or warning if it is a 32-bit pointer. */
|
||||||
#define ARGIFY(X) ((long long) (__typeof__ ((X) - (X))) (X))
|
#define ARGIFY(X) ((long long int) (__typeof__ ((X) - (X))) (X))
|
||||||
|
|
||||||
/* Define a macro which expands into the inline wrapper code for a system
|
/* Define a macro which expands into the inline wrapper code for a system
|
||||||
call. */
|
call. */
|
||||||
#undef INLINE_SYSCALL
|
#undef INLINE_SYSCALL
|
||||||
#define INLINE_SYSCALL(name, nr, args...) \
|
#define INLINE_SYSCALL(name, nr, args...) \
|
||||||
({ INTERNAL_SYSCALL_DECL (_sc_err); \
|
({ INTERNAL_SYSCALL_DECL (_sc_err); \
|
||||||
long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
|
long int result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
|
||||||
if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
|
if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
|
||||||
{ \
|
{ \
|
||||||
__set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
|
__set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
|
||||||
@ -63,10 +63,10 @@
|
|||||||
result_var; })
|
result_var; })
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_DECL
|
#undef INTERNAL_SYSCALL_DECL
|
||||||
#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
|
#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERROR_P
|
#undef INTERNAL_SYSCALL_ERROR_P
|
||||||
#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err))
|
#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long int) (err))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERRNO
|
#undef INTERNAL_SYSCALL_ERRNO
|
||||||
#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
|
#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
|
||||||
@ -112,13 +112,13 @@
|
|||||||
|
|
||||||
#define internal_syscall0(v0_init, input, number, err, dummy...) \
|
#define internal_syscall0(v0_init, input, number, err, dummy...) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long long int __s0 asm ("$16") __attribute__ ((unused))\
|
||||||
= (number); \
|
= (number); \
|
||||||
register long long __v0 asm ("$2"); \
|
register long long int __v0 asm ("$2"); \
|
||||||
register long long __a3 asm ("$7"); \
|
register long long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -135,14 +135,14 @@
|
|||||||
|
|
||||||
#define internal_syscall1(v0_init, input, number, err, arg1) \
|
#define internal_syscall1(v0_init, input, number, err, arg1) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long long int __s0 asm ("$16") __attribute__ ((unused))\
|
||||||
= (number); \
|
= (number); \
|
||||||
register long long __v0 asm ("$2"); \
|
register long long int __v0 asm ("$2"); \
|
||||||
register long long __a0 asm ("$4") = ARGIFY (arg1); \
|
register long long int __a0 asm ("$4") = ARGIFY (arg1); \
|
||||||
register long long __a3 asm ("$7"); \
|
register long long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -159,15 +159,15 @@
|
|||||||
|
|
||||||
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
|
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long long int __s0 asm ("$16") __attribute__ ((unused))\
|
||||||
= (number); \
|
= (number); \
|
||||||
register long long __v0 asm ("$2"); \
|
register long long int __v0 asm ("$2"); \
|
||||||
register long long __a0 asm ("$4") = ARGIFY (arg1); \
|
register long long int __a0 asm ("$4") = ARGIFY (arg1); \
|
||||||
register long long __a1 asm ("$5") = ARGIFY (arg2); \
|
register long long int __a1 asm ("$5") = ARGIFY (arg2); \
|
||||||
register long long __a3 asm ("$7"); \
|
register long long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -185,16 +185,16 @@
|
|||||||
#define internal_syscall3(v0_init, input, number, err, \
|
#define internal_syscall3(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3) \
|
arg1, arg2, arg3) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long long int __s0 asm ("$16") __attribute__ ((unused))\
|
||||||
= (number); \
|
= (number); \
|
||||||
register long long __v0 asm ("$2"); \
|
register long long int __v0 asm ("$2"); \
|
||||||
register long long __a0 asm ("$4") = ARGIFY (arg1); \
|
register long long int __a0 asm ("$4") = ARGIFY (arg1); \
|
||||||
register long long __a1 asm ("$5") = ARGIFY (arg2); \
|
register long long int __a1 asm ("$5") = ARGIFY (arg2); \
|
||||||
register long long __a2 asm ("$6") = ARGIFY (arg3); \
|
register long long int __a2 asm ("$6") = ARGIFY (arg3); \
|
||||||
register long long __a3 asm ("$7"); \
|
register long long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -212,16 +212,16 @@
|
|||||||
#define internal_syscall4(v0_init, input, number, err, \
|
#define internal_syscall4(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4) \
|
arg1, arg2, arg3, arg4) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long long int __s0 asm ("$16") __attribute__ ((unused))\
|
||||||
= (number); \
|
= (number); \
|
||||||
register long long __v0 asm ("$2"); \
|
register long long int __v0 asm ("$2"); \
|
||||||
register long long __a0 asm ("$4") = ARGIFY (arg1); \
|
register long long int __a0 asm ("$4") = ARGIFY (arg1); \
|
||||||
register long long __a1 asm ("$5") = ARGIFY (arg2); \
|
register long long int __a1 asm ("$5") = ARGIFY (arg2); \
|
||||||
register long long __a2 asm ("$6") = ARGIFY (arg3); \
|
register long long int __a2 asm ("$6") = ARGIFY (arg3); \
|
||||||
register long long __a3 asm ("$7") = ARGIFY (arg4); \
|
register long long int __a3 asm ("$7") = ARGIFY (arg4); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -239,17 +239,17 @@
|
|||||||
#define internal_syscall5(v0_init, input, number, err, \
|
#define internal_syscall5(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4, arg5) \
|
arg1, arg2, arg3, arg4, arg5) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long long int __s0 asm ("$16") __attribute__ ((unused))\
|
||||||
= (number); \
|
= (number); \
|
||||||
register long long __v0 asm ("$2"); \
|
register long long int __v0 asm ("$2"); \
|
||||||
register long long __a0 asm ("$4") = ARGIFY (arg1); \
|
register long long int __a0 asm ("$4") = ARGIFY (arg1); \
|
||||||
register long long __a1 asm ("$5") = ARGIFY (arg2); \
|
register long long int __a1 asm ("$5") = ARGIFY (arg2); \
|
||||||
register long long __a2 asm ("$6") = ARGIFY (arg3); \
|
register long long int __a2 asm ("$6") = ARGIFY (arg3); \
|
||||||
register long long __a3 asm ("$7") = ARGIFY (arg4); \
|
register long long int __a3 asm ("$7") = ARGIFY (arg4); \
|
||||||
register long long __a4 asm ("$8") = ARGIFY (arg5); \
|
register long long int __a4 asm ("$8") = ARGIFY (arg5); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -267,18 +267,18 @@
|
|||||||
#define internal_syscall6(v0_init, input, number, err, \
|
#define internal_syscall6(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4, arg5, arg6) \
|
arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long long int __s0 asm ("$16") __attribute__ ((unused))\
|
||||||
= (number); \
|
= (number); \
|
||||||
register long long __v0 asm ("$2"); \
|
register long long int __v0 asm ("$2"); \
|
||||||
register long long __a0 asm ("$4") = ARGIFY (arg1); \
|
register long long int __a0 asm ("$4") = ARGIFY (arg1); \
|
||||||
register long long __a1 asm ("$5") = ARGIFY (arg2); \
|
register long long int __a1 asm ("$5") = ARGIFY (arg2); \
|
||||||
register long long __a2 asm ("$6") = ARGIFY (arg3); \
|
register long long int __a2 asm ("$6") = ARGIFY (arg3); \
|
||||||
register long long __a3 asm ("$7") = ARGIFY (arg4); \
|
register long long int __a3 asm ("$7") = ARGIFY (arg4); \
|
||||||
register long long __a4 asm ("$8") = ARGIFY (arg5); \
|
register long long int __a4 asm ("$8") = ARGIFY (arg5); \
|
||||||
register long long __a5 asm ("$9") = ARGIFY (arg6); \
|
register long long int __a5 asm ("$9") = ARGIFY (arg6); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
#undef INLINE_SYSCALL
|
#undef INLINE_SYSCALL
|
||||||
#define INLINE_SYSCALL(name, nr, args...) \
|
#define INLINE_SYSCALL(name, nr, args...) \
|
||||||
({ INTERNAL_SYSCALL_DECL (_sc_err); \
|
({ INTERNAL_SYSCALL_DECL (_sc_err); \
|
||||||
long result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
|
long int result_var = INTERNAL_SYSCALL (name, _sc_err, nr, args); \
|
||||||
if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
|
if ( INTERNAL_SYSCALL_ERROR_P (result_var, _sc_err) ) \
|
||||||
{ \
|
{ \
|
||||||
__set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
|
__set_errno (INTERNAL_SYSCALL_ERRNO (result_var, _sc_err)); \
|
||||||
@ -59,10 +59,10 @@
|
|||||||
result_var; })
|
result_var; })
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_DECL
|
#undef INTERNAL_SYSCALL_DECL
|
||||||
#define INTERNAL_SYSCALL_DECL(err) long err __attribute__ ((unused))
|
#define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERROR_P
|
#undef INTERNAL_SYSCALL_ERROR_P
|
||||||
#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long) (err))
|
#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void) (val), (long int) (err))
|
||||||
|
|
||||||
#undef INTERNAL_SYSCALL_ERRNO
|
#undef INTERNAL_SYSCALL_ERRNO
|
||||||
#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
|
#define INTERNAL_SYSCALL_ERRNO(val, err) ((void) (err), val)
|
||||||
@ -108,13 +108,13 @@
|
|||||||
|
|
||||||
#define internal_syscall0(v0_init, input, number, err, dummy...) \
|
#define internal_syscall0(v0_init, input, number, err, dummy...) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -131,14 +131,14 @@
|
|||||||
|
|
||||||
#define internal_syscall1(v0_init, input, number, err, arg1) \
|
#define internal_syscall1(v0_init, input, number, err, arg1) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -155,15 +155,15 @@
|
|||||||
|
|
||||||
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
|
#define internal_syscall2(v0_init, input, number, err, arg1, arg2) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -181,16 +181,16 @@
|
|||||||
#define internal_syscall3(v0_init, input, number, err, \
|
#define internal_syscall3(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3) \
|
arg1, arg2, arg3) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a2 asm ("$6") = (long) (arg3); \
|
register long int __a2 asm ("$6") = (long int) (arg3); \
|
||||||
register long __a3 asm ("$7"); \
|
register long int __a3 asm ("$7"); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -208,16 +208,16 @@
|
|||||||
#define internal_syscall4(v0_init, input, number, err, \
|
#define internal_syscall4(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4) \
|
arg1, arg2, arg3, arg4) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a2 asm ("$6") = (long) (arg3); \
|
register long int __a2 asm ("$6") = (long int) (arg3); \
|
||||||
register long __a3 asm ("$7") = (long) (arg4); \
|
register long int __a3 asm ("$7") = (long int) (arg4); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -235,17 +235,17 @@
|
|||||||
#define internal_syscall5(v0_init, input, number, err, \
|
#define internal_syscall5(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4, arg5) \
|
arg1, arg2, arg3, arg4, arg5) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a2 asm ("$6") = (long) (arg3); \
|
register long int __a2 asm ("$6") = (long int) (arg3); \
|
||||||
register long __a3 asm ("$7") = (long) (arg4); \
|
register long int __a3 asm ("$7") = (long int) (arg4); \
|
||||||
register long __a4 asm ("$8") = (long) (arg5); \
|
register long int __a4 asm ("$8") = (long int) (arg5); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
@ -263,18 +263,18 @@
|
|||||||
#define internal_syscall6(v0_init, input, number, err, \
|
#define internal_syscall6(v0_init, input, number, err, \
|
||||||
arg1, arg2, arg3, arg4, arg5, arg6) \
|
arg1, arg2, arg3, arg4, arg5, arg6) \
|
||||||
({ \
|
({ \
|
||||||
long _sys_result; \
|
long int _sys_result; \
|
||||||
\
|
\
|
||||||
{ \
|
{ \
|
||||||
register long __s0 asm ("$16") __attribute__ ((unused)) \
|
register long int __s0 asm ("$16") __attribute__ ((unused)) \
|
||||||
= (number); \
|
= (number); \
|
||||||
register long __v0 asm ("$2"); \
|
register long int __v0 asm ("$2"); \
|
||||||
register long __a0 asm ("$4") = (long) (arg1); \
|
register long int __a0 asm ("$4") = (long int) (arg1); \
|
||||||
register long __a1 asm ("$5") = (long) (arg2); \
|
register long int __a1 asm ("$5") = (long int) (arg2); \
|
||||||
register long __a2 asm ("$6") = (long) (arg3); \
|
register long int __a2 asm ("$6") = (long int) (arg3); \
|
||||||
register long __a3 asm ("$7") = (long) (arg4); \
|
register long int __a3 asm ("$7") = (long int) (arg4); \
|
||||||
register long __a4 asm ("$8") = (long) (arg5); \
|
register long int __a4 asm ("$8") = (long int) (arg5); \
|
||||||
register long __a5 asm ("$9") = (long) (arg6); \
|
register long int __a5 asm ("$9") = (long int) (arg6); \
|
||||||
__asm__ volatile ( \
|
__asm__ volatile ( \
|
||||||
".set\tnoreorder\n\t" \
|
".set\tnoreorder\n\t" \
|
||||||
v0_init \
|
v0_init \
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <sys/asm.h>
|
#include <sys/asm.h>
|
||||||
|
|
||||||
/* Usage:
|
/* Usage:
|
||||||
long syscall (syscall_number, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
long int syscall (syscall_number, arg1, arg2, arg3, arg4, arg5, arg6, arg7)
|
||||||
|
|
||||||
We need to do some arg shifting, syscall_number will be in v0. */
|
We need to do some arg shifting, syscall_number will be in v0. */
|
||||||
|
|
||||||
|
@ -36,8 +36,8 @@
|
|||||||
the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */
|
the INTERNAL_SYSCALL_{ERROR_P,ERRNO} macros work correctly. */
|
||||||
#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
|
#define INTERNAL_VSYSCALL_CALL(funcptr, err, nr, args...) \
|
||||||
({ \
|
({ \
|
||||||
long _ret = funcptr (args); \
|
long int _ret = funcptr (args); \
|
||||||
err = ((unsigned long) (_ret) >= (unsigned long) -4095L); \
|
err = ((unsigned long int) (_ret) >= (unsigned long int) -4095L); \
|
||||||
if (err) \
|
if (err) \
|
||||||
_ret = -_ret; \
|
_ret = -_ret; \
|
||||||
_ret; \
|
_ret; \
|
||||||
|
Loading…
Reference in New Issue
Block a user