[S390] wire up sys_perf_counter_open
[linux-2.6] / arch / s390 / kernel / compat_wrapper.S
1 /*
2 *  arch/s390/kernel/compat_wrapper.S
3 *    wrapper for 31 bit compatible system calls.
4 *
5 *    Copyright (C) IBM Corp. 2000,2006
6 *    Author(s): Gerhard Tonn (ton@de.ibm.com),
7 *               Thomas Spatzier (tspat@de.ibm.com)
8 */
9
10         .globl  sys32_exit_wrapper
11 sys32_exit_wrapper:
12         lgfr    %r2,%r2                 # int
13         jg      sys_exit                # branch to sys_exit
14
15         .globl  sys32_read_wrapper
16 sys32_read_wrapper:
17         llgfr   %r2,%r2                 # unsigned int
18         llgtr   %r3,%r3                 # char *
19         llgfr   %r4,%r4                 # size_t
20         jg      sys32_read              # branch to sys_read
21
22         .globl  sys32_write_wrapper
23 sys32_write_wrapper:
24         llgfr   %r2,%r2                 # unsigned int
25         llgtr   %r3,%r3                 # const char *
26         llgfr   %r4,%r4                 # size_t
27         jg      sys32_write             # branch to system call
28
29         .globl  sys32_open_wrapper
30 sys32_open_wrapper:
31         llgtr   %r2,%r2                 # const char *
32         lgfr    %r3,%r3                 # int
33         lgfr    %r4,%r4                 # int
34         jg      sys_open                # branch to system call
35
36         .globl  sys32_close_wrapper
37 sys32_close_wrapper:
38         llgfr   %r2,%r2                 # unsigned int
39         jg      sys_close               # branch to system call
40
41         .globl  sys32_creat_wrapper
42 sys32_creat_wrapper:
43         llgtr   %r2,%r2                 # const char *
44         lgfr    %r3,%r3                 # int
45         jg      sys_creat               # branch to system call
46
47         .globl  sys32_link_wrapper
48 sys32_link_wrapper:
49         llgtr   %r2,%r2                 # const char *
50         llgtr   %r3,%r3                 # const char *
51         jg      sys_link                # branch to system call
52
53         .globl  sys32_unlink_wrapper
54 sys32_unlink_wrapper:
55         llgtr   %r2,%r2                 # const char *
56         jg      sys_unlink              # branch to system call
57
58         .globl  sys32_chdir_wrapper
59 sys32_chdir_wrapper:
60         llgtr   %r2,%r2                 # const char *
61         jg      sys_chdir               # branch to system call
62
63         .globl  sys32_time_wrapper
64 sys32_time_wrapper:
65         llgtr   %r2,%r2                 # int *
66         jg      compat_sys_time         # branch to system call
67
68         .globl  sys32_mknod_wrapper
69 sys32_mknod_wrapper:
70         llgtr   %r2,%r2                 # const char *
71         lgfr    %r3,%r3                 # int
72         llgfr   %r4,%r4                 # dev
73         jg      sys_mknod               # branch to system call
74
75         .globl  sys32_chmod_wrapper
76 sys32_chmod_wrapper:
77         llgtr   %r2,%r2                 # const char *
78         llgfr   %r3,%r3                 # mode_t
79         jg      sys_chmod               # branch to system call
80
81         .globl  sys32_lchown16_wrapper
82 sys32_lchown16_wrapper:
83         llgtr   %r2,%r2                 # const char *
84         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t
85         llgfr   %r4,%r4                 # __kernel_old_uid_emu31_t
86         jg      sys32_lchown16          # branch to system call
87
88         .globl  sys32_lseek_wrapper
89 sys32_lseek_wrapper:
90         llgfr   %r2,%r2                 # unsigned int
91         lgfr    %r3,%r3                 # off_t
92         llgfr   %r4,%r4                 # unsigned int
93         jg      sys_lseek               # branch to system call
94
95 #sys32_getpid_wrapper                           # void
96
97         .globl  sys32_mount_wrapper
98 sys32_mount_wrapper:
99         llgtr   %r2,%r2                 # char *
100         llgtr   %r3,%r3                 # char *
101         llgtr   %r4,%r4                 # char *
102         llgfr   %r5,%r5                 # unsigned long
103         llgtr   %r6,%r6                 # void *
104         jg      compat_sys_mount        # branch to system call
105
106         .globl  sys32_oldumount_wrapper
107 sys32_oldumount_wrapper:
108         llgtr   %r2,%r2                 # char *
109         jg      sys_oldumount           # branch to system call
110
111         .globl  sys32_setuid16_wrapper
112 sys32_setuid16_wrapper:
113         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t
114         jg      sys32_setuid16          # branch to system call
115
116 #sys32_getuid16_wrapper                 # void
117
118         .globl  sys32_ptrace_wrapper
119 sys32_ptrace_wrapper:
120         lgfr    %r2,%r2                 # long
121         lgfr    %r3,%r3                 # long
122         llgtr   %r4,%r4                 # long
123         llgfr   %r5,%r5                 # long
124         jg      compat_sys_ptrace       # branch to system call
125
126         .globl  sys32_alarm_wrapper
127 sys32_alarm_wrapper:
128         llgfr   %r2,%r2                 # unsigned int
129         jg      sys_alarm               # branch to system call
130
131         .globl  compat_sys_utime_wrapper
132 compat_sys_utime_wrapper:
133         llgtr   %r2,%r2                 # char *
134         llgtr   %r3,%r3                 # struct compat_utimbuf *
135         jg      compat_sys_utime        # branch to system call
136
137         .globl  sys32_access_wrapper
138 sys32_access_wrapper:
139         llgtr   %r2,%r2                 # const char *
140         lgfr    %r3,%r3                 # int
141         jg      sys_access              # branch to system call
142
143         .globl  sys32_nice_wrapper
144 sys32_nice_wrapper:
145         lgfr    %r2,%r2                 # int
146         jg      sys_nice                # branch to system call
147
148 #sys32_sync_wrapper                     # void
149
150         .globl  sys32_kill_wrapper
151 sys32_kill_wrapper:
152         lgfr    %r2,%r2                 # int
153         lgfr    %r3,%r3                 # int
154         jg      sys_kill                # branch to system call
155
156         .globl  sys32_rename_wrapper
157 sys32_rename_wrapper:
158         llgtr   %r2,%r2                 # const char *
159         llgtr   %r3,%r3                 # const char *
160         jg      sys_rename              # branch to system call
161
162         .globl  sys32_mkdir_wrapper
163 sys32_mkdir_wrapper:
164         llgtr   %r2,%r2                 # const char *
165         lgfr    %r3,%r3                 # int
166         jg      sys_mkdir               # branch to system call
167
168         .globl  sys32_rmdir_wrapper
169 sys32_rmdir_wrapper:
170         llgtr   %r2,%r2                 # const char *
171         jg      sys_rmdir               # branch to system call
172
173         .globl  sys32_dup_wrapper
174 sys32_dup_wrapper:
175         llgfr   %r2,%r2                 # unsigned int
176         jg      sys_dup                 # branch to system call
177
178         .globl  sys32_pipe_wrapper
179 sys32_pipe_wrapper:
180         llgtr   %r2,%r2                 # u32 *
181         jg      sys_pipe                # branch to system call
182
183         .globl  compat_sys_times_wrapper
184 compat_sys_times_wrapper:
185         llgtr   %r2,%r2                 # struct compat_tms *
186         jg      compat_sys_times        # branch to system call
187
188         .globl  sys32_brk_wrapper
189 sys32_brk_wrapper:
190         llgtr   %r2,%r2                 # unsigned long
191         jg      sys_brk                 # branch to system call
192
193         .globl  sys32_setgid16_wrapper
194 sys32_setgid16_wrapper:
195         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t
196         jg      sys32_setgid16          # branch to system call
197
198 #sys32_getgid16_wrapper                 # void
199
200         .globl sys32_signal_wrapper
201 sys32_signal_wrapper:
202         lgfr    %r2,%r2                 # int
203         llgtr   %r3,%r3                 # __sighandler_t
204         jg      sys_signal
205
206 #sys32_geteuid16_wrapper                # void
207
208 #sys32_getegid16_wrapper                # void
209
210         .globl  sys32_acct_wrapper
211 sys32_acct_wrapper:
212         llgtr   %r2,%r2                 # char *
213         jg      sys_acct                # branch to system call
214
215         .globl  sys32_umount_wrapper
216 sys32_umount_wrapper:
217         llgtr   %r2,%r2                 # char *
218         lgfr    %r3,%r3                 # int
219         jg      sys_umount              # branch to system call
220
221         .globl  compat_sys_ioctl_wrapper
222 compat_sys_ioctl_wrapper:
223         llgfr   %r2,%r2                 # unsigned int
224         llgfr   %r3,%r3                 # unsigned int
225         llgfr   %r4,%r4                 # unsigned int
226         jg      compat_sys_ioctl        # branch to system call
227
228         .globl  compat_sys_fcntl_wrapper
229 compat_sys_fcntl_wrapper:
230         llgfr   %r2,%r2                 # unsigned int
231         llgfr   %r3,%r3                 # unsigned int
232         llgfr   %r4,%r4                 # unsigned long
233         jg      compat_sys_fcntl        # branch to system call
234
235         .globl  sys32_setpgid_wrapper
236 sys32_setpgid_wrapper:
237         lgfr    %r2,%r2                 # pid_t
238         lgfr    %r3,%r3                 # pid_t
239         jg      sys_setpgid             # branch to system call
240
241         .globl  sys32_umask_wrapper
242 sys32_umask_wrapper:
243         lgfr    %r2,%r2                 # int
244         jg      sys_umask               # branch to system call
245
246         .globl  sys32_chroot_wrapper
247 sys32_chroot_wrapper:
248         llgtr   %r2,%r2                 # char *
249         jg      sys_chroot              # branch to system call
250
251         .globl sys32_ustat_wrapper
252 sys32_ustat_wrapper:
253         llgfr   %r2,%r2                 # dev_t
254         llgtr   %r3,%r3                 # struct ustat *
255         jg      compat_sys_ustat
256
257         .globl  sys32_dup2_wrapper
258 sys32_dup2_wrapper:
259         llgfr   %r2,%r2                 # unsigned int
260         llgfr   %r3,%r3                 # unsigned int
261         jg      sys_dup2                # branch to system call
262
263 #sys32_getppid_wrapper                  # void
264
265 #sys32_getpgrp_wrapper                  # void
266
267 #sys32_setsid_wrapper                   # void
268
269         .globl  sys32_sigaction_wrapper
270 sys32_sigaction_wrapper:
271         lgfr    %r2,%r2                 # int
272         llgtr   %r3,%r3                 # const struct old_sigaction *
273         llgtr   %r4,%r4                 # struct old_sigaction32 *
274         jg      sys32_sigaction         # branch to system call
275
276         .globl  sys32_setreuid16_wrapper
277 sys32_setreuid16_wrapper:
278         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t
279         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t
280         jg      sys32_setreuid16        # branch to system call
281
282         .globl  sys32_setregid16_wrapper
283 sys32_setregid16_wrapper:
284         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t
285         llgfr   %r3,%r3                 # __kernel_old_gid_emu31_t
286         jg      sys32_setregid16        # branch to system call
287
288         .globl sys_sigsuspend_wrapper
289 sys_sigsuspend_wrapper:
290         lgfr    %r2,%r2                 # int
291         lgfr    %r3,%r3                 # int
292         llgfr   %r4,%r4                 # old_sigset_t
293         jg      sys_sigsuspend
294
295         .globl  compat_sys_sigpending_wrapper
296 compat_sys_sigpending_wrapper:
297         llgtr   %r2,%r2                 # compat_old_sigset_t *
298         jg      compat_sys_sigpending   # branch to system call
299
300         .globl  sys32_sethostname_wrapper
301 sys32_sethostname_wrapper:
302         llgtr   %r2,%r2                 # char *
303         lgfr    %r3,%r3                 # int
304         jg      sys_sethostname         # branch to system call
305
306         .globl  compat_sys_setrlimit_wrapper
307 compat_sys_setrlimit_wrapper:
308         llgfr   %r2,%r2                 # unsigned int
309         llgtr   %r3,%r3                 # struct rlimit_emu31 *
310         jg      compat_sys_setrlimit    # branch to system call
311
312         .globl  compat_sys_old_getrlimit_wrapper
313 compat_sys_old_getrlimit_wrapper:
314         llgfr   %r2,%r2                 # unsigned int
315         llgtr   %r3,%r3                 # struct rlimit_emu31 *
316         jg      compat_sys_old_getrlimit # branch to system call
317
318         .globl  compat_sys_getrlimit_wrapper
319 compat_sys_getrlimit_wrapper:
320         llgfr   %r2,%r2                 # unsigned int
321         llgtr   %r3,%r3                 # struct rlimit_emu31 *
322         jg      compat_sys_getrlimit    # branch to system call
323
324         .globl  sys32_mmap2_wrapper
325 sys32_mmap2_wrapper:
326         llgtr   %r2,%r2                 # struct mmap_arg_struct_emu31 *
327         jg      sys32_mmap2                     # branch to system call
328
329         .globl  compat_sys_getrusage_wrapper
330 compat_sys_getrusage_wrapper:
331         lgfr    %r2,%r2                 # int
332         llgtr   %r3,%r3                 # struct rusage_emu31 *
333         jg      compat_sys_getrusage    # branch to system call
334
335         .globl  compat_sys_gettimeofday_wrapper
336 compat_sys_gettimeofday_wrapper:
337         llgtr   %r2,%r2                 # struct timeval_emu31 *
338         llgtr   %r3,%r3                 # struct timezone *
339         jg      compat_sys_gettimeofday # branch to system call
340
341         .globl  compat_sys_settimeofday_wrapper
342 compat_sys_settimeofday_wrapper:
343         llgtr   %r2,%r2                 # struct timeval_emu31 *
344         llgtr   %r3,%r3                 # struct timezone *
345         jg      compat_sys_settimeofday # branch to system call
346
347         .globl  sys32_getgroups16_wrapper
348 sys32_getgroups16_wrapper:
349         lgfr    %r2,%r2                 # int
350         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
351         jg      sys32_getgroups16       # branch to system call
352
353         .globl  sys32_setgroups16_wrapper
354 sys32_setgroups16_wrapper:
355         lgfr    %r2,%r2                 # int
356         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
357         jg      sys32_setgroups16       # branch to system call
358
359         .globl  sys32_symlink_wrapper
360 sys32_symlink_wrapper:
361         llgtr   %r2,%r2                 # const char *
362         llgtr   %r3,%r3                 # const char *
363         jg      sys_symlink             # branch to system call
364
365         .globl  sys32_readlink_wrapper
366 sys32_readlink_wrapper:
367         llgtr   %r2,%r2                 # const char *
368         llgtr   %r3,%r3                 # char *
369         lgfr    %r4,%r4                 # int
370         jg      sys_readlink            # branch to system call
371
372         .globl  sys32_uselib_wrapper
373 sys32_uselib_wrapper:
374         llgtr   %r2,%r2                 # const char *
375         jg      sys_uselib              # branch to system call
376
377         .globl  sys32_swapon_wrapper
378 sys32_swapon_wrapper:
379         llgtr   %r2,%r2                 # const char *
380         lgfr    %r3,%r3                 # int
381         jg      sys_swapon              # branch to system call
382
383         .globl  sys32_reboot_wrapper
384 sys32_reboot_wrapper:
385         lgfr    %r2,%r2                 # int
386         lgfr    %r3,%r3                 # int
387         llgfr   %r4,%r4                 # unsigned int
388         llgtr   %r5,%r5                 # void *
389         jg      sys_reboot              # branch to system call
390
391         .globl  old32_readdir_wrapper
392 old32_readdir_wrapper:
393         llgfr   %r2,%r2                 # unsigned int
394         llgtr   %r3,%r3                 # void *
395         llgfr   %r4,%r4                 # unsigned int
396         jg      compat_sys_old_readdir  # branch to system call
397
398         .globl  old32_mmap_wrapper
399 old32_mmap_wrapper:
400         llgtr   %r2,%r2                 # struct mmap_arg_struct_emu31 *
401         jg      old32_mmap              # branch to system call
402
403         .globl  sys32_munmap_wrapper
404 sys32_munmap_wrapper:
405         llgfr   %r2,%r2                 # unsigned long
406         llgfr   %r3,%r3                 # size_t
407         jg      sys_munmap              # branch to system call
408
409         .globl  sys32_truncate_wrapper
410 sys32_truncate_wrapper:
411         llgtr   %r2,%r2                 # const char *
412         llgfr   %r3,%r3                 # unsigned long
413         jg      sys_truncate            # branch to system call
414
415         .globl  sys32_ftruncate_wrapper
416 sys32_ftruncate_wrapper:
417         llgfr   %r2,%r2                 # unsigned int
418         llgfr   %r3,%r3                 # unsigned long
419         jg      sys_ftruncate           # branch to system call
420
421         .globl  sys32_fchmod_wrapper
422 sys32_fchmod_wrapper:
423         llgfr   %r2,%r2                 # unsigned int
424         llgfr   %r3,%r3                 # mode_t
425         jg      sys_fchmod              # branch to system call
426
427         .globl  sys32_fchown16_wrapper
428 sys32_fchown16_wrapper:
429         llgfr   %r2,%r2                 # unsigned int
430         llgfr   %r3,%r3                 # compat_uid_t
431         llgfr   %r4,%r4                 # compat_uid_t
432         jg      sys32_fchown16          # branch to system call
433
434         .globl  sys32_getpriority_wrapper
435 sys32_getpriority_wrapper:
436         lgfr    %r2,%r2                 # int
437         lgfr    %r3,%r3                 # int
438         jg      sys_getpriority         # branch to system call
439
440         .globl  sys32_setpriority_wrapper
441 sys32_setpriority_wrapper:
442         lgfr    %r2,%r2                 # int
443         lgfr    %r3,%r3                 # int
444         lgfr    %r4,%r4                 # int
445         jg      sys_setpriority         # branch to system call
446
447         .globl  compat_sys_statfs_wrapper
448 compat_sys_statfs_wrapper:
449         llgtr   %r2,%r2                 # char *
450         llgtr   %r3,%r3                 # struct compat_statfs *
451         jg      compat_sys_statfs       # branch to system call
452
453         .globl  compat_sys_fstatfs_wrapper
454 compat_sys_fstatfs_wrapper:
455         llgfr   %r2,%r2                 # unsigned int
456         llgtr   %r3,%r3                 # struct compat_statfs *
457         jg      compat_sys_fstatfs      # branch to system call
458
459         .globl  compat_sys_socketcall_wrapper
460 compat_sys_socketcall_wrapper:
461         lgfr    %r2,%r2                 # int
462         llgtr   %r3,%r3                 # u32 *
463         jg      compat_sys_socketcall   # branch to system call
464
465         .globl  sys32_syslog_wrapper
466 sys32_syslog_wrapper:
467         lgfr    %r2,%r2                 # int
468         llgtr   %r3,%r3                 # char *
469         lgfr    %r4,%r4                 # int
470         jg      sys_syslog              # branch to system call
471
472         .globl  compat_sys_setitimer_wrapper
473 compat_sys_setitimer_wrapper:
474         lgfr    %r2,%r2                 # int
475         llgtr   %r3,%r3                 # struct itimerval_emu31 *
476         llgtr   %r4,%r4                 # struct itimerval_emu31 *
477         jg      compat_sys_setitimer    # branch to system call
478
479         .globl  compat_sys_getitimer_wrapper
480 compat_sys_getitimer_wrapper:
481         lgfr    %r2,%r2                 # int
482         llgtr   %r3,%r3                 # struct itimerval_emu31 *
483         jg      compat_sys_getitimer    # branch to system call
484
485         .globl  compat_sys_newstat_wrapper
486 compat_sys_newstat_wrapper:
487         llgtr   %r2,%r2                 # char *
488         llgtr   %r3,%r3                 # struct stat_emu31 *
489         jg      compat_sys_newstat      # branch to system call
490
491         .globl  compat_sys_newlstat_wrapper
492 compat_sys_newlstat_wrapper:
493         llgtr   %r2,%r2                 # char *
494         llgtr   %r3,%r3                 # struct stat_emu31 *
495         jg      compat_sys_newlstat     # branch to system call
496
497         .globl  compat_sys_newfstat_wrapper
498 compat_sys_newfstat_wrapper:
499         llgfr   %r2,%r2                 # unsigned int
500         llgtr   %r3,%r3                 # struct stat_emu31 *
501         jg      compat_sys_newfstat     # branch to system call
502
503 #sys32_vhangup_wrapper                  # void
504
505         .globl  compat_sys_wait4_wrapper
506 compat_sys_wait4_wrapper:
507         lgfr    %r2,%r2                 # pid_t
508         llgtr   %r3,%r3                 # unsigned int *
509         lgfr    %r4,%r4                 # int
510         llgtr   %r5,%r5                 # struct rusage *
511         jg      compat_sys_wait4        # branch to system call
512
513         .globl  sys32_swapoff_wrapper
514 sys32_swapoff_wrapper:
515         llgtr   %r2,%r2                 # const char *
516         jg      sys_swapoff             # branch to system call
517
518         .globl  compat_sys_sysinfo_wrapper
519 compat_sys_sysinfo_wrapper:
520         llgtr   %r2,%r2                 # struct sysinfo_emu31 *
521         jg      compat_sys_sysinfo      # branch to system call
522
523         .globl  sys32_ipc_wrapper
524 sys32_ipc_wrapper:
525         llgfr   %r2,%r2                 # uint
526         lgfr    %r3,%r3                 # int
527         lgfr    %r4,%r4                 # int
528         lgfr    %r5,%r5                 # int
529         llgfr   %r6,%r6                 # u32
530         jg      sys32_ipc               # branch to system call
531
532         .globl  sys32_fsync_wrapper
533 sys32_fsync_wrapper:
534         llgfr   %r2,%r2                 # unsigned int
535         jg      sys_fsync               # branch to system call
536
537 #sys32_sigreturn_wrapper                # done in sigreturn_glue
538
539 #sys32_clone_wrapper                    # done in clone_glue
540
541         .globl  sys32_setdomainname_wrapper
542 sys32_setdomainname_wrapper:
543         llgtr   %r2,%r2                 # char *
544         lgfr    %r3,%r3                 # int
545         jg      sys_setdomainname       # branch to system call
546
547         .globl  sys32_newuname_wrapper
548 sys32_newuname_wrapper:
549         llgtr   %r2,%r2                 # struct new_utsname *
550         jg      sys_s390_newuname       # branch to system call
551
552         .globl  compat_sys_adjtimex_wrapper
553 compat_sys_adjtimex_wrapper:
554         llgtr   %r2,%r2                 # struct compat_timex *
555         jg      compat_sys_adjtimex     # branch to system call
556
557         .globl  sys32_mprotect_wrapper
558 sys32_mprotect_wrapper:
559         llgtr   %r2,%r2                 # unsigned long (actually pointer
560         llgfr   %r3,%r3                 # size_t
561         llgfr   %r4,%r4                 # unsigned long
562         jg      sys_mprotect            # branch to system call
563
564         .globl  compat_sys_sigprocmask_wrapper
565 compat_sys_sigprocmask_wrapper:
566         lgfr    %r2,%r2                 # int
567         llgtr   %r3,%r3                 # compat_old_sigset_t *
568         llgtr   %r4,%r4                 # compat_old_sigset_t *
569         jg      compat_sys_sigprocmask          # branch to system call
570
571         .globl  sys32_init_module_wrapper
572 sys32_init_module_wrapper:
573         llgtr   %r2,%r2                 # void *
574         llgfr   %r3,%r3                 # unsigned long
575         llgtr   %r4,%r4                 # char *
576         jg      sys32_init_module       # branch to system call
577
578         .globl  sys32_delete_module_wrapper
579 sys32_delete_module_wrapper:
580         llgtr   %r2,%r2                 # const char *
581         llgfr   %r3,%r3                 # unsigned int
582         jg      sys32_delete_module     # branch to system call
583
584         .globl  sys32_quotactl_wrapper
585 sys32_quotactl_wrapper:
586         llgfr   %r2,%r2                 # unsigned int
587         llgtr   %r3,%r3                 # const char *
588         llgfr   %r4,%r4                 # qid_t
589         llgtr   %r5,%r5                 # caddr_t
590         jg      sys_quotactl            # branch to system call
591
592         .globl  sys32_getpgid_wrapper
593 sys32_getpgid_wrapper:
594         lgfr    %r2,%r2                 # pid_t
595         jg      sys_getpgid             # branch to system call
596
597         .globl  sys32_fchdir_wrapper
598 sys32_fchdir_wrapper:
599         llgfr   %r2,%r2                 # unsigned int
600         jg      sys_fchdir              # branch to system call
601
602         .globl  sys32_bdflush_wrapper
603 sys32_bdflush_wrapper:
604         lgfr    %r2,%r2                 # int
605         lgfr    %r3,%r3                 # long
606         jg      sys_bdflush             # branch to system call
607
608         .globl  sys32_sysfs_wrapper
609 sys32_sysfs_wrapper:
610         lgfr    %r2,%r2                 # int
611         llgfr   %r3,%r3                 # unsigned long
612         llgfr   %r4,%r4                 # unsigned long
613         jg      sys_sysfs               # branch to system call
614
615         .globl  sys32_personality_wrapper
616 sys32_personality_wrapper:
617         llgfr   %r2,%r2                 # unsigned long
618         jg      sys_s390_personality    # branch to system call
619
620         .globl  sys32_setfsuid16_wrapper
621 sys32_setfsuid16_wrapper:
622         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t
623         jg      sys32_setfsuid16        # branch to system call
624
625         .globl  sys32_setfsgid16_wrapper
626 sys32_setfsgid16_wrapper:
627         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t
628         jg      sys32_setfsgid16        # branch to system call
629
630         .globl  sys32_llseek_wrapper
631 sys32_llseek_wrapper:
632         llgfr   %r2,%r2                 # unsigned int
633         llgfr   %r3,%r3                 # unsigned long
634         llgfr   %r4,%r4                 # unsigned long
635         llgtr   %r5,%r5                 # loff_t *
636         llgfr   %r6,%r6                 # unsigned int
637         jg      sys_llseek              # branch to system call
638
639         .globl  sys32_getdents_wrapper
640 sys32_getdents_wrapper:
641         llgfr   %r2,%r2                 # unsigned int
642         llgtr   %r3,%r3                 # void *
643         llgfr   %r4,%r4                 # unsigned int
644         jg      compat_sys_getdents     # branch to system call
645
646         .globl  compat_sys_select_wrapper
647 compat_sys_select_wrapper:
648         lgfr    %r2,%r2                 # int
649         llgtr   %r3,%r3                 # compat_fd_set *
650         llgtr   %r4,%r4                 # compat_fd_set *
651         llgtr   %r5,%r5                 # compat_fd_set *
652         llgtr   %r6,%r6                 # struct compat_timeval *
653         jg      compat_sys_select       # branch to system call
654
655         .globl  sys32_flock_wrapper
656 sys32_flock_wrapper:
657         llgfr   %r2,%r2                 # unsigned int
658         llgfr   %r3,%r3                 # unsigned int
659         jg      sys_flock               # branch to system call
660
661         .globl  sys32_msync_wrapper
662 sys32_msync_wrapper:
663         llgfr   %r2,%r2                 # unsigned long
664         llgfr   %r3,%r3                 # size_t
665         lgfr    %r4,%r4                 # int
666         jg      sys_msync               # branch to system call
667
668         .globl  compat_sys_readv_wrapper
669 compat_sys_readv_wrapper:
670         lgfr    %r2,%r2                 # int
671         llgtr   %r3,%r3                 # const struct compat_iovec *
672         llgfr   %r4,%r4                 # unsigned long
673         jg      compat_sys_readv        # branch to system call
674
675         .globl  compat_sys_writev_wrapper
676 compat_sys_writev_wrapper:
677         lgfr    %r2,%r2                 # int
678         llgtr   %r3,%r3                 # const struct compat_iovec *
679         llgfr   %r4,%r4                 # unsigned long
680         jg      compat_sys_writev       # branch to system call
681
682         .globl  sys32_getsid_wrapper
683 sys32_getsid_wrapper:
684         lgfr    %r2,%r2                 # pid_t
685         jg      sys_getsid              # branch to system call
686
687         .globl  sys32_fdatasync_wrapper
688 sys32_fdatasync_wrapper:
689         llgfr   %r2,%r2                 # unsigned int
690         jg      sys_fdatasync           # branch to system call
691
692 #sys32_sysctl_wrapper                   # tbd
693
694         .globl  sys32_mlock_wrapper
695 sys32_mlock_wrapper:
696         llgfr   %r2,%r2                 # unsigned long
697         llgfr   %r3,%r3                 # size_t
698         jg      sys_mlock               # branch to system call
699
700         .globl  sys32_munlock_wrapper
701 sys32_munlock_wrapper:
702         llgfr   %r2,%r2                 # unsigned long
703         llgfr   %r3,%r3                 # size_t
704         jg      sys_munlock             # branch to system call
705
706         .globl  sys32_mlockall_wrapper
707 sys32_mlockall_wrapper:
708         lgfr    %r2,%r2                 # int
709         jg      sys_mlockall            # branch to system call
710
711 #sys32_munlockall_wrapper               # void
712
713         .globl  sys32_sched_setparam_wrapper
714 sys32_sched_setparam_wrapper:
715         lgfr    %r2,%r2                 # pid_t
716         llgtr   %r3,%r3                 # struct sched_param *
717         jg      sys_sched_setparam      # branch to system call
718
719         .globl  sys32_sched_getparam_wrapper
720 sys32_sched_getparam_wrapper:
721         lgfr    %r2,%r2                 # pid_t
722         llgtr   %r3,%r3                 # struct sched_param *
723         jg      sys_sched_getparam      # branch to system call
724
725         .globl  sys32_sched_setscheduler_wrapper
726 sys32_sched_setscheduler_wrapper:
727         lgfr    %r2,%r2                 # pid_t
728         lgfr    %r3,%r3                 # int
729         llgtr   %r4,%r4                 # struct sched_param *
730         jg      sys_sched_setscheduler  # branch to system call
731
732         .globl  sys32_sched_getscheduler_wrapper
733 sys32_sched_getscheduler_wrapper:
734         lgfr    %r2,%r2                 # pid_t
735         jg      sys_sched_getscheduler  # branch to system call
736
737 #sys32_sched_yield_wrapper              # void
738
739         .globl  sys32_sched_get_priority_max_wrapper
740 sys32_sched_get_priority_max_wrapper:
741         lgfr    %r2,%r2                 # int
742         jg      sys_sched_get_priority_max      # branch to system call
743
744         .globl  sys32_sched_get_priority_min_wrapper
745 sys32_sched_get_priority_min_wrapper:
746         lgfr    %r2,%r2                 # int
747         jg      sys_sched_get_priority_min      # branch to system call
748
749         .globl  sys32_sched_rr_get_interval_wrapper
750 sys32_sched_rr_get_interval_wrapper:
751         lgfr    %r2,%r2                 # pid_t
752         llgtr   %r3,%r3                 # struct compat_timespec *
753         jg      sys32_sched_rr_get_interval     # branch to system call
754
755         .globl  compat_sys_nanosleep_wrapper
756 compat_sys_nanosleep_wrapper:
757         llgtr   %r2,%r2                 # struct compat_timespec *
758         llgtr   %r3,%r3                 # struct compat_timespec *
759         jg      compat_sys_nanosleep            # branch to system call
760
761         .globl  sys32_mremap_wrapper
762 sys32_mremap_wrapper:
763         llgfr   %r2,%r2                 # unsigned long
764         llgfr   %r3,%r3                 # unsigned long
765         llgfr   %r4,%r4                 # unsigned long
766         llgfr   %r5,%r5                 # unsigned long
767         llgfr   %r6,%r6                 # unsigned long
768         jg      sys_mremap              # branch to system call
769
770         .globl  sys32_setresuid16_wrapper
771 sys32_setresuid16_wrapper:
772         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t
773         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t
774         llgfr   %r4,%r4                 # __kernel_old_uid_emu31_t
775         jg      sys32_setresuid16       # branch to system call
776
777         .globl  sys32_getresuid16_wrapper
778 sys32_getresuid16_wrapper:
779         llgtr   %r2,%r2                 # __kernel_old_uid_emu31_t *
780         llgtr   %r3,%r3                 # __kernel_old_uid_emu31_t *
781         llgtr   %r4,%r4                 # __kernel_old_uid_emu31_t *
782         jg      sys32_getresuid16       # branch to system call
783
784         .globl  sys32_poll_wrapper
785 sys32_poll_wrapper:
786         llgtr   %r2,%r2                 # struct pollfd *
787         llgfr   %r3,%r3                 # unsigned int
788         lgfr    %r4,%r4                 # long
789         jg      sys_poll                # branch to system call
790
791         .globl  compat_sys_nfsservctl_wrapper
792 compat_sys_nfsservctl_wrapper:
793         lgfr    %r2,%r2                 # int
794         llgtr   %r3,%r3                 # struct compat_nfsctl_arg*
795         llgtr   %r4,%r4                 # union compat_nfsctl_res*
796         jg      compat_sys_nfsservctl   # branch to system call
797
798         .globl  sys32_setresgid16_wrapper
799 sys32_setresgid16_wrapper:
800         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t
801         llgfr   %r3,%r3                 # __kernel_old_gid_emu31_t
802         llgfr   %r4,%r4                 # __kernel_old_gid_emu31_t
803         jg      sys32_setresgid16       # branch to system call
804
805         .globl  sys32_getresgid16_wrapper
806 sys32_getresgid16_wrapper:
807         llgtr   %r2,%r2                 # __kernel_old_gid_emu31_t *
808         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
809         llgtr   %r4,%r4                 # __kernel_old_gid_emu31_t *
810         jg      sys32_getresgid16       # branch to system call
811
812         .globl  sys32_prctl_wrapper
813 sys32_prctl_wrapper:
814         lgfr    %r2,%r2                 # int
815         llgfr   %r3,%r3                 # unsigned long
816         llgfr   %r4,%r4                 # unsigned long
817         llgfr   %r5,%r5                 # unsigned long
818         llgfr   %r6,%r6                 # unsigned long
819         jg      sys_prctl               # branch to system call
820
821 #sys32_rt_sigreturn_wrapper             # done in rt_sigreturn_glue
822
823         .globl  sys32_rt_sigaction_wrapper
824 sys32_rt_sigaction_wrapper:
825         lgfr    %r2,%r2                 # int
826         llgtr   %r3,%r3                 # const struct sigaction_emu31 *
827         llgtr   %r4,%r4                 # const struct sigaction_emu31 *
828         llgfr   %r5,%r5                 # size_t
829         jg      sys32_rt_sigaction      # branch to system call
830
831         .globl  sys32_rt_sigprocmask_wrapper
832 sys32_rt_sigprocmask_wrapper:
833         lgfr    %r2,%r2                 # int
834         llgtr   %r3,%r3                 # old_sigset_emu31 *
835         llgtr   %r4,%r4                 # old_sigset_emu31 *
836         llgfr   %r5,%r5                 # size_t
837         jg      sys32_rt_sigprocmask    # branch to system call
838
839         .globl  sys32_rt_sigpending_wrapper
840 sys32_rt_sigpending_wrapper:
841         llgtr   %r2,%r2                 # sigset_emu31 *
842         llgfr   %r3,%r3                 # size_t
843         jg      sys32_rt_sigpending     # branch to system call
844
845         .globl  compat_sys_rt_sigtimedwait_wrapper
846 compat_sys_rt_sigtimedwait_wrapper:
847         llgtr   %r2,%r2                 # const sigset_emu31_t *
848         llgtr   %r3,%r3                 # siginfo_emu31_t *
849         llgtr   %r4,%r4                 # const struct compat_timespec *
850         llgfr   %r5,%r5                 # size_t
851         jg      compat_sys_rt_sigtimedwait      # branch to system call
852
853         .globl  sys32_rt_sigqueueinfo_wrapper
854 sys32_rt_sigqueueinfo_wrapper:
855         lgfr    %r2,%r2                 # int
856         lgfr    %r3,%r3                 # int
857         llgtr   %r4,%r4                 # siginfo_emu31_t *
858         jg      sys32_rt_sigqueueinfo   # branch to system call
859
860         .globl compat_sys_rt_sigsuspend_wrapper
861 compat_sys_rt_sigsuspend_wrapper:
862         llgtr   %r2,%r2                 # compat_sigset_t *
863         llgfr   %r3,%r3                 # compat_size_t
864         jg      compat_sys_rt_sigsuspend
865
866         .globl  sys32_pread64_wrapper
867 sys32_pread64_wrapper:
868         llgfr   %r2,%r2                 # unsigned int
869         llgtr   %r3,%r3                 # char *
870         llgfr   %r4,%r4                 # size_t
871         llgfr   %r5,%r5                 # u32
872         llgfr   %r6,%r6                 # u32
873         jg      sys32_pread64           # branch to system call
874
875         .globl  sys32_pwrite64_wrapper
876 sys32_pwrite64_wrapper:
877         llgfr   %r2,%r2                 # unsigned int
878         llgtr   %r3,%r3                 # const char *
879         llgfr   %r4,%r4                 # size_t
880         llgfr   %r5,%r5                 # u32
881         llgfr   %r6,%r6                 # u32
882         jg      sys32_pwrite64          # branch to system call
883
884         .globl  sys32_chown16_wrapper
885 sys32_chown16_wrapper:
886         llgtr   %r2,%r2                 # const char *
887         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t
888         llgfr   %r4,%r4                 # __kernel_old_gid_emu31_t
889         jg      sys32_chown16           # branch to system call
890
891         .globl  sys32_getcwd_wrapper
892 sys32_getcwd_wrapper:
893         llgtr   %r2,%r2                 # char *
894         llgfr   %r3,%r3                 # unsigned long
895         jg      sys_getcwd              # branch to system call
896
897         .globl  sys32_capget_wrapper
898 sys32_capget_wrapper:
899         llgtr   %r2,%r2                 # cap_user_header_t
900         llgtr   %r3,%r3                 # cap_user_data_t
901         jg      sys_capget              # branch to system call
902
903         .globl  sys32_capset_wrapper
904 sys32_capset_wrapper:
905         llgtr   %r2,%r2                 # cap_user_header_t
906         llgtr   %r3,%r3                 # const cap_user_data_t
907         jg      sys_capset              # branch to system call
908
909         .globl sys32_sigaltstack_wrapper
910 sys32_sigaltstack_wrapper:
911         llgtr   %r2,%r2                 # const stack_emu31_t *
912         llgtr   %r3,%r3                 # stack_emu31_t *
913         jg      sys32_sigaltstack
914
915         .globl  sys32_sendfile_wrapper
916 sys32_sendfile_wrapper:
917         lgfr    %r2,%r2                 # int
918         lgfr    %r3,%r3                 # int
919         llgtr   %r4,%r4                 # __kernel_off_emu31_t *
920         llgfr   %r5,%r5                 # size_t
921         jg      sys32_sendfile          # branch to system call
922
923 #sys32_vfork_wrapper                    # done in vfork_glue
924
925         .globl  sys32_truncate64_wrapper
926 sys32_truncate64_wrapper:
927         llgtr   %r2,%r2                 # const char *
928         llgfr   %r3,%r3                 # unsigned long
929         llgfr   %r4,%r4                 # unsigned long
930         jg      sys32_truncate64        # branch to system call
931
932         .globl  sys32_ftruncate64_wrapper
933 sys32_ftruncate64_wrapper:
934         llgfr   %r2,%r2                 # unsigned int
935         llgfr   %r3,%r3                 # unsigned long
936         llgfr   %r4,%r4                 # unsigned long
937         jg      sys32_ftruncate64       # branch to system call
938
939         .globl sys32_lchown_wrapper
940 sys32_lchown_wrapper:
941         llgtr   %r2,%r2                 # const char *
942         llgfr   %r3,%r3                 # uid_t
943         llgfr   %r4,%r4                 # gid_t
944         jg      sys_lchown              # branch to system call
945
946 #sys32_getuid_wrapper                   # void
947 #sys32_getgid_wrapper                   # void
948 #sys32_geteuid_wrapper                  # void
949 #sys32_getegid_wrapper                  # void
950
951         .globl sys32_setreuid_wrapper
952 sys32_setreuid_wrapper:
953         llgfr   %r2,%r2                 # uid_t
954         llgfr   %r3,%r3                 # uid_t
955         jg      sys_setreuid            # branch to system call
956
957         .globl sys32_setregid_wrapper
958 sys32_setregid_wrapper:
959         llgfr   %r2,%r2                 # gid_t
960         llgfr   %r3,%r3                 # gid_t
961         jg      sys_setregid            # branch to system call
962
963         .globl  sys32_getgroups_wrapper
964 sys32_getgroups_wrapper:
965         lgfr    %r2,%r2                 # int
966         llgtr   %r3,%r3                 # gid_t *
967         jg      sys_getgroups           # branch to system call
968
969         .globl  sys32_setgroups_wrapper
970 sys32_setgroups_wrapper:
971         lgfr    %r2,%r2                 # int
972         llgtr   %r3,%r3                 # gid_t *
973         jg      sys_setgroups           # branch to system call
974
975         .globl sys32_fchown_wrapper
976 sys32_fchown_wrapper:
977         llgfr   %r2,%r2                 # unsigned int
978         llgfr   %r3,%r3                 # uid_t
979         llgfr   %r4,%r4                 # gid_t
980         jg      sys_fchown              # branch to system call
981
982         .globl sys32_setresuid_wrapper
983 sys32_setresuid_wrapper:
984         llgfr   %r2,%r2                 # uid_t
985         llgfr   %r3,%r3                 # uid_t
986         llgfr   %r4,%r4                 # uid_t
987         jg      sys_setresuid           # branch to system call
988
989         .globl sys32_getresuid_wrapper
990 sys32_getresuid_wrapper:
991         llgtr   %r2,%r2                 # uid_t *
992         llgtr   %r3,%r3                 # uid_t *
993         llgtr   %r4,%r4                 # uid_t *
994         jg      sys_getresuid           # branch to system call
995
996         .globl sys32_setresgid_wrapper
997 sys32_setresgid_wrapper:
998         llgfr   %r2,%r2                 # gid_t
999         llgfr   %r3,%r3                 # gid_t
1000         llgfr   %r4,%r4                 # gid_t
1001         jg      sys_setresgid           # branch to system call
1002
1003         .globl sys32_getresgid_wrapper
1004 sys32_getresgid_wrapper:
1005         llgtr   %r2,%r2                 # gid_t *
1006         llgtr   %r3,%r3                 # gid_t *
1007         llgtr   %r4,%r4                 # gid_t *
1008         jg      sys_getresgid           # branch to system call
1009
1010         .globl sys32_chown_wrapper
1011 sys32_chown_wrapper:
1012         llgtr   %r2,%r2                 # const char *
1013         llgfr   %r3,%r3                 # uid_t
1014         llgfr   %r4,%r4                 # gid_t
1015         jg      sys_chown               # branch to system call
1016
1017         .globl sys32_setuid_wrapper
1018 sys32_setuid_wrapper:
1019         llgfr   %r2,%r2                 # uid_t
1020         jg      sys_setuid              # branch to system call
1021
1022         .globl sys32_setgid_wrapper
1023 sys32_setgid_wrapper:
1024         llgfr   %r2,%r2                 # gid_t
1025         jg      sys_setgid              # branch to system call
1026
1027         .globl sys32_setfsuid_wrapper
1028 sys32_setfsuid_wrapper:
1029         llgfr   %r2,%r2                 # uid_t
1030         jg      sys_setfsuid            # branch to system call
1031
1032         .globl sys32_setfsgid_wrapper
1033 sys32_setfsgid_wrapper:
1034         llgfr   %r2,%r2                 # gid_t
1035         jg      sys_setfsgid            # branch to system call
1036
1037         .globl  sys32_pivot_root_wrapper
1038 sys32_pivot_root_wrapper:
1039         llgtr   %r2,%r2                 # const char *
1040         llgtr   %r3,%r3                 # const char *
1041         jg      sys_pivot_root          # branch to system call
1042
1043         .globl  sys32_mincore_wrapper
1044 sys32_mincore_wrapper:
1045         llgfr   %r2,%r2                 # unsigned long
1046         llgfr   %r3,%r3                 # size_t
1047         llgtr   %r4,%r4                 # unsigned char *
1048         jg      sys_mincore             # branch to system call
1049
1050         .globl  sys32_madvise_wrapper
1051 sys32_madvise_wrapper:
1052         llgfr   %r2,%r2                 # unsigned long
1053         llgfr   %r3,%r3                 # size_t
1054         lgfr    %r4,%r4                 # int
1055         jg      sys_madvise             # branch to system call
1056
1057         .globl  sys32_getdents64_wrapper
1058 sys32_getdents64_wrapper:
1059         llgfr   %r2,%r2                 # unsigned int
1060         llgtr   %r3,%r3                 # void *
1061         llgfr   %r4,%r4                 # unsigned int
1062         jg      sys_getdents64          # branch to system call
1063
1064         .globl  compat_sys_fcntl64_wrapper
1065 compat_sys_fcntl64_wrapper:
1066         llgfr   %r2,%r2                 # unsigned int
1067         llgfr   %r3,%r3                 # unsigned int
1068         llgfr   %r4,%r4                 # unsigned long
1069         jg      compat_sys_fcntl64      # branch to system call
1070
1071         .globl  sys32_stat64_wrapper
1072 sys32_stat64_wrapper:
1073         llgtr   %r2,%r2                 # char *
1074         llgtr   %r3,%r3                 # struct stat64 *
1075         jg      sys32_stat64            # branch to system call
1076
1077         .globl  sys32_lstat64_wrapper
1078 sys32_lstat64_wrapper:
1079         llgtr   %r2,%r2                 # char *
1080         llgtr   %r3,%r3                 # struct stat64 *
1081         jg      sys32_lstat64           # branch to system call
1082
1083         .globl  sys32_stime_wrapper
1084 sys32_stime_wrapper:
1085         llgtr   %r2,%r2                 # long *
1086         jg      compat_sys_stime        # branch to system call
1087
1088         .globl  sys32_sysctl_wrapper
1089 sys32_sysctl_wrapper:
1090         llgtr   %r2,%r2                 # struct __sysctl_args32 *
1091         jg      sys32_sysctl
1092
1093         .globl  sys32_fstat64_wrapper
1094 sys32_fstat64_wrapper:
1095         llgfr   %r2,%r2                 # unsigned long
1096         llgtr   %r3,%r3                 # struct stat64 *
1097         jg      sys32_fstat64           # branch to system call
1098
1099         .globl  compat_sys_futex_wrapper
1100 compat_sys_futex_wrapper:
1101         llgtr   %r2,%r2                 # u32 *
1102         lgfr    %r3,%r3                 # int
1103         lgfr    %r4,%r4                 # int
1104         llgtr   %r5,%r5                 # struct compat_timespec *
1105         llgtr   %r6,%r6                 # u32 *
1106         lgf     %r0,164(%r15)           # int
1107         stg     %r0,160(%r15)
1108         jg      compat_sys_futex        # branch to system call
1109
1110         .globl  sys32_setxattr_wrapper
1111 sys32_setxattr_wrapper:
1112         llgtr   %r2,%r2                 # char *
1113         llgtr   %r3,%r3                 # char *
1114         llgtr   %r4,%r4                 # void *
1115         llgfr   %r5,%r5                 # size_t
1116         lgfr    %r6,%r6                 # int
1117         jg      sys_setxattr
1118
1119         .globl  sys32_lsetxattr_wrapper
1120 sys32_lsetxattr_wrapper:
1121         llgtr   %r2,%r2                 # char *
1122         llgtr   %r3,%r3                 # char *
1123         llgtr   %r4,%r4                 # void *
1124         llgfr   %r5,%r5                 # size_t
1125         lgfr    %r6,%r6                 # int
1126         jg      sys_lsetxattr
1127
1128         .globl  sys32_fsetxattr_wrapper
1129 sys32_fsetxattr_wrapper:
1130         lgfr    %r2,%r2                 # int
1131         llgtr   %r3,%r3                 # char *
1132         llgtr   %r4,%r4                 # void *
1133         llgfr   %r5,%r5                 # size_t
1134         lgfr    %r6,%r6                 # int
1135         jg      sys_fsetxattr
1136
1137         .globl  sys32_getxattr_wrapper
1138 sys32_getxattr_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_getxattr
1144
1145         .globl  sys32_lgetxattr_wrapper
1146 sys32_lgetxattr_wrapper:
1147         llgtr   %r2,%r2                 # char *
1148         llgtr   %r3,%r3                 # char *
1149         llgtr   %r4,%r4                 # void *
1150         llgfr   %r5,%r5                 # size_t
1151         jg      sys_lgetxattr
1152
1153         .globl  sys32_fgetxattr_wrapper
1154 sys32_fgetxattr_wrapper:
1155         lgfr    %r2,%r2                 # int
1156         llgtr   %r3,%r3                 # char *
1157         llgtr   %r4,%r4                 # void *
1158         llgfr   %r5,%r5                 # size_t
1159         jg      sys_fgetxattr
1160
1161         .globl  sys32_listxattr_wrapper
1162 sys32_listxattr_wrapper:
1163         llgtr   %r2,%r2                 # char *
1164         llgtr   %r3,%r3                 # char *
1165         llgfr   %r4,%r4                 # size_t
1166         jg      sys_listxattr
1167
1168         .globl  sys32_llistxattr_wrapper
1169 sys32_llistxattr_wrapper:
1170         llgtr   %r2,%r2                 # char *
1171         llgtr   %r3,%r3                 # char *
1172         llgfr   %r4,%r4                 # size_t
1173         jg      sys_llistxattr
1174
1175         .globl  sys32_flistxattr_wrapper
1176 sys32_flistxattr_wrapper:
1177         lgfr    %r2,%r2                 # int
1178         llgtr   %r3,%r3                 # char *
1179         llgfr   %r4,%r4                 # size_t
1180         jg      sys_flistxattr
1181
1182         .globl  sys32_removexattr_wrapper
1183 sys32_removexattr_wrapper:
1184         llgtr   %r2,%r2                 # char *
1185         llgtr   %r3,%r3                 # char *
1186         jg      sys_removexattr
1187
1188         .globl  sys32_lremovexattr_wrapper
1189 sys32_lremovexattr_wrapper:
1190         llgtr   %r2,%r2                 # char *
1191         llgtr   %r3,%r3                 # char *
1192         jg      sys_lremovexattr
1193
1194         .globl  sys32_fremovexattr_wrapper
1195 sys32_fremovexattr_wrapper:
1196         lgfr    %r2,%r2                 # int
1197         llgtr   %r3,%r3                 # char *
1198         jg      sys_fremovexattr
1199
1200         .globl  sys32_sched_setaffinity_wrapper
1201 sys32_sched_setaffinity_wrapper:
1202         lgfr    %r2,%r2                 # int
1203         llgfr   %r3,%r3                 # unsigned int
1204         llgtr   %r4,%r4                 # unsigned long *
1205         jg      compat_sys_sched_setaffinity
1206
1207         .globl  sys32_sched_getaffinity_wrapper
1208 sys32_sched_getaffinity_wrapper:
1209         lgfr    %r2,%r2                 # int
1210         llgfr   %r3,%r3                 # unsigned int
1211         llgtr   %r4,%r4                 # unsigned long *
1212         jg      compat_sys_sched_getaffinity
1213
1214         .globl  sys32_exit_group_wrapper
1215 sys32_exit_group_wrapper:
1216         lgfr    %r2,%r2                 # int
1217         jg      sys_exit_group          # branch to system call
1218
1219         .globl  sys32_set_tid_address_wrapper
1220 sys32_set_tid_address_wrapper:
1221         llgtr   %r2,%r2                 # int *
1222         jg      sys_set_tid_address     # branch to system call
1223
1224         .globl  sys_epoll_create_wrapper
1225 sys_epoll_create_wrapper:
1226         lgfr    %r2,%r2                 # int
1227         jg      sys_epoll_create        # branch to system call
1228
1229         .globl  sys_epoll_ctl_wrapper
1230 sys_epoll_ctl_wrapper:
1231         lgfr    %r2,%r2                 # int
1232         lgfr    %r3,%r3                 # int
1233         lgfr    %r4,%r4                 # int
1234         llgtr   %r5,%r5                 # struct epoll_event *
1235         jg      sys_epoll_ctl           # branch to system call
1236
1237         .globl  sys_epoll_wait_wrapper
1238 sys_epoll_wait_wrapper:
1239         lgfr    %r2,%r2                 # int
1240         llgtr   %r3,%r3                 # struct epoll_event *
1241         lgfr    %r4,%r4                 # int
1242         lgfr    %r5,%r5                 # int
1243         jg      sys_epoll_wait          # branch to system call
1244
1245         .globl  sys32_lookup_dcookie_wrapper
1246 sys32_lookup_dcookie_wrapper:
1247         sllg    %r2,%r2,32              # get high word of 64bit dcookie
1248         or      %r2,%r3                 # get low word of 64bit dcookie
1249         llgtr   %r3,%r4                 # char *
1250         llgfr   %r4,%r5                 # size_t
1251         jg      sys_lookup_dcookie
1252
1253         .globl  sys32_fadvise64_wrapper
1254 sys32_fadvise64_wrapper:
1255         lgfr    %r2,%r2                 # int
1256         sllg    %r3,%r3,32              # get high word of 64bit loff_t
1257         or      %r3,%r4                 # get low word of 64bit loff_t
1258         llgfr   %r4,%r5                 # size_t (unsigned long)
1259         lgfr    %r5,%r6                 # int
1260         jg      sys32_fadvise64
1261
1262         .globl  sys32_fadvise64_64_wrapper
1263 sys32_fadvise64_64_wrapper:
1264         llgtr   %r2,%r2                 # struct fadvise64_64_args *
1265         jg      sys32_fadvise64_64
1266
1267         .globl  sys32_clock_settime_wrapper
1268 sys32_clock_settime_wrapper:
1269         lgfr    %r2,%r2                 # clockid_t (int)
1270         llgtr   %r3,%r3                 # struct compat_timespec *
1271         jg      compat_sys_clock_settime
1272
1273         .globl  sys32_clock_gettime_wrapper
1274 sys32_clock_gettime_wrapper:
1275         lgfr    %r2,%r2                 # clockid_t (int)
1276         llgtr   %r3,%r3                 # struct compat_timespec *
1277         jg      compat_sys_clock_gettime
1278
1279         .globl  sys32_clock_getres_wrapper
1280 sys32_clock_getres_wrapper:
1281         lgfr    %r2,%r2                 # clockid_t (int)
1282         llgtr   %r3,%r3                 # struct compat_timespec *
1283         jg      compat_sys_clock_getres
1284
1285         .globl  sys32_clock_nanosleep_wrapper
1286 sys32_clock_nanosleep_wrapper:
1287         lgfr    %r2,%r2                 # clockid_t (int)
1288         lgfr    %r3,%r3                 # int
1289         llgtr   %r4,%r4                 # struct compat_timespec *
1290         llgtr   %r5,%r5                 # struct compat_timespec *
1291         jg      compat_sys_clock_nanosleep
1292
1293         .globl  sys32_timer_create_wrapper
1294 sys32_timer_create_wrapper:
1295         lgfr    %r2,%r2                 # timer_t (int)
1296         llgtr   %r3,%r3                 # struct compat_sigevent *
1297         llgtr   %r4,%r4                 # timer_t *
1298         jg      compat_sys_timer_create
1299
1300         .globl  sys32_timer_settime_wrapper
1301 sys32_timer_settime_wrapper:
1302         lgfr    %r2,%r2                 # timer_t (int)
1303         lgfr    %r3,%r3                 # int
1304         llgtr   %r4,%r4                 # struct compat_itimerspec *
1305         llgtr   %r5,%r5                 # struct compat_itimerspec *
1306         jg      compat_sys_timer_settime
1307
1308         .globl  sys32_timer_gettime_wrapper
1309 sys32_timer_gettime_wrapper:
1310         lgfr    %r2,%r2                 # timer_t (int)
1311         llgtr   %r3,%r3                 # struct compat_itimerspec *
1312         jg      compat_sys_timer_gettime
1313
1314         .globl  sys32_timer_getoverrun_wrapper
1315 sys32_timer_getoverrun_wrapper:
1316         lgfr    %r2,%r2                 # timer_t (int)
1317         jg      sys_timer_getoverrun
1318
1319         .globl  sys32_timer_delete_wrapper
1320 sys32_timer_delete_wrapper:
1321         lgfr    %r2,%r2                 # timer_t (int)
1322         jg      sys_timer_delete
1323
1324         .globl  sys32_io_setup_wrapper
1325 sys32_io_setup_wrapper:
1326         llgfr   %r2,%r2                 # unsigned int
1327         llgtr   %r3,%r3                 # u32 *
1328         jg      compat_sys_io_setup
1329
1330         .globl  sys32_io_destroy_wrapper
1331 sys32_io_destroy_wrapper:
1332         llgfr   %r2,%r2                 # (aio_context_t) u32
1333         jg      sys_io_destroy
1334
1335         .globl  sys32_io_getevents_wrapper
1336 sys32_io_getevents_wrapper:
1337         llgfr   %r2,%r2                 # (aio_context_t) u32
1338         lgfr    %r3,%r3                 # long
1339         lgfr    %r4,%r4                 # long
1340         llgtr   %r5,%r5                 # struct io_event *
1341         llgtr   %r6,%r6                 # struct compat_timespec *
1342         jg      compat_sys_io_getevents
1343
1344         .globl  sys32_io_submit_wrapper
1345 sys32_io_submit_wrapper:
1346         llgfr   %r2,%r2                 # (aio_context_t) u32
1347         lgfr    %r3,%r3                 # long
1348         llgtr   %r4,%r4                 # struct iocb **
1349         jg      compat_sys_io_submit
1350
1351         .globl  sys32_io_cancel_wrapper
1352 sys32_io_cancel_wrapper:
1353         llgfr   %r2,%r2                 # (aio_context_t) u32
1354         llgtr   %r3,%r3                 # struct iocb *
1355         llgtr   %r4,%r4                 # struct io_event *
1356         jg      sys_io_cancel
1357
1358         .globl compat_sys_statfs64_wrapper
1359 compat_sys_statfs64_wrapper:
1360         llgtr   %r2,%r2                 # const char *
1361         llgfr   %r3,%r3                 # compat_size_t
1362         llgtr   %r4,%r4                 # struct compat_statfs64 *
1363         jg      compat_sys_statfs64
1364
1365         .globl compat_sys_fstatfs64_wrapper
1366 compat_sys_fstatfs64_wrapper:
1367         llgfr   %r2,%r2                 # unsigned int fd
1368         llgfr   %r3,%r3                 # compat_size_t
1369         llgtr   %r4,%r4                 # struct compat_statfs64 *
1370         jg      compat_sys_fstatfs64
1371
1372         .globl  compat_sys_mq_open_wrapper
1373 compat_sys_mq_open_wrapper:
1374         llgtr   %r2,%r2                 # const char *
1375         lgfr    %r3,%r3                 # int
1376         llgfr   %r4,%r4                 # mode_t
1377         llgtr   %r5,%r5                 # struct compat_mq_attr *
1378         jg      compat_sys_mq_open
1379
1380         .globl  sys32_mq_unlink_wrapper
1381 sys32_mq_unlink_wrapper:
1382         llgtr   %r2,%r2                 # const char *
1383         jg      sys_mq_unlink
1384
1385         .globl  compat_sys_mq_timedsend_wrapper
1386 compat_sys_mq_timedsend_wrapper:
1387         lgfr    %r2,%r2                 # mqd_t
1388         llgtr   %r3,%r3                 # const char *
1389         llgfr   %r4,%r4                 # size_t
1390         llgfr   %r5,%r5                 # unsigned int
1391         llgtr   %r6,%r6                 # const struct compat_timespec *
1392         jg      compat_sys_mq_timedsend
1393
1394         .globl  compat_sys_mq_timedreceive_wrapper
1395 compat_sys_mq_timedreceive_wrapper:
1396         lgfr    %r2,%r2                 # mqd_t
1397         llgtr   %r3,%r3                 # char *
1398         llgfr   %r4,%r4                 # size_t
1399         llgtr   %r5,%r5                 # unsigned int *
1400         llgtr   %r6,%r6                 # const struct compat_timespec *
1401         jg      compat_sys_mq_timedreceive
1402
1403         .globl  compat_sys_mq_notify_wrapper
1404 compat_sys_mq_notify_wrapper:
1405         lgfr    %r2,%r2                 # mqd_t
1406         llgtr   %r3,%r3                 # struct compat_sigevent *
1407         jg      compat_sys_mq_notify
1408
1409         .globl  compat_sys_mq_getsetattr_wrapper
1410 compat_sys_mq_getsetattr_wrapper:
1411         lgfr    %r2,%r2                 # mqd_t
1412         llgtr   %r3,%r3                 # struct compat_mq_attr *
1413         llgtr   %r4,%r4                 # struct compat_mq_attr *
1414         jg      compat_sys_mq_getsetattr
1415
1416         .globl  compat_sys_add_key_wrapper
1417 compat_sys_add_key_wrapper:
1418         llgtr   %r2,%r2                 # const char *
1419         llgtr   %r3,%r3                 # const char *
1420         llgtr   %r4,%r4                 # const void *
1421         llgfr   %r5,%r5                 # size_t
1422         llgfr   %r6,%r6                 # (key_serial_t) u32
1423         jg      sys_add_key
1424
1425         .globl  compat_sys_request_key_wrapper
1426 compat_sys_request_key_wrapper:
1427         llgtr   %r2,%r2                 # const char *
1428         llgtr   %r3,%r3                 # const char *
1429         llgtr   %r4,%r4                 # const void *
1430         llgfr   %r5,%r5                 # (key_serial_t) u32
1431         jg      sys_request_key
1432
1433         .globl  sys32_remap_file_pages_wrapper
1434 sys32_remap_file_pages_wrapper:
1435         llgfr   %r2,%r2                 # unsigned long
1436         llgfr   %r3,%r3                 # unsigned long
1437         llgfr   %r4,%r4                 # unsigned long
1438         llgfr   %r5,%r5                 # unsigned long
1439         llgfr   %r6,%r6                 # unsigned long
1440         jg      sys_remap_file_pages
1441
1442         .globl  compat_sys_waitid_wrapper
1443 compat_sys_waitid_wrapper:
1444         lgfr    %r2,%r2                 # int
1445         lgfr    %r3,%r3                 # pid_t
1446         llgtr   %r4,%r4                 # siginfo_emu31_t *
1447         lgfr    %r5,%r5                 # int
1448         llgtr   %r6,%r6                 # struct rusage_emu31 *
1449         jg      compat_sys_waitid
1450
1451         .globl  compat_sys_kexec_load_wrapper
1452 compat_sys_kexec_load_wrapper:
1453         llgfr   %r2,%r2                 # unsigned long
1454         llgfr   %r3,%r3                 # unsigned long
1455         llgtr   %r4,%r4                 # struct kexec_segment *
1456         llgfr   %r5,%r5                 # unsigned long
1457         jg      compat_sys_kexec_load
1458
1459         .globl  sys_ioprio_set_wrapper
1460 sys_ioprio_set_wrapper:
1461         lgfr    %r2,%r2                 # int
1462         lgfr    %r3,%r3                 # int
1463         lgfr    %r4,%r4                 # int
1464         jg      sys_ioprio_set
1465
1466         .globl  sys_ioprio_get_wrapper
1467 sys_ioprio_get_wrapper:
1468         lgfr    %r2,%r2                 # int
1469         lgfr    %r3,%r3                 # int
1470         jg      sys_ioprio_get
1471
1472         .globl  sys_inotify_add_watch_wrapper
1473 sys_inotify_add_watch_wrapper:
1474         lgfr    %r2,%r2                 # int
1475         llgtr   %r3,%r3                 # const char *
1476         llgfr   %r4,%r4                 # u32
1477         jg      sys_inotify_add_watch
1478
1479         .globl  sys_inotify_rm_watch_wrapper
1480 sys_inotify_rm_watch_wrapper:
1481         lgfr    %r2,%r2                 # int
1482         llgfr   %r3,%r3                 # u32
1483         jg      sys_inotify_rm_watch
1484
1485         .globl compat_sys_openat_wrapper
1486 compat_sys_openat_wrapper:
1487         llgfr   %r2,%r2                 # unsigned int
1488         llgtr   %r3,%r3                 # const char *
1489         lgfr    %r4,%r4                 # int
1490         lgfr    %r5,%r5                 # int
1491         jg      compat_sys_openat
1492
1493         .globl sys_mkdirat_wrapper
1494 sys_mkdirat_wrapper:
1495         lgfr    %r2,%r2                 # int
1496         llgtr   %r3,%r3                 # const char *
1497         lgfr    %r4,%r4                 # int
1498         jg      sys_mkdirat
1499
1500         .globl sys_mknodat_wrapper
1501 sys_mknodat_wrapper:
1502         lgfr    %r2,%r2                 # int
1503         llgtr   %r3,%r3                 # const char *
1504         lgfr    %r4,%r4                 # int
1505         llgfr   %r5,%r5                 # unsigned int
1506         jg      sys_mknodat
1507
1508         .globl sys_fchownat_wrapper
1509 sys_fchownat_wrapper:
1510         lgfr    %r2,%r2                 # int
1511         llgtr   %r3,%r3                 # const char *
1512         llgfr   %r4,%r4                 # uid_t
1513         llgfr   %r5,%r5                 # gid_t
1514         lgfr    %r6,%r6                 # int
1515         jg      sys_fchownat
1516
1517         .globl compat_sys_futimesat_wrapper
1518 compat_sys_futimesat_wrapper:
1519         llgfr   %r2,%r2                 # unsigned int
1520         llgtr   %r3,%r3                 # char *
1521         llgtr   %r4,%r4                 # struct timeval *
1522         jg      compat_sys_futimesat
1523
1524         .globl sys32_fstatat64_wrapper
1525 sys32_fstatat64_wrapper:
1526         llgfr   %r2,%r2                 # unsigned int
1527         llgtr   %r3,%r3                 # char *
1528         llgtr   %r4,%r4                 # struct stat64 *
1529         lgfr    %r5,%r5                 # int
1530         jg      sys32_fstatat64
1531
1532         .globl sys_unlinkat_wrapper
1533 sys_unlinkat_wrapper:
1534         lgfr    %r2,%r2                 # int
1535         llgtr   %r3,%r3                 # const char *
1536         lgfr    %r4,%r4                 # int
1537         jg      sys_unlinkat
1538
1539         .globl sys_renameat_wrapper
1540 sys_renameat_wrapper:
1541         lgfr    %r2,%r2                 # int
1542         llgtr   %r3,%r3                 # const char *
1543         lgfr    %r4,%r4                 # int
1544         llgtr   %r5,%r5                 # const char *
1545         jg      sys_renameat
1546
1547         .globl sys_linkat_wrapper
1548 sys_linkat_wrapper:
1549         lgfr    %r2,%r2                 # int
1550         llgtr   %r3,%r3                 # const char *
1551         lgfr    %r4,%r4                 # int
1552         llgtr   %r5,%r5                 # const char *
1553         lgfr    %r6,%r6                 # int
1554         jg      sys_linkat
1555
1556         .globl sys_symlinkat_wrapper
1557 sys_symlinkat_wrapper:
1558         llgtr   %r2,%r2                 # const char *
1559         lgfr    %r3,%r3                 # int
1560         llgtr   %r4,%r4                 # const char *
1561         jg      sys_symlinkat
1562
1563         .globl sys_readlinkat_wrapper
1564 sys_readlinkat_wrapper:
1565         lgfr    %r2,%r2                 # int
1566         llgtr   %r3,%r3                 # const char *
1567         llgtr   %r4,%r4                 # char *
1568         lgfr    %r5,%r5                 # int
1569         jg      sys_readlinkat
1570
1571         .globl sys_fchmodat_wrapper
1572 sys_fchmodat_wrapper:
1573         lgfr    %r2,%r2                 # int
1574         llgtr   %r3,%r3                 # const char *
1575         llgfr   %r4,%r4                 # mode_t
1576         jg      sys_fchmodat
1577
1578         .globl sys_faccessat_wrapper
1579 sys_faccessat_wrapper:
1580         lgfr    %r2,%r2                 # int
1581         llgtr   %r3,%r3                 # const char *
1582         lgfr    %r4,%r4                 # int
1583         jg      sys_faccessat
1584
1585         .globl compat_sys_pselect6_wrapper
1586 compat_sys_pselect6_wrapper:
1587         lgfr    %r2,%r2                 # int
1588         llgtr   %r3,%r3                 # fd_set *
1589         llgtr   %r4,%r4                 # fd_set *
1590         llgtr   %r5,%r5                 # fd_set *
1591         llgtr   %r6,%r6                 # struct timespec *
1592         llgt    %r0,164(%r15)           # void *
1593         stg     %r0,160(%r15)
1594         jg      compat_sys_pselect6
1595
1596         .globl compat_sys_ppoll_wrapper
1597 compat_sys_ppoll_wrapper:
1598         llgtr   %r2,%r2                 # struct pollfd *
1599         llgfr   %r3,%r3                 # unsigned int
1600         llgtr   %r4,%r4                 # struct timespec *
1601         llgtr   %r5,%r5                 # const sigset_t *
1602         llgfr   %r6,%r6                 # size_t
1603         jg      compat_sys_ppoll
1604
1605         .globl sys_unshare_wrapper
1606 sys_unshare_wrapper:
1607         llgfr   %r2,%r2                 # unsigned long
1608         jg      sys_unshare
1609
1610         .globl compat_sys_set_robust_list_wrapper
1611 compat_sys_set_robust_list_wrapper:
1612         llgtr   %r2,%r2                 # struct compat_robust_list_head *
1613         llgfr   %r3,%r3                 # size_t
1614         jg      compat_sys_set_robust_list
1615
1616         .globl compat_sys_get_robust_list_wrapper
1617 compat_sys_get_robust_list_wrapper:
1618         lgfr    %r2,%r2                 # int
1619         llgtr   %r3,%r3                 # compat_uptr_t_t *
1620         llgtr   %r4,%r4                 # compat_size_t *
1621         jg      compat_sys_get_robust_list
1622
1623         .globl sys_splice_wrapper
1624 sys_splice_wrapper:
1625         lgfr    %r2,%r2                 # int
1626         llgtr   %r3,%r3                 # loff_t *
1627         lgfr    %r4,%r4                 # int
1628         llgtr   %r5,%r5                 # loff_t *
1629         llgfr   %r6,%r6                 # size_t
1630         llgf    %r0,164(%r15)           # unsigned int
1631         stg     %r0,160(%r15)
1632         jg      sys_splice
1633
1634         .globl  sys_sync_file_range_wrapper
1635 sys_sync_file_range_wrapper:
1636         lgfr    %r2,%r2                 # int
1637         sllg    %r3,%r3,32              # get high word of 64bit loff_t
1638         or      %r3,%r4                 # get low word of 64bit loff_t
1639         sllg    %r4,%r5,32              # get high word of 64bit loff_t
1640         or      %r4,%r6                 # get low word of 64bit loff_t
1641         llgf    %r5,164(%r15)           # unsigned int
1642         jg      sys_sync_file_range
1643
1644         .globl  sys_tee_wrapper
1645 sys_tee_wrapper:
1646         lgfr    %r2,%r2                 # int
1647         lgfr    %r3,%r3                 # int
1648         llgfr   %r4,%r4                 # size_t
1649         llgfr   %r5,%r5                 # unsigned int
1650         jg      sys_tee
1651
1652         .globl compat_sys_vmsplice_wrapper
1653 compat_sys_vmsplice_wrapper:
1654         lgfr    %r2,%r2                 # int
1655         llgtr   %r3,%r3                 # compat_iovec *
1656         llgfr   %r4,%r4                 # unsigned int
1657         llgfr   %r5,%r5                 # unsigned int
1658         jg      compat_sys_vmsplice
1659
1660         .globl  sys_getcpu_wrapper
1661 sys_getcpu_wrapper:
1662         llgtr   %r2,%r2                 # unsigned *
1663         llgtr   %r3,%r3                 # unsigned *
1664         llgtr   %r4,%r4                 # struct getcpu_cache *
1665         jg      sys_getcpu
1666
1667         .globl  compat_sys_epoll_pwait_wrapper
1668 compat_sys_epoll_pwait_wrapper:
1669         lgfr    %r2,%r2                 # int
1670         llgtr   %r3,%r3                 # struct compat_epoll_event *
1671         lgfr    %r4,%r4                 # int
1672         lgfr    %r5,%r5                 # int
1673         llgtr   %r6,%r6                 # compat_sigset_t *
1674         llgf    %r0,164(%r15)           # compat_size_t
1675         stg     %r0,160(%r15)
1676         jg      compat_sys_epoll_pwait
1677
1678         .globl  compat_sys_utimes_wrapper
1679 compat_sys_utimes_wrapper:
1680         llgtr   %r2,%r2                 # char *
1681         llgtr   %r3,%r3                 # struct compat_timeval *
1682         jg      compat_sys_utimes
1683
1684         .globl  compat_sys_utimensat_wrapper
1685 compat_sys_utimensat_wrapper:
1686         llgfr   %r2,%r2                 # unsigned int
1687         llgtr   %r3,%r3                 # char *
1688         llgtr   %r4,%r4                 # struct compat_timespec *
1689         lgfr    %r5,%r5                 # int
1690         jg      compat_sys_utimensat
1691
1692         .globl  compat_sys_signalfd_wrapper
1693 compat_sys_signalfd_wrapper:
1694         lgfr    %r2,%r2                 # int
1695         llgtr   %r3,%r3                 # compat_sigset_t *
1696         llgfr   %r4,%r4                 # compat_size_t
1697         jg      compat_sys_signalfd
1698
1699         .globl  sys_eventfd_wrapper
1700 sys_eventfd_wrapper:
1701         llgfr   %r2,%r2                 # unsigned int
1702         jg      sys_eventfd
1703
1704         .globl  sys_fallocate_wrapper
1705 sys_fallocate_wrapper:
1706         lgfr    %r2,%r2                 # int
1707         lgfr    %r3,%r3                 # int
1708         sllg    %r4,%r4,32              # get high word of 64bit loff_t
1709         lr      %r4,%r5                 # get low word of 64bit loff_t
1710         sllg    %r5,%r6,32              # get high word of 64bit loff_t
1711         l       %r5,164(%r15)           # get low word of 64bit loff_t
1712         jg      sys_fallocate
1713
1714         .globl  sys_timerfd_create_wrapper
1715 sys_timerfd_create_wrapper:
1716         lgfr    %r2,%r2                 # int
1717         lgfr    %r3,%r3                 # int
1718         jg      sys_timerfd_create
1719
1720         .globl  compat_sys_timerfd_settime_wrapper
1721 compat_sys_timerfd_settime_wrapper:
1722         lgfr    %r2,%r2                 # int
1723         lgfr    %r3,%r3                 # int
1724         llgtr   %r4,%r4                 # struct compat_itimerspec *
1725         llgtr   %r5,%r5                 # struct compat_itimerspec *
1726         jg      compat_sys_timerfd_settime
1727
1728         .globl  compat_sys_timerfd_gettime_wrapper
1729 compat_sys_timerfd_gettime_wrapper:
1730         lgfr    %r2,%r2                 # int
1731         llgtr   %r3,%r3                 # struct compat_itimerspec *
1732         jg      compat_sys_timerfd_gettime
1733
1734         .globl compat_sys_signalfd4_wrapper
1735 compat_sys_signalfd4_wrapper:
1736         lgfr    %r2,%r2                 # int
1737         llgtr   %r3,%r3                 # compat_sigset_t *
1738         llgfr   %r4,%r4                 # compat_size_t
1739         lgfr    %r5,%r5                 # int
1740         jg      compat_sys_signalfd4
1741
1742         .globl sys_eventfd2_wrapper
1743 sys_eventfd2_wrapper:
1744         llgfr   %r2,%r2                 # unsigned int
1745         lgfr    %r3,%r3                 # int
1746         jg      sys_eventfd2
1747
1748         .globl  sys_inotify_init1_wrapper
1749 sys_inotify_init1_wrapper:
1750         lgfr    %r2,%r2                 # int
1751         jg      sys_inotify_init1
1752
1753         .globl  sys_pipe2_wrapper
1754 sys_pipe2_wrapper:
1755         llgtr   %r2,%r2                 # u32 *
1756         lgfr    %r3,%r3                 # int
1757         jg      sys_pipe2               # branch to system call
1758
1759         .globl  sys_dup3_wrapper
1760 sys_dup3_wrapper:
1761         llgfr   %r2,%r2                 # unsigned int
1762         llgfr   %r3,%r3                 # unsigned int
1763         lgfr    %r4,%r4                 # int
1764         jg      sys_dup3                # branch to system call
1765
1766         .globl  sys_epoll_create1_wrapper
1767 sys_epoll_create1_wrapper:
1768         lgfr    %r2,%r2                 # int
1769         jg      sys_epoll_create1       # branch to system call
1770
1771         .globl  sys32_readahead_wrapper
1772 sys32_readahead_wrapper:
1773         lgfr    %r2,%r2                 # int
1774         llgfr   %r3,%r3                 # u32
1775         llgfr   %r4,%r4                 # u32
1776         lgfr    %r5,%r5                 # s32
1777         jg      sys32_readahead         # branch to system call
1778
1779         .globl  sys32_sendfile64_wrapper
1780 sys32_sendfile64_wrapper:
1781         lgfr    %r2,%r2                 # int
1782         lgfr    %r3,%r3                 # int
1783         llgtr   %r4,%r4                 # compat_loff_t *
1784         lgfr    %r5,%r5                 # s32
1785         jg      sys32_sendfile64        # branch to system call
1786
1787         .globl  sys_tkill_wrapper
1788 sys_tkill_wrapper:
1789         lgfr    %r2,%r2                 # pid_t
1790         lgfr    %r3,%r3                 # int
1791         jg      sys_tkill               # branch to system call
1792
1793         .globl  sys_tgkill_wrapper
1794 sys_tgkill_wrapper:
1795         lgfr    %r2,%r2                 # pid_t
1796         lgfr    %r3,%r3                 # pid_t
1797         lgfr    %r4,%r4                 # int
1798         jg      sys_tgkill              # branch to system call
1799
1800         .globl  compat_sys_keyctl_wrapper
1801 compat_sys_keyctl_wrapper:
1802         llgfr   %r2,%r2                 # u32
1803         llgfr   %r3,%r3                 # u32
1804         llgfr   %r4,%r4                 # u32
1805         llgfr   %r5,%r5                 # u32
1806         llgfr   %r6,%r6                 # u32
1807         jg      compat_sys_keyctl       # branch to system call
1808
1809         .globl  compat_sys_preadv_wrapper
1810 compat_sys_preadv_wrapper:
1811         llgfr   %r2,%r2                 # unsigned long
1812         llgtr   %r3,%r3                 # compat_iovec *
1813         llgfr   %r4,%r4                 # unsigned long
1814         llgfr   %r5,%r5                 # u32
1815         llgfr   %r6,%r6                 # u32
1816         jg      compat_sys_preadv       # branch to system call
1817
1818         .globl  compat_sys_pwritev_wrapper
1819 compat_sys_pwritev_wrapper:
1820         llgfr   %r2,%r2                 # unsigned long
1821         llgtr   %r3,%r3                 # compat_iovec *
1822         llgfr   %r4,%r4                 # unsigned long
1823         llgfr   %r5,%r5                 # u32
1824         llgfr   %r6,%r6                 # u32
1825         jg      compat_sys_pwritev      # branch to system call
1826
1827         .globl  compat_sys_rt_tgsigqueueinfo_wrapper
1828 compat_sys_rt_tgsigqueueinfo_wrapper:
1829         lgfr    %r2,%r2                 # compat_pid_t
1830         lgfr    %r3,%r3                 # compat_pid_t
1831         lgfr    %r4,%r4                 # int
1832         llgtr   %r5,%r5                 # struct compat_siginfo *
1833         jg      compat_sys_rt_tgsigqueueinfo_wrapper # branch to system call
1834
1835         .globl  sys_perf_counter_open_wrapper
1836 sys_perf_counter_open_wrapper:
1837         llgtr   %r2,%r2                 # const struct perf_counter_attr *
1838         lgfr    %r3,%r3                 # pid_t
1839         lgfr    %r4,%r4                 # int
1840         lgfr    %r5,%r5                 # int
1841         llgfr   %r6,%r6                 # unsigned long
1842         jg      sys_perf_counter_open   # branch to system call