ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / s390 / kernel / compat_wrapper.S
1 /*
2 *  arch/s390/kernel/sys_wrapper31.S
3 *    wrapper for 31 bit compatible system calls.
4 *
5 *  S390 version
6 *    Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
7 *    Author(s): Gerhard Tonn (ton@de.ibm.com),
8 *               Thomas Spatzier (tspat@de.ibm.com)
9 */ 
10
11         .globl  sys32_exit_wrapper 
12 sys32_exit_wrapper:
13         lgfr    %r2,%r2                 # int
14         jg      sys_exit                # branch to sys_exit
15     
16         .globl  sys32_read_wrapper 
17 sys32_read_wrapper:
18         llgfr   %r2,%r2                 # unsigned int
19         llgtr   %r3,%r3                 # char *
20         llgfr   %r4,%r4                 # size_t
21         jg      sys32_read              # branch to sys_read
22
23         .globl  sys32_write_wrapper 
24 sys32_write_wrapper:
25         llgfr   %r2,%r2                 # unsigned int
26         llgtr   %r3,%r3                 # const char *
27         llgfr   %r4,%r4                 # size_t
28         jg      sys32_write             # branch to system call
29
30         .globl  sys32_open_wrapper 
31 sys32_open_wrapper:
32         llgtr   %r2,%r2                 # const char *
33         lgfr    %r3,%r3                 # int
34         lgfr    %r4,%r4                 # int
35         jg      sys_open                # branch to system call
36
37         .globl  sys32_close_wrapper 
38 sys32_close_wrapper:
39         llgfr   %r2,%r2                 # unsigned int
40         jg      sys_close               # branch to system call
41
42         .globl  sys32_creat_wrapper 
43 sys32_creat_wrapper:
44         llgtr   %r2,%r2                 # const char *
45         lgfr    %r3,%r3                 # int
46         jg      sys_creat               # branch to system call
47
48         .globl  sys32_link_wrapper 
49 sys32_link_wrapper:
50         llgtr   %r2,%r2                 # const char *
51         llgtr   %r3,%r3                 # const char *
52         jg      sys_link                # branch to system call
53
54         .globl  sys32_unlink_wrapper 
55 sys32_unlink_wrapper:
56         llgtr   %r2,%r2                 # const char *
57         jg      sys_unlink              # branch to system call
58
59         .globl  sys32_chdir_wrapper 
60 sys32_chdir_wrapper:
61         llgtr   %r2,%r2                 # const char *
62         jg      sys_chdir               # branch to system call
63
64         .globl  sys32_time_wrapper 
65 sys32_time_wrapper:
66         llgtr   %r2,%r2                 # int *
67         jg      sys_time                # branch to system call
68
69         .globl  sys32_mknod_wrapper 
70 sys32_mknod_wrapper:
71         llgtr   %r2,%r2                 # const char *
72         lgfr    %r3,%r3                 # int 
73         llgfr   %r4,%r4                 # dev
74         jg      sys_mknod               # branch to system call
75
76         .globl  sys32_chmod_wrapper 
77 sys32_chmod_wrapper:
78         llgtr   %r2,%r2                 # const char *
79         llgfr   %r3,%r3                 # mode_t
80         jg      sys_chmod               # branch to system call
81
82         .globl  sys32_lchown16_wrapper 
83 sys32_lchown16_wrapper:
84         llgtr   %r2,%r2                 # const char *
85         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t 
86         llgfr   %r4,%r4                 # __kernel_old_uid_emu31_t 
87         jg      sys32_lchown16          # branch to system call
88
89         .globl  sys32_lseek_wrapper 
90 sys32_lseek_wrapper:
91         llgfr   %r2,%r2                 # unsigned int
92         lgfr    %r3,%r3                 # off_t
93         llgfr   %r4,%r4                 # unsigned int
94         jg      sys_lseek               # branch to system call
95
96 #sys32_getpid_wrapper                           # void 
97
98         .globl  sys32_mount_wrapper 
99 sys32_mount_wrapper:
100         llgtr   %r2,%r2                 # char *
101         llgtr   %r3,%r3                 # char *
102         llgtr   %r4,%r4                 # char *
103         llgfr   %r5,%r5                 # unsigned long
104         llgtr   %r6,%r6                 # void *
105         jg      compat_sys_mount        # branch to system call
106
107         .globl  sys32_oldumount_wrapper 
108 sys32_oldumount_wrapper:
109         llgtr   %r2,%r2                 # char *
110         jg      sys_oldumount           # branch to system call
111
112         .globl  sys32_setuid16_wrapper 
113 sys32_setuid16_wrapper:
114         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t 
115         jg      sys32_setuid16          # branch to system call
116
117 #sys32_getuid16_wrapper                 # void 
118
119         .globl  sys32_ptrace_wrapper 
120 sys32_ptrace_wrapper:
121         lgfr    %r2,%r2                 # long
122         lgfr    %r3,%r3                 # long
123         llgtr   %r4,%r4                 # long
124         llgfr   %r5,%r5                 # long
125         jg      sys_ptrace              # branch to system call
126
127         .globl  sys32_alarm_wrapper 
128 sys32_alarm_wrapper:
129         llgfr   %r2,%r2                 # unsigned int
130         jg      sys_alarm               # branch to system call
131
132 #sys32_pause_wrapper                    # void 
133
134         .globl  compat_sys_utime_wrapper 
135 compat_sys_utime_wrapper:
136         llgtr   %r2,%r2                 # char *
137         llgtr   %r3,%r3                 # struct compat_utimbuf *
138         jg      compat_sys_utime        # branch to system call
139
140         .globl  sys32_access_wrapper 
141 sys32_access_wrapper:
142         llgtr   %r2,%r2                 # const char *
143         lgfr    %r3,%r3                 # int
144         jg      sys_access              # branch to system call
145
146         .globl  sys32_nice_wrapper 
147 sys32_nice_wrapper:
148         lgfr    %r2,%r2                 # int
149         jg      sys_nice                # branch to system call
150
151 #sys32_sync_wrapper                     # void 
152
153         .globl  sys32_kill_wrapper 
154 sys32_kill_wrapper:
155         lgfr    %r2,%r2                 # int
156         lgfr    %r3,%r3                 # int
157         jg      sys_kill                # branch to system call
158
159         .globl  sys32_rename_wrapper 
160 sys32_rename_wrapper:
161         llgtr   %r2,%r2                 # const char *
162         llgtr   %r3,%r3                 # const char *
163         jg      sys_rename              # branch to system call
164
165         .globl  sys32_mkdir_wrapper 
166 sys32_mkdir_wrapper:
167         llgtr   %r2,%r2                 # const char *
168         lgfr    %r3,%r3                 # int
169         jg      sys_mkdir               # branch to system call
170
171         .globl  sys32_rmdir_wrapper 
172 sys32_rmdir_wrapper:
173         llgtr   %r2,%r2                 # const char *
174         jg      sys_rmdir               # branch to system call
175
176         .globl  sys32_dup_wrapper 
177 sys32_dup_wrapper:
178         llgfr   %r2,%r2                 # unsigned int
179         jg      sys_dup                 # branch to system call
180
181         .globl  sys32_pipe_wrapper 
182 sys32_pipe_wrapper:
183         llgtr   %r2,%r2                 # u32 *
184         jg      sys_pipe                # branch to system call
185
186         .globl  compat_sys_times_wrapper 
187 compat_sys_times_wrapper:
188         llgtr   %r2,%r2                 # struct compat_tms *
189         jg      compat_sys_times        # branch to system call
190
191         .globl  sys32_brk_wrapper 
192 sys32_brk_wrapper:
193         llgtr   %r2,%r2                 # unsigned long
194         jg      sys_brk                 # branch to system call
195
196         .globl  sys32_setgid16_wrapper 
197 sys32_setgid16_wrapper:
198         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
199         jg      sys32_setgid16          # branch to system call
200
201 #sys32_getgid16_wrapper                 # void 
202
203         .globl sys32_signal_wrapper
204 sys32_signal_wrapper:
205         lgfr    %r2,%r2                 # int 
206         llgtr   %r3,%r3                 # __sighandler_t
207         jg      sys_signal
208
209 #sys32_geteuid16_wrapper                # void 
210
211 #sys32_getegid16_wrapper                # void 
212
213         .globl  sys32_acct_wrapper 
214 sys32_acct_wrapper:
215         llgtr   %r2,%r2                 # char *
216         jg      sys_acct                # branch to system call
217
218         .globl  sys32_umount_wrapper 
219 sys32_umount_wrapper:
220         llgtr   %r2,%r2                 # char *
221         lgfr    %r3,%r3                 # int
222         jg      sys_umount              # branch to system call
223
224         .globl  compat_sys_ioctl_wrapper
225 compat_sys_ioctl_wrapper:
226         llgfr   %r2,%r2                 # unsigned int
227         llgfr   %r3,%r3                 # unsigned int
228         llgfr   %r4,%r4                 # unsigned int
229         jg      compat_sys_ioctl        # branch to system call
230
231         .globl  compat_sys_fcntl_wrapper 
232 compat_sys_fcntl_wrapper:
233         llgfr   %r2,%r2                 # unsigned int
234         llgfr   %r3,%r3                 # unsigned int 
235         llgfr   %r4,%r4                 # unsigned long
236         jg      compat_sys_fcntl        # branch to system call
237
238         .globl  sys32_setpgid_wrapper 
239 sys32_setpgid_wrapper:
240         lgfr    %r2,%r2                 # pid_t
241         lgfr    %r3,%r3                 # pid_t
242         jg      sys_setpgid             # branch to system call
243
244         .globl  sys32_umask_wrapper 
245 sys32_umask_wrapper:
246         lgfr    %r2,%r2                 # int
247         jg      sys_umask               # branch to system call
248
249         .globl  sys32_chroot_wrapper 
250 sys32_chroot_wrapper:
251         llgtr   %r2,%r2                 # char *
252         jg      sys_chroot              # branch to system call
253
254         .globl sys32_ustat_wrapper
255 sys32_ustat_wrapper:
256         llgfr   %r2,%r2                 # dev_t 
257         llgtr   %r3,%r3                 # struct ustat *
258         jg      sys_ustat
259
260         .globl  sys32_dup2_wrapper 
261 sys32_dup2_wrapper:
262         llgfr   %r2,%r2                 # unsigned int
263         llgfr   %r3,%r3                 # unsigned int
264         jg      sys_dup2                # branch to system call
265
266 #sys32_getppid_wrapper                  # void 
267
268 #sys32_getpgrp_wrapper                  # void 
269
270 #sys32_setsid_wrapper                   # void 
271
272         .globl  sys32_sigaction_wrapper
273 sys32_sigaction_wrapper:
274         lgfr    %r2,%r2                 # int 
275         llgtr   %r3,%r3                 # const struct old_sigaction *
276         llgtr   %r4,%r4                 # struct old_sigaction32 *
277         jg      sys32_sigaction         # branch to system call
278
279         .globl  sys32_setreuid16_wrapper 
280 sys32_setreuid16_wrapper:
281         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t 
282         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t 
283         jg      sys32_setreuid16        # branch to system call
284
285         .globl  sys32_setregid16_wrapper 
286 sys32_setregid16_wrapper:
287         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
288         llgfr   %r3,%r3                 # __kernel_old_gid_emu31_t 
289         jg      sys32_setregid16        # branch to system call
290
291 #sys32_sigsuspend_wrapper               # done in sigsuspend_glue 
292
293         .globl  compat_sys_sigpending_wrapper 
294 compat_sys_sigpending_wrapper:
295         llgtr   %r2,%r2                 # compat_old_sigset_t *
296         jg      compat_sys_sigpending   # branch to system call
297
298         .globl  sys32_sethostname_wrapper 
299 sys32_sethostname_wrapper:
300         llgtr   %r2,%r2                 # char *
301         lgfr    %r3,%r3                 # int
302         jg      sys_sethostname         # branch to system call
303
304         .globl  compat_sys_setrlimit_wrapper 
305 compat_sys_setrlimit_wrapper:
306         llgfr   %r2,%r2                 # unsigned int
307         llgtr   %r3,%r3                 # struct rlimit_emu31 *
308         jg      compat_sys_setrlimit    # branch to system call
309
310         .globl  compat_sys_old_getrlimit_wrapper 
311 compat_sys_old_getrlimit_wrapper:
312         llgfr   %r2,%r2                 # unsigned int
313         llgtr   %r3,%r3                 # struct rlimit_emu31 *
314         jg      compat_sys_old_getrlimit # branch to system call
315
316         .globl  compat_sys_getrlimit_wrapper 
317 compat_sys_getrlimit_wrapper:
318         llgfr   %r2,%r2                 # unsigned int
319         llgtr   %r3,%r3                 # struct rlimit_emu31 *
320         jg      compat_sys_getrlimit    # branch to system call
321
322         .globl  sys32_mmap2_wrapper 
323 sys32_mmap2_wrapper:
324         llgtr   %r2,%r2                 # struct mmap_arg_struct_emu31 *
325         jg      sys32_mmap2                     # branch to system call
326
327         .globl  compat_sys_getrusage_wrapper 
328 compat_sys_getrusage_wrapper:
329         lgfr    %r2,%r2                 # int
330         llgtr   %r3,%r3                 # struct rusage_emu31 *
331         jg      compat_sys_getrusage    # branch to system call
332
333         .globl  sys32_gettimeofday_wrapper 
334 sys32_gettimeofday_wrapper:
335         llgtr   %r2,%r2                 # struct timeval_emu31 *
336         llgtr   %r3,%r3                 # struct timezone *
337         jg      sys32_gettimeofday      # branch to system call
338
339         .globl  sys32_settimeofday_wrapper 
340 sys32_settimeofday_wrapper:
341         llgtr   %r2,%r2                 # struct timeval_emu31 *
342         llgtr   %r3,%r3                 # struct timezone *
343         jg      sys32_settimeofday      # branch to system call
344
345         .globl  sys32_getgroups16_wrapper 
346 sys32_getgroups16_wrapper:
347         lgfr    %r2,%r2                 # int
348         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
349         jg      sys32_getgroups16       # branch to system call
350
351         .globl  sys32_setgroups16_wrapper 
352 sys32_setgroups16_wrapper:
353         lgfr    %r2,%r2                 # int
354         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
355         jg      sys32_setgroups16       # branch to system call
356
357         .globl  sys32_symlink_wrapper 
358 sys32_symlink_wrapper:
359         llgtr   %r2,%r2                 # const char *
360         llgtr   %r3,%r3                 # const char *
361         jg      sys_symlink             # branch to system call
362
363         .globl  sys32_readlink_wrapper 
364 sys32_readlink_wrapper:
365         llgtr   %r2,%r2                 # const char *
366         llgtr   %r3,%r3                 # char *
367         lgfr    %r4,%r4                 # int
368         jg      sys_readlink            # branch to system call
369
370         .globl  sys32_uselib_wrapper 
371 sys32_uselib_wrapper:
372         llgtr   %r2,%r2                 # const char *
373         jg      sys_uselib              # branch to system call
374
375         .globl  sys32_swapon_wrapper 
376 sys32_swapon_wrapper:
377         llgtr   %r2,%r2                 # const char *
378         lgfr    %r3,%r3                 # int
379         jg      sys_swapon              # branch to system call
380
381         .globl  sys32_reboot_wrapper 
382 sys32_reboot_wrapper:
383         lgfr    %r2,%r2                 # int
384         lgfr    %r3,%r3                 # int
385         llgfr   %r4,%r4                 # unsigned int
386         llgtr   %r5,%r5                 # void *
387         jg      sys_reboot              # branch to system call
388
389         .globl  old32_readdir_wrapper 
390 old32_readdir_wrapper:
391         llgfr   %r2,%r2                 # unsigned int
392         llgtr   %r3,%r3                 # void *
393         llgfr   %r4,%r4                 # unsigned int
394         jg      old32_readdir           # branch to system call
395
396         .globl  old32_mmap_wrapper 
397 old32_mmap_wrapper:
398         llgtr   %r2,%r2                 # struct mmap_arg_struct_emu31 *
399         jg      old32_mmap              # branch to system call
400
401         .globl  sys32_munmap_wrapper 
402 sys32_munmap_wrapper:
403         llgfr   %r2,%r2                 # unsigned long
404         llgfr   %r3,%r3                 # size_t 
405         jg      sys_munmap              # branch to system call
406
407         .globl  sys32_truncate_wrapper 
408 sys32_truncate_wrapper:
409         llgtr   %r2,%r2                 # const char *
410         llgfr   %r3,%r3                 # unsigned long
411         jg      sys_truncate            # branch to system call
412
413         .globl  sys32_ftruncate_wrapper 
414 sys32_ftruncate_wrapper:
415         llgfr   %r2,%r2                 # unsigned int
416         llgfr   %r3,%r3                 # unsigned long
417         jg      sys_ftruncate           # branch to system call
418
419         .globl  sys32_fchmod_wrapper 
420 sys32_fchmod_wrapper:
421         llgfr   %r2,%r2                 # unsigned int
422         llgfr   %r3,%r3                 # mode_t
423         jg      sys_fchmod              # branch to system call
424
425         .globl  sys32_fchown16_wrapper 
426 sys32_fchown16_wrapper:
427         llgfr   %r2,%r2                 # unsigned int
428         llgfr   %r3,%r3                 # compat_uid_t
429         llgfr   %r4,%r4                 # compat_uid_t
430         jg      sys32_fchown16          # branch to system call
431
432         .globl  sys32_getpriority_wrapper 
433 sys32_getpriority_wrapper:
434         lgfr    %r2,%r2                 # int
435         lgfr    %r3,%r3                 # int
436         jg      sys_getpriority         # branch to system call
437
438         .globl  sys32_setpriority_wrapper 
439 sys32_setpriority_wrapper:
440         lgfr    %r2,%r2                 # int
441         lgfr    %r3,%r3                 # int
442         lgfr    %r4,%r4                 # int
443         jg      sys_setpriority         # branch to system call
444
445         .globl  compat_sys_statfs_wrapper 
446 compat_sys_statfs_wrapper:
447         llgtr   %r2,%r2                 # char *
448         llgtr   %r3,%r3                 # struct compat_statfs *
449         jg      compat_sys_statfs       # branch to system call
450
451         .globl  compat_sys_fstatfs_wrapper 
452 compat_sys_fstatfs_wrapper:
453         llgfr   %r2,%r2                 # unsigned int
454         llgtr   %r3,%r3                 # struct compat_statfs *
455         jg      compat_sys_fstatfs      # branch to system call
456
457         .globl  compat_sys_socketcall_wrapper 
458 compat_sys_socketcall_wrapper:
459         lgfr    %r2,%r2                 # int
460         llgtr   %r3,%r3                 # u32 *
461         jg      compat_sys_socketcall   # branch to system call
462
463         .globl  sys32_syslog_wrapper 
464 sys32_syslog_wrapper:
465         lgfr    %r2,%r2                 # int
466         llgtr   %r3,%r3                 # char *
467         lgfr    %r4,%r4                 # int
468         jg      sys_syslog              # branch to system call
469
470         .globl  compat_sys_setitimer_wrapper 
471 compat_sys_setitimer_wrapper:
472         lgfr    %r2,%r2                 # int
473         llgtr   %r3,%r3                 # struct itimerval_emu31 *
474         llgtr   %r4,%r4                 # struct itimerval_emu31 *
475         jg      compat_sys_setitimer    # branch to system call
476
477         .globl  compat_sys_getitimer_wrapper 
478 compat_sys_getitimer_wrapper:
479         lgfr    %r2,%r2                 # int
480         llgtr   %r3,%r3                 # struct itimerval_emu31 *
481         jg      compat_sys_getitimer    # branch to system call
482
483         .globl  compat_sys_newstat_wrapper 
484 compat_sys_newstat_wrapper:
485         llgtr   %r2,%r2                 # char *
486         llgtr   %r3,%r3                 # struct stat_emu31 *
487         jg      compat_sys_newstat      # branch to system call
488
489         .globl  compat_sys_newlstat_wrapper 
490 compat_sys_newlstat_wrapper:
491         llgtr   %r2,%r2                 # char *
492         llgtr   %r3,%r3                 # struct stat_emu31 *
493         jg      compat_sys_newlstat     # branch to system call
494
495         .globl  compat_sys_newfstat_wrapper 
496 compat_sys_newfstat_wrapper:
497         llgfr   %r2,%r2                 # unsigned int
498         llgtr   %r3,%r3                 # struct stat_emu31 *
499         jg      compat_sys_newfstat     # branch to system call
500
501 #sys32_vhangup_wrapper                  # void 
502
503         .globl  compat_sys_wait4_wrapper 
504 compat_sys_wait4_wrapper:
505         lgfr    %r2,%r2                 # pid_t
506         llgtr   %r3,%r3                 # unsigned int *
507         lgfr    %r4,%r4                 # int
508         llgtr   %r5,%r5                 # struct rusage *
509         jg      compat_sys_wait4        # branch to system call
510
511         .globl  sys32_swapoff_wrapper 
512 sys32_swapoff_wrapper:
513         llgtr   %r2,%r2                 # const char *
514         jg      sys_swapoff             # branch to system call
515
516         .globl  sys32_sysinfo_wrapper 
517 sys32_sysinfo_wrapper:
518         llgtr   %r2,%r2                 # struct sysinfo_emu31 *
519         jg      sys32_sysinfo           # branch to system call
520
521         .globl  sys32_ipc_wrapper 
522 sys32_ipc_wrapper:
523         llgfr   %r2,%r2                 # uint
524         lgfr    %r3,%r3                 # int
525         lgfr    %r4,%r4                 # int
526         lgfr    %r5,%r5                 # int
527         llgfr   %r6,%r6                 # u32
528         jg      sys32_ipc               # branch to system call
529
530         .globl  sys32_fsync_wrapper 
531 sys32_fsync_wrapper:
532         llgfr   %r2,%r2                 # unsigned int
533         jg      sys_fsync               # branch to system call
534
535 #sys32_sigreturn_wrapper                # done in sigreturn_glue 
536
537 #sys32_clone_wrapper                    # done in clone_glue 
538
539         .globl  sys32_setdomainname_wrapper 
540 sys32_setdomainname_wrapper:
541         llgtr   %r2,%r2                 # char *
542         lgfr    %r3,%r3                 # int
543         jg      sys_setdomainname       # branch to system call
544
545         .globl  sys32_newuname_wrapper 
546 sys32_newuname_wrapper:
547         llgtr   %r2,%r2                 # struct new_utsname *
548         jg      s390x_newuname          # branch to system call
549
550         .globl  sys32_adjtimex_wrapper 
551 sys32_adjtimex_wrapper:
552         llgtr   %r2,%r2                 # struct timex_emu31 *
553         jg      sys32_adjtimex          # branch to system call
554
555         .globl  sys32_mprotect_wrapper 
556 sys32_mprotect_wrapper:
557         llgtr   %r2,%r2                 # unsigned long (actually pointer
558         llgfr   %r3,%r3                 # size_t
559         llgfr   %r4,%r4                 # unsigned long
560         jg      sys_mprotect            # branch to system call
561
562         .globl  compat_sys_sigprocmask_wrapper 
563 compat_sys_sigprocmask_wrapper:
564         lgfr    %r2,%r2                 # int
565         llgtr   %r3,%r3                 # compat_old_sigset_t *
566         llgtr   %r4,%r4                 # compat_old_sigset_t *
567         jg      compat_sys_sigprocmask          # branch to system call
568
569         .globl  sys32_init_module_wrapper 
570 sys32_init_module_wrapper:
571         llgtr   %r2,%r2                 # void *
572         llgfr   %r3,%r3                 # unsigned long
573         llgtr   %r4,%r4                 # char *
574         jg      sys32_init_module       # branch to system call
575
576         .globl  sys32_delete_module_wrapper 
577 sys32_delete_module_wrapper:
578         llgtr   %r2,%r2                 # const char *
579         llgfr   %r3,%r3                 # unsigned int
580         jg      sys32_delete_module     # branch to system call
581
582         .globl  sys32_quotactl_wrapper 
583 sys32_quotactl_wrapper:
584         llgfr   %r2,%r2                 # unsigned int
585         llgtr   %r3,%r3                 # const char *
586         llgfr   %r4,%r4                 # qid_t
587         llgtr   %r5,%r5                 # caddr_t
588         jg      sys_quotactl            # branch to system call
589
590         .globl  sys32_getpgid_wrapper 
591 sys32_getpgid_wrapper:
592         lgfr    %r2,%r2                 # pid_t
593         jg      sys_getpgid             # branch to system call
594
595         .globl  sys32_fchdir_wrapper 
596 sys32_fchdir_wrapper:
597         llgfr   %r2,%r2                 # unsigned int
598         jg      sys_fchdir              # branch to system call
599
600         .globl  sys32_bdflush_wrapper 
601 sys32_bdflush_wrapper:
602         lgfr    %r2,%r2                 # int
603         lgfr    %r3,%r3                 # long
604         jg      sys_bdflush             # branch to system call
605
606         .globl  sys32_sysfs_wrapper 
607 sys32_sysfs_wrapper:
608         lgfr    %r2,%r2                 # int
609         llgfr   %r3,%r3                 # unsigned long
610         llgfr   %r4,%r4                 # unsigned long
611         jg      sys_sysfs               # branch to system call
612
613         .globl  sys32_personality_wrapper 
614 sys32_personality_wrapper:
615         llgfr   %r2,%r2                 # unsigned long
616         jg      s390x_personality       # branch to system call
617
618         .globl  sys32_setfsuid16_wrapper 
619 sys32_setfsuid16_wrapper:
620         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t 
621         jg      sys32_setfsuid16        # branch to system call
622
623         .globl  sys32_setfsgid16_wrapper 
624 sys32_setfsgid16_wrapper:
625         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
626         jg      sys32_setfsgid16        # branch to system call
627
628         .globl  sys32_llseek_wrapper 
629 sys32_llseek_wrapper:
630         llgfr   %r2,%r2                 # unsigned int
631         llgfr   %r3,%r3                 # unsigned long
632         llgfr   %r4,%r4                 # unsigned long
633         llgtr   %r5,%r5                 # loff_t *
634         llgfr   %r6,%r6                 # unsigned int
635         jg      sys_llseek              # branch to system call
636
637         .globl  sys32_getdents_wrapper 
638 sys32_getdents_wrapper:
639         llgfr   %r2,%r2                 # unsigned int
640         llgtr   %r3,%r3                 # void *
641         llgfr   %r4,%r4                 # unsigned int
642         jg      sys32_getdents          # branch to system call
643
644         .globl  sys32_select_wrapper 
645 sys32_select_wrapper:
646         lgfr    %r2,%r2                 # int
647         llgtr   %r3,%r3                 # fd_set *
648         llgtr   %r4,%r4                 # fd_set *
649         llgtr   %r5,%r5                 # fd_set *
650         llgtr   %r6,%r6                 # struct timeval_emu31 *
651         jg      sys32_select            # branch to system call
652
653         .globl  sys32_flock_wrapper 
654 sys32_flock_wrapper:
655         llgfr   %r2,%r2                 # unsigned int
656         llgfr   %r3,%r3                 # unsigned int
657         jg      sys_flock               # branch to system call
658
659         .globl  sys32_msync_wrapper 
660 sys32_msync_wrapper:
661         llgfr   %r2,%r2                 # unsigned long
662         llgfr   %r3,%r3                 # size_t
663         lgfr    %r4,%r4                 # int
664         jg      sys_msync               # branch to system call
665
666         .globl  sys32_readv_wrapper 
667 sys32_readv_wrapper:
668         lgfr    %r2,%r2                 # int
669         llgtr   %r3,%r3                 # const struct iovec_emu31 *
670         llgfr   %r4,%r4                 # unsigned long
671         jg      sys32_readv             # branch to system call
672
673         .globl  sys32_writev_wrapper 
674 sys32_writev_wrapper:
675         lgfr    %r2,%r2                 # int
676         llgtr   %r3,%r3                 # const struct iovec_emu31 *
677         llgfr   %r4,%r4                 # unsigned long
678         jg      sys32_writev            # branch to system call
679
680         .globl  sys32_getsid_wrapper 
681 sys32_getsid_wrapper:
682         lgfr    %r2,%r2                 # pid_t
683         jg      sys_getsid              # branch to system call
684
685         .globl  sys32_fdatasync_wrapper 
686 sys32_fdatasync_wrapper:
687         llgfr   %r2,%r2                 # unsigned int
688         jg      sys_fdatasync           # branch to system call
689
690 #sys32_sysctl_wrapper                   # tbd 
691
692         .globl  sys32_mlock_wrapper 
693 sys32_mlock_wrapper:
694         llgfr   %r2,%r2                 # unsigned long
695         llgfr   %r3,%r3                 # size_t
696         jg      sys_mlock               # branch to system call
697
698         .globl  sys32_munlock_wrapper 
699 sys32_munlock_wrapper:
700         llgfr   %r2,%r2                 # unsigned long
701         llgfr   %r3,%r3                 # size_t
702         jg      sys_munlock             # branch to system call
703
704         .globl  sys32_mlockall_wrapper 
705 sys32_mlockall_wrapper:
706         lgfr    %r2,%r2                 # int
707         jg      sys_mlockall            # branch to system call
708
709 #sys32_munlockall_wrapper               # void 
710
711         .globl  sys32_sched_setparam_wrapper 
712 sys32_sched_setparam_wrapper:
713         lgfr    %r2,%r2                 # pid_t
714         llgtr   %r3,%r3                 # struct sched_param *
715         jg      sys_sched_setparam      # branch to system call
716
717         .globl  sys32_sched_getparam_wrapper 
718 sys32_sched_getparam_wrapper:
719         lgfr    %r2,%r2                 # pid_t
720         llgtr   %r3,%r3                 # struct sched_param *
721         jg      sys_sched_getparam      # branch to system call
722
723         .globl  sys32_sched_setscheduler_wrapper 
724 sys32_sched_setscheduler_wrapper:
725         lgfr    %r2,%r2                 # pid_t
726         lgfr    %r3,%r3                 # int
727         llgtr   %r4,%r4                 # struct sched_param *
728         jg      sys_sched_setscheduler  # branch to system call
729
730         .globl  sys32_sched_getscheduler_wrapper 
731 sys32_sched_getscheduler_wrapper:
732         lgfr    %r2,%r2                 # pid_t
733         jg      sys_sched_getscheduler  # branch to system call
734
735 #sys32_sched_yield_wrapper              # void 
736
737         .globl  sys32_sched_get_priority_max_wrapper 
738 sys32_sched_get_priority_max_wrapper:
739         lgfr    %r2,%r2                 # int
740         jg      sys_sched_get_priority_max      # branch to system call
741
742         .globl  sys32_sched_get_priority_min_wrapper 
743 sys32_sched_get_priority_min_wrapper:
744         lgfr    %r2,%r2                 # int
745         jg      sys_sched_get_priority_min      # branch to system call
746
747         .globl  sys32_sched_rr_get_interval_wrapper 
748 sys32_sched_rr_get_interval_wrapper:
749         lgfr    %r2,%r2                 # pid_t
750         llgtr   %r3,%r3                 # struct compat_timespec *
751         jg      sys32_sched_rr_get_interval     # branch to system call
752
753         .globl  compat_sys_nanosleep_wrapper 
754 compat_sys_nanosleep_wrapper:
755         llgtr   %r2,%r2                 # struct compat_timespec *
756         llgtr   %r3,%r3                 # struct compat_timespec *
757         jg      compat_sys_nanosleep            # branch to system call
758
759         .globl  sys32_mremap_wrapper 
760 sys32_mremap_wrapper:
761         llgfr   %r2,%r2                 # unsigned long
762         llgfr   %r3,%r3                 # unsigned long
763         llgfr   %r4,%r4                 # unsigned long
764         llgfr   %r5,%r5                 # unsigned long
765         llgfr   %r6,%r6                 # unsigned long
766         jg      sys_mremap              # branch to system call
767
768         .globl  sys32_setresuid16_wrapper 
769 sys32_setresuid16_wrapper:
770         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t 
771         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t 
772         llgfr   %r4,%r4                 # __kernel_old_uid_emu31_t 
773         jg      sys32_setresuid16       # branch to system call
774
775         .globl  sys32_getresuid16_wrapper 
776 sys32_getresuid16_wrapper:
777         llgtr   %r2,%r2                 # __kernel_old_uid_emu31_t *
778         llgtr   %r3,%r3                 # __kernel_old_uid_emu31_t *
779         llgtr   %r4,%r4                 # __kernel_old_uid_emu31_t *
780         jg      sys32_getresuid16       # branch to system call
781
782         .globl  sys32_poll_wrapper 
783 sys32_poll_wrapper:
784         llgtr   %r2,%r2                 # struct pollfd * 
785         llgfr   %r3,%r3                 # unsigned int 
786         lgfr    %r4,%r4                 # long 
787         jg      sys_poll                # branch to system call
788
789         .globl  sys32_nfsservctl_wrapper 
790 sys32_nfsservctl_wrapper:
791         lgfr    %r2,%r2                 # int 
792         llgtr   %r3,%r3                 # struct nfsctl_arg_emu31 * 
793         llgtr   %r4,%r4                 # union nfsctl_res_emu31 * 
794         jg      sys32_nfsservctl        # branch to system call
795
796         .globl  sys32_setresgid16_wrapper 
797 sys32_setresgid16_wrapper:
798         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
799         llgfr   %r3,%r3                 # __kernel_old_gid_emu31_t 
800         llgfr   %r4,%r4                 # __kernel_old_gid_emu31_t 
801         jg      sys32_setresgid16       # branch to system call
802
803         .globl  sys32_getresgid16_wrapper 
804 sys32_getresgid16_wrapper:
805         llgtr   %r2,%r2                 # __kernel_old_gid_emu31_t *
806         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
807         llgtr   %r4,%r4                 # __kernel_old_gid_emu31_t *
808         jg      sys32_getresgid16       # branch to system call
809
810         .globl  sys32_prctl_wrapper 
811 sys32_prctl_wrapper:
812         lgfr    %r2,%r2                 # int
813         llgfr   %r3,%r3                 # unsigned long
814         llgfr   %r4,%r4                 # unsigned long
815         llgfr   %r5,%r5                 # unsigned long
816         llgfr   %r6,%r6                 # unsigned long
817         jg      sys_prctl               # branch to system call
818
819 #sys32_rt_sigreturn_wrapper             # done in rt_sigreturn_glue 
820
821         .globl  sys32_rt_sigaction_wrapper 
822 sys32_rt_sigaction_wrapper:
823         lgfr    %r2,%r2                 # int
824         llgtr   %r3,%r3                 # const struct sigaction_emu31 *
825         llgtr   %r4,%r4                 # const struct sigaction_emu31 *
826         llgfr   %r5,%r5                 # size_t
827         jg      sys32_rt_sigaction      # branch to system call
828
829         .globl  sys32_rt_sigprocmask_wrapper 
830 sys32_rt_sigprocmask_wrapper:
831         lgfr    %r2,%r2                 # int
832         llgtr   %r3,%r3                 # old_sigset_emu31 *
833         llgtr   %r4,%r4                 # old_sigset_emu31 *
834         llgfr   %r5,%r5                 # size_t
835         jg      sys32_rt_sigprocmask    # branch to system call
836
837         .globl  sys32_rt_sigpending_wrapper 
838 sys32_rt_sigpending_wrapper:
839         llgtr   %r2,%r2                 # sigset_emu31 *
840         llgfr   %r3,%r3                 # size_t
841         jg      sys32_rt_sigpending     # branch to system call
842
843         .globl  sys32_rt_sigtimedwait_wrapper 
844 sys32_rt_sigtimedwait_wrapper:
845         llgtr   %r2,%r2                 # const sigset_emu31_t *
846         llgtr   %r3,%r3                 # siginfo_emu31_t *
847         llgtr   %r4,%r4                 # const struct compat_timespec *
848         llgfr   %r5,%r5                 # size_t
849         jg      sys32_rt_sigtimedwait   # branch to system call
850
851         .globl  sys32_rt_sigqueueinfo_wrapper 
852 sys32_rt_sigqueueinfo_wrapper:
853         lgfr    %r2,%r2                 # int
854         lgfr    %r3,%r3                 # int
855         llgtr   %r4,%r4                 # siginfo_emu31_t *
856         jg      sys32_rt_sigqueueinfo   # branch to system call
857
858 #sys32_rt_sigsuspend_wrapper            # done in rt_sigsuspend_glue 
859
860         .globl  sys32_pread64_wrapper 
861 sys32_pread64_wrapper:
862         llgfr   %r2,%r2                 # unsigned int
863         llgtr   %r3,%r3                 # char *
864         llgfr   %r4,%r4                 # size_t
865         llgfr   %r5,%r5                 # u32
866         llgfr   %r6,%r6                 # u32
867         jg      sys32_pread64           # branch to system call
868
869         .globl  sys32_pwrite64_wrapper 
870 sys32_pwrite64_wrapper:
871         llgfr   %r2,%r2                 # unsigned int
872         llgtr   %r3,%r3                 # const char *
873         llgfr   %r4,%r4                 # size_t
874         llgfr   %r5,%r5                 # u32
875         llgfr   %r6,%r6                 # u32
876         jg      sys32_pwrite64          # branch to system call
877
878         .globl  sys32_chown16_wrapper 
879 sys32_chown16_wrapper:
880         llgtr   %r2,%r2                 # const char *
881         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t 
882         llgfr   %r4,%r4                 # __kernel_old_gid_emu31_t 
883         jg      sys32_chown16           # branch to system call
884
885         .globl  sys32_getcwd_wrapper 
886 sys32_getcwd_wrapper:
887         llgtr   %r2,%r2                 # char *
888         llgfr   %r3,%r3                 # unsigned long
889         jg      sys_getcwd              # branch to system call
890
891         .globl  sys32_capget_wrapper 
892 sys32_capget_wrapper:
893         llgtr   %r2,%r2                 # cap_user_header_t
894         llgtr   %r3,%r3                 # cap_user_data_t
895         jg      sys_capget              # branch to system call
896
897         .globl  sys32_capset_wrapper 
898 sys32_capset_wrapper:
899         llgtr   %r2,%r2                 # cap_user_header_t
900         llgtr   %r3,%r3                 # const cap_user_data_t
901         jg      sys_capset              # branch to system call
902
903         .globl sys32_sigaltstack_wrapper
904 sys32_sigaltstack_wrapper:
905         llgtr   %r2,%r2                 # const stack_emu31_t * 
906         llgtr   %r3,%r3                 # stack_emu31_t * 
907         jg      sys32_sigaltstack
908
909         .globl  sys32_sendfile_wrapper 
910 sys32_sendfile_wrapper:
911         lgfr    %r2,%r2                 # int
912         lgfr    %r3,%r3                 # int
913         llgtr   %r4,%r4                 # __kernel_off_emu31_t *
914         llgfr   %r5,%r5                 # size_t
915         jg      sys32_sendfile          # branch to system call
916
917 #sys32_vfork_wrapper                    # done in vfork_glue 
918
919         .globl  sys32_truncate64_wrapper 
920 sys32_truncate64_wrapper:
921         llgtr   %r2,%r2                 # const char *
922         llgfr   %r3,%r3                 # unsigned long
923         llgfr   %r4,%r4                 # unsigned long
924         jg      sys32_truncate64        # branch to system call
925
926         .globl  sys32_ftruncate64_wrapper 
927 sys32_ftruncate64_wrapper:
928         llgfr   %r2,%r2                 # unsigned int
929         llgfr   %r3,%r3                 # unsigned long
930         llgfr   %r4,%r4                 # unsigned long
931         jg      sys32_ftruncate64       # branch to system call
932
933         .globl sys32_lchown_wrapper     
934 sys32_lchown_wrapper:
935         llgtr   %r2,%r2                 # const char *
936         llgfr   %r3,%r3                 # uid_t
937         llgfr   %r4,%r4                 # gid_t
938         jg      sys_lchown              # branch to system call
939
940 #sys32_getuid_wrapper                   # void                   
941 #sys32_getgid_wrapper                   # void 
942 #sys32_geteuid_wrapper                  # void 
943 #sys32_getegid_wrapper                  # void 
944
945         .globl sys32_setreuid_wrapper
946 sys32_setreuid_wrapper:
947         llgfr   %r2,%r2                 # uid_t
948         llgfr   %r3,%r3                 # uid_t
949         jg      sys_setreuid            # branch to system call
950
951         .globl sys32_setregid_wrapper
952 sys32_setregid_wrapper:
953         llgfr   %r2,%r2                 # gid_t
954         llgfr   %r3,%r3                 # gid_t
955         jg      sys_setregid            # branch to system call
956
957         .globl  sys32_getgroups_wrapper 
958 sys32_getgroups_wrapper:
959         lgfr    %r2,%r2                 # int
960         llgtr   %r3,%r3                 # gid_t *
961         jg      sys_getgroups           # branch to system call
962
963         .globl  sys32_setgroups_wrapper 
964 sys32_setgroups_wrapper:
965         lgfr    %r2,%r2                 # int
966         llgtr   %r3,%r3                 # gid_t *
967         jg      sys_setgroups           # branch to system call
968
969         .globl sys32_fchown_wrapper     
970 sys32_fchown_wrapper:
971         llgfr   %r2,%r2                 # unsigned int
972         llgfr   %r3,%r3                 # uid_t
973         llgfr   %r4,%r4                 # gid_t
974         jg      sys_fchown              # branch to system call
975
976         .globl sys32_setresuid_wrapper  
977 sys32_setresuid_wrapper:
978         llgfr   %r2,%r2                 # uid_t
979         llgfr   %r3,%r3                 # uid_t
980         llgfr   %r4,%r4                 # uid_t
981         jg      sys_setresuid           # branch to system call
982
983         .globl sys32_getresuid_wrapper  
984 sys32_getresuid_wrapper:
985         llgtr   %r2,%r2                 # uid_t *
986         llgtr   %r3,%r3                 # uid_t *
987         llgtr   %r4,%r4                 # uid_t *
988         jg      sys_getresuid           # branch to system call
989
990         .globl sys32_setresgid_wrapper  
991 sys32_setresgid_wrapper:
992         llgfr   %r2,%r2                 # gid_t
993         llgfr   %r3,%r3                 # gid_t
994         llgfr   %r4,%r4                 # gid_t
995         jg      sys_setresgid           # branch to system call
996
997         .globl sys32_getresgid_wrapper  
998 sys32_getresgid_wrapper:
999         llgtr   %r2,%r2                 # gid_t *
1000         llgtr   %r3,%r3                 # gid_t *
1001         llgtr   %r4,%r4                 # gid_t *
1002         jg      sys_getresgid           # branch to system call
1003
1004         .globl sys32_chown_wrapper      
1005 sys32_chown_wrapper:
1006         llgtr   %r2,%r2                 # const char *
1007         llgfr   %r3,%r3                 # uid_t
1008         llgfr   %r4,%r4                 # gid_t
1009         jg      sys_chown               # branch to system call
1010
1011         .globl sys32_setuid_wrapper     
1012 sys32_setuid_wrapper:
1013         llgfr   %r2,%r2                 # uid_t
1014         jg      sys_setuid              # branch to system call
1015
1016         .globl sys32_setgid_wrapper     
1017 sys32_setgid_wrapper:
1018         llgfr   %r2,%r2                 # gid_t
1019         jg      sys_setgid              # branch to system call
1020
1021         .globl sys32_setfsuid_wrapper   
1022 sys32_setfsuid_wrapper:
1023         llgfr   %r2,%r2                 # uid_t
1024         jg      sys_setfsuid            # branch to system call
1025
1026         .globl sys32_setfsgid_wrapper   
1027 sys32_setfsgid_wrapper:
1028         llgfr   %r2,%r2                 # gid_t
1029         jg      sys_setfsgid            # branch to system call
1030
1031         .globl  sys32_pivot_root_wrapper 
1032 sys32_pivot_root_wrapper:
1033         llgtr   %r2,%r2                 # const char *
1034         llgtr   %r3,%r3                 # const char *
1035         jg      sys_pivot_root          # branch to system call
1036
1037         .globl  sys32_mincore_wrapper 
1038 sys32_mincore_wrapper:
1039         llgfr   %r2,%r2                 # unsigned long
1040         llgfr   %r3,%r3                 # size_t
1041         llgtr   %r4,%r4                 # unsigned char *
1042         jg      sys_mincore             # branch to system call
1043
1044         .globl  sys32_madvise_wrapper 
1045 sys32_madvise_wrapper:
1046         llgfr   %r2,%r2                 # unsigned long
1047         llgfr   %r3,%r3                 # size_t
1048         lgfr    %r4,%r4                 # int
1049         jg      sys_madvise             # branch to system call
1050
1051         .globl  sys32_getdents64_wrapper 
1052 sys32_getdents64_wrapper:
1053         llgfr   %r2,%r2                 # unsigned int
1054         llgtr   %r3,%r3                 # void *
1055         llgfr   %r4,%r4                 # unsigned int
1056         jg      sys_getdents64          # branch to system call
1057
1058         .globl  compat_sys_fcntl64_wrapper 
1059 compat_sys_fcntl64_wrapper:
1060         llgfr   %r2,%r2                 # unsigned int
1061         llgfr   %r3,%r3                 # unsigned int 
1062         llgfr   %r4,%r4                 # unsigned long
1063         jg      compat_sys_fcntl64      # branch to system call
1064
1065         .globl  sys32_stat64_wrapper
1066 sys32_stat64_wrapper:
1067         llgtr   %r2,%r2                 # char *
1068         llgtr   %r3,%r3                 # struct stat64 *
1069         jg      sys32_stat64            # branch to system call
1070
1071         .globl  sys32_lstat64_wrapper
1072 sys32_lstat64_wrapper:
1073         llgtr   %r2,%r2                 # char *
1074         llgtr   %r3,%r3                 # struct stat64 *
1075         jg      sys32_lstat64           # branch to system call
1076
1077         .globl  sys32_stime_wrapper
1078 sys32_stime_wrapper:
1079         llgtr   %r2,%r2                 # int *
1080         jg      sys_stime               # branch to system call
1081
1082         .globl  sys32_sysctl_wrapper
1083 sys32_sysctl_wrapper:
1084         llgtr   %r2,%r2                 # struct __sysctl_args32 *
1085         jg      sys32_sysctl
1086
1087         .globl  sys32_fstat64_wrapper
1088 sys32_fstat64_wrapper:
1089         llgfr   %r2,%r2                 # unsigned long
1090         llgtr   %r3,%r3                 # struct stat64 *
1091         jg      sys32_fstat64           # branch to system call
1092
1093         .globl  compat_sys_futex_wrapper 
1094 compat_sys_futex_wrapper:
1095         llgtr   %r2,%r2                 # u32 *
1096         lgfr    %r3,%r3                 # int
1097         lgfr    %r4,%r4                 # int
1098         llgtr   %r5,%r5                 # struct compat_timespec *
1099         llgtr   %r6,%r6                 # u32 *
1100         jg      compat_sys_futex        # branch to system call
1101
1102         .globl  sys32_setxattr_wrapper
1103 sys32_setxattr_wrapper:
1104         llgtr   %r2,%r2                 # char *
1105         llgtr   %r3,%r3                 # char *
1106         llgtr   %r4,%r4                 # void *
1107         llgfr   %r5,%r5                 # size_t
1108         lgfr    %r6,%r6                 # int
1109         jg      sys_setxattr
1110
1111         .globl  sys32_lsetxattr_wrapper
1112 sys32_lsetxattr_wrapper:
1113         llgtr   %r2,%r2                 # char *
1114         llgtr   %r3,%r3                 # char *
1115         llgtr   %r4,%r4                 # void *
1116         llgfr   %r5,%r5                 # size_t
1117         lgfr    %r6,%r6                 # int
1118         jg      sys_lsetxattr
1119
1120         .globl  sys32_fsetxattr_wrapper
1121 sys32_fsetxattr_wrapper:
1122         lgfr    %r2,%r2                 # int
1123         llgtr   %r3,%r3                 # char *
1124         llgtr   %r4,%r4                 # void *
1125         llgfr   %r5,%r5                 # size_t
1126         lgfr    %r6,%r6                 # int
1127         jg      sys_fsetxattr
1128
1129         .globl  sys32_getxattr_wrapper
1130 sys32_getxattr_wrapper:
1131         llgtr   %r2,%r2                 # char *
1132         llgtr   %r3,%r3                 # char *
1133         llgtr   %r4,%r4                 # void *
1134         llgfr   %r5,%r5                 # size_t
1135         jg      sys_getxattr
1136
1137         .globl  sys32_lgetxattr_wrapper
1138 sys32_lgetxattr_wrapper:
1139         llgtr   %r2,%r2                 # char *
1140         llgtr   %r3,%r3                 # char *
1141         llgtr   %r4,%r4                 # void *
1142         llgfr   %r5,%r5                 # size_t
1143         jg      sys_lgetxattr
1144
1145         .globl  sys32_fgetxattr_wrapper
1146 sys32_fgetxattr_wrapper:
1147         lgfr    %r2,%r2                 # int
1148         llgtr   %r3,%r3                 # char *
1149         llgtr   %r4,%r4                 # void *
1150         llgfr   %r5,%r5                 # size_t
1151         jg      sys_fgetxattr
1152
1153         .globl  sys32_listxattr_wrapper
1154 sys32_listxattr_wrapper:
1155         llgtr   %r2,%r2                 # char *
1156         llgtr   %r3,%r3                 # char *
1157         llgfr   %r4,%r4                 # size_t
1158         jg      sys_listxattr
1159
1160         .globl  sys32_llistxattr_wrapper
1161 sys32_llistxattr_wrapper:
1162         llgtr   %r2,%r2                 # char *
1163         llgtr   %r3,%r3                 # char *
1164         llgfr   %r4,%r4                 # size_t
1165         jg      sys_llistxattr
1166
1167         .globl  sys32_flistxattr_wrapper
1168 sys32_flistxattr_wrapper:
1169         lgfr    %r2,%r2                 # int
1170         llgtr   %r3,%r3                 # char *
1171         llgfr   %r4,%r4                 # size_t
1172         jg      sys_flistxattr
1173
1174         .globl  sys32_removexattr_wrapper
1175 sys32_removexattr_wrapper:
1176         llgtr   %r2,%r2                 # char *
1177         llgtr   %r3,%r3                 # char *
1178         jg      sys_removexattr
1179
1180         .globl  sys32_lremovexattr_wrapper
1181 sys32_lremovexattr_wrapper:
1182         llgtr   %r2,%r2                 # char *
1183         llgtr   %r3,%r3                 # char *
1184         jg      sys_lremovexattr
1185
1186         .globl  sys32_fremovexattr_wrapper
1187 sys32_fremovexattr_wrapper:
1188         lgfr    %r2,%r2                 # int
1189         llgtr   %r3,%r3                 # char *
1190         jg      sys_fremovexattr
1191
1192         .globl  sys32_sched_setaffinity_wrapper
1193 sys32_sched_setaffinity_wrapper:
1194         lgfr    %r2,%r2                 # int
1195         llgfr   %r3,%r3                 # unsigned int
1196         llgtr   %r4,%r4                 # unsigned long *
1197         jg      compat_sys_sched_setaffinity
1198
1199         .globl  sys32_sched_getaffinity_wrapper
1200 sys32_sched_getaffinity_wrapper:
1201         lgfr    %r2,%r2                 # int
1202         llgfr   %r3,%r3                 # unsigned int
1203         llgtr   %r4,%r4                 # unsigned long *
1204         jg      compat_sys_sched_getaffinity
1205
1206         .globl  sys32_exit_group_wrapper
1207 sys32_exit_group_wrapper:
1208         lgfr    %r2,%r2                 # int
1209         jg      sys_exit_group          # branch to system call
1210
1211         .globl  sys32_set_tid_address_wrapper
1212 sys32_set_tid_address_wrapper:
1213         llgtr   %r2,%r2                 # int *
1214         jg      sys_set_tid_address     # branch to system call
1215
1216         .globl  sys_epoll_create_wrapper
1217 sys_epoll_create_wrapper:
1218         lgfr    %r2,%r2                 # int
1219         jg      sys_epoll_create        # branch to system call
1220
1221         .globl  sys_epoll_ctl_wrapper
1222 sys_epoll_ctl_wrapper:
1223         lgfr    %r2,%r2                 # int
1224         lgfr    %r3,%r3                 # int
1225         lgfr    %r4,%r4                 # int
1226         llgtr   %r5,%r5                 # struct epoll_event *
1227         jg      sys_epoll_ctl           # branch to system call
1228
1229         .globl  sys_epoll_wait_wrapper
1230 sys_epoll_wait_wrapper:
1231         lgfr    %r2,%r2                 # int
1232         llgtr   %r3,%r3                 # struct epoll_event *
1233         lgfr    %r4,%r4                 # int
1234         lgfr    %r5,%r5                 # int
1235         jg      sys_epoll_wait          # branch to system call
1236
1237         .globl  sys32_lookup_dcookie_wrapper
1238 sys32_lookup_dcookie_wrapper:
1239         sllg    %r2,%r2,32              # get high word of 64bit dcookie
1240         or      %r2,%r3                 # get low word of 64bit dcookie
1241         llgtr   %r3,%r4                 # char *
1242         llgfr   %r4,%r5                 # size_t
1243         jg      sys_lookup_dcookie
1244
1245         .globl  sys32_fadvise64_wrapper
1246 sys32_fadvise64_wrapper:
1247         lgfr    %r2,%r2                 # int
1248         sllg    %r3,%r3,32              # get high word of 64bit loff_t
1249         or      %r3,%r4                 # get low word of 64bit loff_t
1250         llgfr   %r4,%r5                 # size_t (unsigned long)
1251         lgfr    %r5,%r6                 # int
1252         jg      sys_fadvise64
1253
1254         .globl  sys32_fadvise64_64_wrapper
1255 sys32_fadvise64_64_wrapper:
1256         llgtr   %r2,%r2                 # struct fadvise64_64_args *
1257         jg      s390_fadvise64_64
1258
1259         .globl  sys32_clock_settime_wrapper
1260 sys32_clock_settime_wrapper:
1261         lgfr    %r2,%r2                 # clockid_t (int)
1262         llgtr   %r3,%r3                 # struct compat_timespec *
1263         jg      compat_clock_settime
1264
1265         .globl  sys32_clock_gettime_wrapper
1266 sys32_clock_gettime_wrapper:
1267         lgfr    %r2,%r2                 # clockid_t (int)
1268         llgtr   %r3,%r3                 # struct compat_timespec *
1269         jg      compat_clock_gettime
1270
1271         .globl  sys32_clock_getres_wrapper
1272 sys32_clock_getres_wrapper:
1273         lgfr    %r2,%r2                 # clockid_t (int)
1274         llgtr   %r3,%r3                 # struct compat_timespec *
1275         jg      compat_clock_getres
1276
1277         .globl  sys32_clock_nanosleep_wrapper
1278 sys32_clock_nanosleep_wrapper:
1279         lgfr    %r2,%r2                 # clockid_t (int)
1280         lgfr    %r3,%r3                 # int
1281         llgtr   %r4,%r4                 # struct compat_timespec *
1282         llgtr   %r5,%r5                 # struct compat_timespec *
1283         jg      compat_clock_nanosleep
1284
1285         .globl  sys32_timer_create_wrapper
1286 sys32_timer_create_wrapper:
1287         lgfr    %r2,%r2                 # timer_t (int)
1288         llgtr   %r3,%r3                 # struct compat_sigevent *
1289         llgtr   %r4,%r4                 # timer_t *
1290         jg      sys32_timer_create
1291
1292         .globl  sys32_timer_settime_wrapper
1293 sys32_timer_settime_wrapper:
1294         lgfr    %r2,%r2                 # timer_t (int)
1295         lgfr    %r3,%r3                 # int
1296         llgtr   %r4,%r4                 # struct compat_itimerspec *
1297         llgtr   %r5,%r5                 # struct compat_itimerspec *
1298         jg      compat_timer_settime
1299
1300         .globl  sys32_timer_gettime_wrapper
1301 sys32_timer_gettime_wrapper:
1302         lgfr    %r2,%r2                 # timer_t (int)
1303         llgtr   %r3,%r3                 # struct compat_itimerspec *
1304         jg      compat_timer_gettime
1305
1306         .globl  sys32_timer_getoverrun_wrapper
1307 sys32_timer_getoverrun_wrapper:
1308         lgfr    %r2,%r2                 # timer_t (int)
1309         jg      sys_timer_getoverrun
1310
1311         .globl  sys32_timer_delete_wrapper
1312 sys32_timer_delete_wrapper:
1313         lgfr    %r2,%r2                 # timer_t (int)
1314         jg      sys_timer_delete
1315
1316         .globl  sys32_io_setup_wrapper
1317 sys32_io_setup_wrapper:
1318         llgfr   %r2,%r2                 # unsigned int
1319         llgtr   %r3,%r3                 # u32 *
1320         jg      compat_sys_io_setup
1321
1322         .globl  sys32_io_destroy_wrapper
1323 sys32_io_destroy_wrapper:
1324         llgfr   %r2,%r2                 # (aio_context_t) u32
1325         jg      sys_io_destroy
1326
1327         .globl  sys32_io_getevents_wrapper
1328 sys32_io_getevents_wrapper:
1329         llgfr   %r2,%r2                 # (aio_context_t) u32
1330         lgfr    %r3,%r3                 # long
1331         lgfr    %r4,%r4                 # long
1332         llgtr   %r5,%r5                 # struct io_event *
1333         llgtr   %r6,%r6                 # struct compat_timespec *
1334         jg      compat_sys_io_getevents
1335
1336         .globl  sys32_io_submit_wrapper
1337 sys32_io_submit_wrapper:
1338         llgfr   %r2,%r2                 # (aio_context_t) u32
1339         lgfr    %r3,%r3                 # long
1340         llgtr   %r4,%r4                 # struct iocb **
1341         jg      compat_sys_io_submit
1342
1343         .globl  sys32_io_cancel_wrapper
1344 sys32_io_cancel_wrapper:
1345         llgfr   %r2,%r2                 # (aio_context_t) u32
1346         llgtr   %r3,%r3                 # struct iocb *
1347         llgtr   %r4,%r4                 # struct io_event *
1348         jg      sys_io_cancel
1349
1350         .globl compat_sys_statfs64_wrapper
1351 compat_sys_statfs64_wrapper:
1352         llgtr   %r2,%r2                 # const char *
1353         llgfr   %r3,%r3                 # compat_size_t
1354         llgtr   %r4,%r4                 # struct compat_statfs64 *
1355         jg      compat_statfs64
1356
1357         .globl compat_sys_fstatfs64_wrapper
1358 compat_sys_fstatfs64_wrapper:
1359         llgfr   %r2,%r2                 # unsigned int fd
1360         llgfr   %r3,%r3                 # compat_size_t
1361         llgtr   %r4,%r4                 # struct compat_statfs64 *
1362         jg      compat_fstatfs64
1363
1364         .globl  compat_sys_mq_open_wrapper
1365 compat_sys_mq_open_wrapper:
1366         llgtr   %r2,%r2                 # const char *
1367         lgfr    %r3,%r3                 # int
1368         llgfr   %r4,%r4                 # mode_t
1369         llgtr   %r5,%r5                 # struct compat_mq_attr *
1370         jg      compat_sys_mq_open
1371
1372         .globl  sys32_mq_unlink_wrapper
1373 sys32_mq_unlink_wrapper:
1374         llgtr   %r2,%r2                 # const char *
1375         jg      sys_mq_unlink
1376
1377         .globl  compat_sys_mq_timedsend_wrapper
1378 compat_sys_mq_timedsend_wrapper:
1379         lgfr    %r2,%r2                 # mqd_t
1380         llgtr   %r3,%r3                 # const char *
1381         llgfr   %r4,%r4                 # size_t
1382         llgfr   %r5,%r5                 # unsigned int
1383         llgtr   %r6,%r6                 # const struct compat_timespec *
1384         jg      compat_sys_mq_timedsend
1385
1386         .globl  compat_sys_mq_timedreceive_wrapper
1387 compat_sys_mq_timedreceive_wrapper:
1388         lgfr    %r2,%r2                 # mqd_t
1389         llgtr   %r3,%r3                 # char *
1390         llgfr   %r4,%r4                 # size_t
1391         llgtr   %r5,%r5                 # unsigned int *
1392         llgtr   %r6,%r6                 # const struct compat_timespec *
1393         jg      compat_sys_mq_timedreceive
1394
1395         .globl  compat_sys_mq_notify_wrapper
1396 compat_sys_mq_notify_wrapper:
1397         lgfr    %r2,%r2                 # mqd_t
1398         llgtr   %r3,%r3                 # struct compat_sigevent *
1399         jg      compat_sys_mq_notify
1400
1401         .globl  compat_sys_mq_getsetattr_wrapper
1402 compat_sys_mq_getsetattr_wrapper:
1403         lgfr    %r2,%r2                 # mqd_t
1404         llgtr   %r3,%r3                 # struct compat_mq_attr *
1405         llgtr   %r4,%r4                 # struct compat_mq_attr *
1406         jg      compat_sys_mq_getsetattr