aboutsummaryrefslogtreecommitdiffstats
path: root/arch/nios2/include/asm/syscall.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/nios2/include/asm/syscall.h')
-rw-r--r--arch/nios2/include/asm/syscall.h42
1 files changed, 7 insertions, 35 deletions
diff --git a/arch/nios2/include/asm/syscall.h b/arch/nios2/include/asm/syscall.h
index 792bd449d839..d7624ed06efb 100644
--- a/arch/nios2/include/asm/syscall.h
+++ b/arch/nios2/include/asm/syscall.h
@@ -69,42 +69,14 @@ static inline void syscall_get_arguments(struct task_struct *task,
69} 69}
70 70
71static inline void syscall_set_arguments(struct task_struct *task, 71static inline void syscall_set_arguments(struct task_struct *task,
72 struct pt_regs *regs, unsigned int i, unsigned int n, 72 struct pt_regs *regs, const unsigned long *args)
73 const unsigned long *args)
74{ 73{
75 BUG_ON(i + n > 6); 74 regs->r4 = *args++;
76 75 regs->r5 = *args++;
77 switch (i) { 76 regs->r6 = *args++;
78 case 0: 77 regs->r7 = *args++;
79 if (!n--) 78 regs->r8 = *args++;
80 break; 79 regs->r9 = *args;
81 regs->r4 = *args++;
82 case 1:
83 if (!n--)
84 break;
85 regs->r5 = *args++;
86 case 2:
87 if (!n--)
88 break;
89 regs->r6 = *args++;
90 case 3:
91 if (!n--)
92 break;
93 regs->r7 = *args++;
94 case 4:
95 if (!n--)
96 break;
97 regs->r8 = *args++;
98 case 5:
99 if (!n--)
100 break;
101 regs->r9 = *args++;
102 case 6:
103 if (!n)
104 break;
105 default:
106 BUG();
107 }
108} 80}
109 81
110#endif 82#endif