Merge git://oss.sgi.com:8090/oss/git/xfs-2.6
[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      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 #sys32_pause_wrapper                    # void 
132
133         .globl  compat_sys_utime_wrapper 
134 compat_sys_utime_wrapper:
135         llgtr   %r2,%r2                 # char *
136         llgtr   %r3,%r3                 # struct compat_utimbuf *
137         jg      compat_sys_utime        # branch to system call
138
139         .globl  sys32_access_wrapper 
140 sys32_access_wrapper:
141         llgtr   %r2,%r2                 # const char *
142         lgfr    %r3,%r3                 # int
143         jg      sys_access              # branch to system call
144
145         .globl  sys32_nice_wrapper 
146 sys32_nice_wrapper:
147         lgfr    %r2,%r2                 # int
148         jg      sys_nice                # branch to system call
149
150 #sys32_sync_wrapper                     # void 
151
152         .globl  sys32_kill_wrapper 
153 sys32_kill_wrapper:
154         lgfr    %r2,%r2                 # int
155         lgfr    %r3,%r3                 # int
156         jg      sys_kill                # branch to system call
157
158         .globl  sys32_rename_wrapper 
159 sys32_rename_wrapper:
160         llgtr   %r2,%r2                 # const char *
161         llgtr   %r3,%r3                 # const char *
162         jg      sys_rename              # branch to system call
163
164         .globl  sys32_mkdir_wrapper 
165 sys32_mkdir_wrapper:
166         llgtr   %r2,%r2                 # const char *
167         lgfr    %r3,%r3                 # int
168         jg      sys_mkdir               # branch to system call
169
170         .globl  sys32_rmdir_wrapper 
171 sys32_rmdir_wrapper:
172         llgtr   %r2,%r2                 # const char *
173         jg      sys_rmdir               # branch to system call
174
175         .globl  sys32_dup_wrapper 
176 sys32_dup_wrapper:
177         llgfr   %r2,%r2                 # unsigned int
178         jg      sys_dup                 # branch to system call
179
180         .globl  sys32_pipe_wrapper 
181 sys32_pipe_wrapper:
182         llgtr   %r2,%r2                 # u32 *
183         jg      sys_pipe                # branch to system call
184
185         .globl  compat_sys_times_wrapper 
186 compat_sys_times_wrapper:
187         llgtr   %r2,%r2                 # struct compat_tms *
188         jg      compat_sys_times        # branch to system call
189
190         .globl  sys32_brk_wrapper 
191 sys32_brk_wrapper:
192         llgtr   %r2,%r2                 # unsigned long
193         jg      sys_brk                 # branch to system call
194
195         .globl  sys32_setgid16_wrapper 
196 sys32_setgid16_wrapper:
197         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
198         jg      sys32_setgid16          # branch to system call
199
200 #sys32_getgid16_wrapper                 # void 
201
202         .globl sys32_signal_wrapper
203 sys32_signal_wrapper:
204         lgfr    %r2,%r2                 # int 
205         llgtr   %r3,%r3                 # __sighandler_t
206         jg      sys_signal
207
208 #sys32_geteuid16_wrapper                # void 
209
210 #sys32_getegid16_wrapper                # void 
211
212         .globl  sys32_acct_wrapper 
213 sys32_acct_wrapper:
214         llgtr   %r2,%r2                 # char *
215         jg      sys_acct                # branch to system call
216
217         .globl  sys32_umount_wrapper 
218 sys32_umount_wrapper:
219         llgtr   %r2,%r2                 # char *
220         lgfr    %r3,%r3                 # int
221         jg      sys_umount              # branch to system call
222
223         .globl  compat_sys_ioctl_wrapper
224 compat_sys_ioctl_wrapper:
225         llgfr   %r2,%r2                 # unsigned int
226         llgfr   %r3,%r3                 # unsigned int
227         llgfr   %r4,%r4                 # unsigned int
228         jg      compat_sys_ioctl        # branch to system call
229
230         .globl  compat_sys_fcntl_wrapper 
231 compat_sys_fcntl_wrapper:
232         llgfr   %r2,%r2                 # unsigned int
233         llgfr   %r3,%r3                 # unsigned int 
234         llgfr   %r4,%r4                 # unsigned long
235         jg      compat_sys_fcntl        # branch to system call
236
237         .globl  sys32_setpgid_wrapper 
238 sys32_setpgid_wrapper:
239         lgfr    %r2,%r2                 # pid_t
240         lgfr    %r3,%r3                 # pid_t
241         jg      sys_setpgid             # branch to system call
242
243         .globl  sys32_umask_wrapper 
244 sys32_umask_wrapper:
245         lgfr    %r2,%r2                 # int
246         jg      sys_umask               # branch to system call
247
248         .globl  sys32_chroot_wrapper 
249 sys32_chroot_wrapper:
250         llgtr   %r2,%r2                 # char *
251         jg      sys_chroot              # branch to system call
252
253         .globl sys32_ustat_wrapper
254 sys32_ustat_wrapper:
255         llgfr   %r2,%r2                 # dev_t 
256         llgtr   %r3,%r3                 # struct ustat *
257         jg      sys_ustat
258
259         .globl  sys32_dup2_wrapper 
260 sys32_dup2_wrapper:
261         llgfr   %r2,%r2                 # unsigned int
262         llgfr   %r3,%r3                 # unsigned int
263         jg      sys_dup2                # branch to system call
264
265 #sys32_getppid_wrapper                  # void 
266
267 #sys32_getpgrp_wrapper                  # void 
268
269 #sys32_setsid_wrapper                   # void 
270
271         .globl  sys32_sigaction_wrapper
272 sys32_sigaction_wrapper:
273         lgfr    %r2,%r2                 # int 
274         llgtr   %r3,%r3                 # const struct old_sigaction *
275         llgtr   %r4,%r4                 # struct old_sigaction32 *
276         jg      sys32_sigaction         # branch to system call
277
278         .globl  sys32_setreuid16_wrapper 
279 sys32_setreuid16_wrapper:
280         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t 
281         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t 
282         jg      sys32_setreuid16        # branch to system call
283
284         .globl  sys32_setregid16_wrapper 
285 sys32_setregid16_wrapper:
286         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
287         llgfr   %r3,%r3                 # __kernel_old_gid_emu31_t 
288         jg      sys32_setregid16        # branch to system call
289
290         .globl sys_sigsuspend_wrapper
291 sys_sigsuspend_wrapper:
292         lgfr    %r2,%r2                 # int
293         lgfr    %r3,%r3                 # int
294         llgfr   %r4,%r4                 # old_sigset_t
295         jg      sys_sigsuspend
296
297         .globl  compat_sys_sigpending_wrapper 
298 compat_sys_sigpending_wrapper:
299         llgtr   %r2,%r2                 # compat_old_sigset_t *
300         jg      compat_sys_sigpending   # branch to system call
301
302         .globl  sys32_sethostname_wrapper 
303 sys32_sethostname_wrapper:
304         llgtr   %r2,%r2                 # char *
305         lgfr    %r3,%r3                 # int
306         jg      sys_sethostname         # branch to system call
307
308         .globl  compat_sys_setrlimit_wrapper 
309 compat_sys_setrlimit_wrapper:
310         llgfr   %r2,%r2                 # unsigned int
311         llgtr   %r3,%r3                 # struct rlimit_emu31 *
312         jg      compat_sys_setrlimit    # branch to system call
313
314         .globl  compat_sys_old_getrlimit_wrapper 
315 compat_sys_old_getrlimit_wrapper:
316         llgfr   %r2,%r2                 # unsigned int
317         llgtr   %r3,%r3                 # struct rlimit_emu31 *
318         jg      compat_sys_old_getrlimit # branch to system call
319
320         .globl  compat_sys_getrlimit_wrapper 
321 compat_sys_getrlimit_wrapper:
322         llgfr   %r2,%r2                 # unsigned int
323         llgtr   %r3,%r3                 # struct rlimit_emu31 *
324         jg      compat_sys_getrlimit    # branch to system call
325
326         .globl  sys32_mmap2_wrapper 
327 sys32_mmap2_wrapper:
328         llgtr   %r2,%r2                 # struct mmap_arg_struct_emu31 *
329         jg      sys32_mmap2                     # branch to system call
330
331         .globl  compat_sys_getrusage_wrapper 
332 compat_sys_getrusage_wrapper:
333         lgfr    %r2,%r2                 # int
334         llgtr   %r3,%r3                 # struct rusage_emu31 *
335         jg      compat_sys_getrusage    # branch to system call
336
337         .globl  sys32_gettimeofday_wrapper 
338 sys32_gettimeofday_wrapper:
339         llgtr   %r2,%r2                 # struct timeval_emu31 *
340         llgtr   %r3,%r3                 # struct timezone *
341         jg      sys32_gettimeofday      # branch to system call
342
343         .globl  sys32_settimeofday_wrapper 
344 sys32_settimeofday_wrapper:
345         llgtr   %r2,%r2                 # struct timeval_emu31 *
346         llgtr   %r3,%r3                 # struct timezone *
347         jg      sys32_settimeofday      # branch to system call
348
349         .globl  sys32_getgroups16_wrapper 
350 sys32_getgroups16_wrapper:
351         lgfr    %r2,%r2                 # int
352         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
353         jg      sys32_getgroups16       # branch to system call
354
355         .globl  sys32_setgroups16_wrapper 
356 sys32_setgroups16_wrapper:
357         lgfr    %r2,%r2                 # int
358         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
359         jg      sys32_setgroups16       # branch to system call
360
361         .globl  sys32_symlink_wrapper 
362 sys32_symlink_wrapper:
363         llgtr   %r2,%r2                 # const char *
364         llgtr   %r3,%r3                 # const char *
365         jg      sys_symlink             # branch to system call
366
367         .globl  sys32_readlink_wrapper 
368 sys32_readlink_wrapper:
369         llgtr   %r2,%r2                 # const char *
370         llgtr   %r3,%r3                 # char *
371         lgfr    %r4,%r4                 # int
372         jg      sys_readlink            # branch to system call
373
374         .globl  sys32_uselib_wrapper 
375 sys32_uselib_wrapper:
376         llgtr   %r2,%r2                 # const char *
377         jg      sys_uselib              # branch to system call
378
379         .globl  sys32_swapon_wrapper 
380 sys32_swapon_wrapper:
381         llgtr   %r2,%r2                 # const char *
382         lgfr    %r3,%r3                 # int
383         jg      sys_swapon              # branch to system call
384
385         .globl  sys32_reboot_wrapper 
386 sys32_reboot_wrapper:
387         lgfr    %r2,%r2                 # int
388         lgfr    %r3,%r3                 # int
389         llgfr   %r4,%r4                 # unsigned int
390         llgtr   %r5,%r5                 # void *
391         jg      sys_reboot              # branch to system call
392
393         .globl  old32_readdir_wrapper 
394 old32_readdir_wrapper:
395         llgfr   %r2,%r2                 # unsigned int
396         llgtr   %r3,%r3                 # void *
397         llgfr   %r4,%r4                 # unsigned int
398         jg      compat_sys_old_readdir  # branch to system call
399
400         .globl  old32_mmap_wrapper 
401 old32_mmap_wrapper:
402         llgtr   %r2,%r2                 # struct mmap_arg_struct_emu31 *
403         jg      old32_mmap              # branch to system call
404
405         .globl  sys32_munmap_wrapper 
406 sys32_munmap_wrapper:
407         llgfr   %r2,%r2                 # unsigned long
408         llgfr   %r3,%r3                 # size_t 
409         jg      sys_munmap              # branch to system call
410
411         .globl  sys32_truncate_wrapper 
412 sys32_truncate_wrapper:
413         llgtr   %r2,%r2                 # const char *
414         llgfr   %r3,%r3                 # unsigned long
415         jg      sys_truncate            # branch to system call
416
417         .globl  sys32_ftruncate_wrapper 
418 sys32_ftruncate_wrapper:
419         llgfr   %r2,%r2                 # unsigned int
420         llgfr   %r3,%r3                 # unsigned long
421         jg      sys_ftruncate           # branch to system call
422
423         .globl  sys32_fchmod_wrapper 
424 sys32_fchmod_wrapper:
425         llgfr   %r2,%r2                 # unsigned int
426         llgfr   %r3,%r3                 # mode_t
427         jg      sys_fchmod              # branch to system call
428
429         .globl  sys32_fchown16_wrapper 
430 sys32_fchown16_wrapper:
431         llgfr   %r2,%r2                 # unsigned int
432         llgfr   %r3,%r3                 # compat_uid_t
433         llgfr   %r4,%r4                 # compat_uid_t
434         jg      sys32_fchown16          # branch to system call
435
436         .globl  sys32_getpriority_wrapper 
437 sys32_getpriority_wrapper:
438         lgfr    %r2,%r2                 # int
439         lgfr    %r3,%r3                 # int
440         jg      sys_getpriority         # branch to system call
441
442         .globl  sys32_setpriority_wrapper 
443 sys32_setpriority_wrapper:
444         lgfr    %r2,%r2                 # int
445         lgfr    %r3,%r3                 # int
446         lgfr    %r4,%r4                 # int
447         jg      sys_setpriority         # branch to system call
448
449         .globl  compat_sys_statfs_wrapper 
450 compat_sys_statfs_wrapper:
451         llgtr   %r2,%r2                 # char *
452         llgtr   %r3,%r3                 # struct compat_statfs *
453         jg      compat_sys_statfs       # branch to system call
454
455         .globl  compat_sys_fstatfs_wrapper 
456 compat_sys_fstatfs_wrapper:
457         llgfr   %r2,%r2                 # unsigned int
458         llgtr   %r3,%r3                 # struct compat_statfs *
459         jg      compat_sys_fstatfs      # branch to system call
460
461         .globl  compat_sys_socketcall_wrapper 
462 compat_sys_socketcall_wrapper:
463         lgfr    %r2,%r2                 # int
464         llgtr   %r3,%r3                 # u32 *
465         jg      compat_sys_socketcall   # branch to system call
466
467         .globl  sys32_syslog_wrapper 
468 sys32_syslog_wrapper:
469         lgfr    %r2,%r2                 # int
470         llgtr   %r3,%r3                 # char *
471         lgfr    %r4,%r4                 # int
472         jg      sys_syslog              # branch to system call
473
474         .globl  compat_sys_setitimer_wrapper 
475 compat_sys_setitimer_wrapper:
476         lgfr    %r2,%r2                 # int
477         llgtr   %r3,%r3                 # struct itimerval_emu31 *
478         llgtr   %r4,%r4                 # struct itimerval_emu31 *
479         jg      compat_sys_setitimer    # branch to system call
480
481         .globl  compat_sys_getitimer_wrapper 
482 compat_sys_getitimer_wrapper:
483         lgfr    %r2,%r2                 # int
484         llgtr   %r3,%r3                 # struct itimerval_emu31 *
485         jg      compat_sys_getitimer    # branch to system call
486
487         .globl  compat_sys_newstat_wrapper 
488 compat_sys_newstat_wrapper:
489         llgtr   %r2,%r2                 # char *
490         llgtr   %r3,%r3                 # struct stat_emu31 *
491         jg      compat_sys_newstat      # branch to system call
492
493         .globl  compat_sys_newlstat_wrapper 
494 compat_sys_newlstat_wrapper:
495         llgtr   %r2,%r2                 # char *
496         llgtr   %r3,%r3                 # struct stat_emu31 *
497         jg      compat_sys_newlstat     # branch to system call
498
499         .globl  compat_sys_newfstat_wrapper 
500 compat_sys_newfstat_wrapper:
501         llgfr   %r2,%r2                 # unsigned int
502         llgtr   %r3,%r3                 # struct stat_emu31 *
503         jg      compat_sys_newfstat     # branch to system call
504
505 #sys32_vhangup_wrapper                  # void 
506
507         .globl  compat_sys_wait4_wrapper 
508 compat_sys_wait4_wrapper:
509         lgfr    %r2,%r2                 # pid_t
510         llgtr   %r3,%r3                 # unsigned int *
511         lgfr    %r4,%r4                 # int
512         llgtr   %r5,%r5                 # struct rusage *
513         jg      compat_sys_wait4        # branch to system call
514
515         .globl  sys32_swapoff_wrapper 
516 sys32_swapoff_wrapper:
517         llgtr   %r2,%r2                 # const char *
518         jg      sys_swapoff             # branch to system call
519
520         .globl  sys32_sysinfo_wrapper 
521 sys32_sysinfo_wrapper:
522         llgtr   %r2,%r2                 # struct sysinfo_emu31 *
523         jg      sys32_sysinfo           # branch to system call
524
525         .globl  sys32_ipc_wrapper 
526 sys32_ipc_wrapper:
527         llgfr   %r2,%r2                 # uint
528         lgfr    %r3,%r3                 # int
529         lgfr    %r4,%r4                 # int
530         lgfr    %r5,%r5                 # int
531         llgfr   %r6,%r6                 # u32
532         jg      sys32_ipc               # branch to system call
533
534         .globl  sys32_fsync_wrapper 
535 sys32_fsync_wrapper:
536         llgfr   %r2,%r2                 # unsigned int
537         jg      sys_fsync               # branch to system call
538
539 #sys32_sigreturn_wrapper                # done in sigreturn_glue 
540
541 #sys32_clone_wrapper                    # done in clone_glue 
542
543         .globl  sys32_setdomainname_wrapper 
544 sys32_setdomainname_wrapper:
545         llgtr   %r2,%r2                 # char *
546         lgfr    %r3,%r3                 # int
547         jg      sys_setdomainname       # branch to system call
548
549         .globl  sys32_newuname_wrapper 
550 sys32_newuname_wrapper:
551         llgtr   %r2,%r2                 # struct new_utsname *
552         jg      s390x_newuname          # branch to system call
553
554         .globl  sys32_adjtimex_wrapper 
555 sys32_adjtimex_wrapper:
556         llgtr   %r2,%r2                 # struct timex_emu31 *
557         jg      sys32_adjtimex          # branch to system call
558
559         .globl  sys32_mprotect_wrapper 
560 sys32_mprotect_wrapper:
561         llgtr   %r2,%r2                 # unsigned long (actually pointer
562         llgfr   %r3,%r3                 # size_t
563         llgfr   %r4,%r4                 # unsigned long
564         jg      sys_mprotect            # branch to system call
565
566         .globl  compat_sys_sigprocmask_wrapper 
567 compat_sys_sigprocmask_wrapper:
568         lgfr    %r2,%r2                 # int
569         llgtr   %r3,%r3                 # compat_old_sigset_t *
570         llgtr   %r4,%r4                 # compat_old_sigset_t *
571         jg      compat_sys_sigprocmask          # branch to system call
572
573         .globl  sys32_init_module_wrapper 
574 sys32_init_module_wrapper:
575         llgtr   %r2,%r2                 # void *
576         llgfr   %r3,%r3                 # unsigned long
577         llgtr   %r4,%r4                 # char *
578         jg      sys32_init_module       # branch to system call
579
580         .globl  sys32_delete_module_wrapper 
581 sys32_delete_module_wrapper:
582         llgtr   %r2,%r2                 # const char *
583         llgfr   %r3,%r3                 # unsigned int
584         jg      sys32_delete_module     # branch to system call
585
586         .globl  sys32_quotactl_wrapper 
587 sys32_quotactl_wrapper:
588         llgfr   %r2,%r2                 # unsigned int
589         llgtr   %r3,%r3                 # const char *
590         llgfr   %r4,%r4                 # qid_t
591         llgtr   %r5,%r5                 # caddr_t
592         jg      sys_quotactl            # branch to system call
593
594         .globl  sys32_getpgid_wrapper 
595 sys32_getpgid_wrapper:
596         lgfr    %r2,%r2                 # pid_t
597         jg      sys_getpgid             # branch to system call
598
599         .globl  sys32_fchdir_wrapper 
600 sys32_fchdir_wrapper:
601         llgfr   %r2,%r2                 # unsigned int
602         jg      sys_fchdir              # branch to system call
603
604         .globl  sys32_bdflush_wrapper 
605 sys32_bdflush_wrapper:
606         lgfr    %r2,%r2                 # int
607         lgfr    %r3,%r3                 # long
608         jg      sys_bdflush             # branch to system call
609
610         .globl  sys32_sysfs_wrapper 
611 sys32_sysfs_wrapper:
612         lgfr    %r2,%r2                 # int
613         llgfr   %r3,%r3                 # unsigned long
614         llgfr   %r4,%r4                 # unsigned long
615         jg      sys_sysfs               # branch to system call
616
617         .globl  sys32_personality_wrapper 
618 sys32_personality_wrapper:
619         llgfr   %r2,%r2                 # unsigned long
620         jg      s390x_personality       # branch to system call
621
622         .globl  sys32_setfsuid16_wrapper 
623 sys32_setfsuid16_wrapper:
624         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t 
625         jg      sys32_setfsuid16        # branch to system call
626
627         .globl  sys32_setfsgid16_wrapper 
628 sys32_setfsgid16_wrapper:
629         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
630         jg      sys32_setfsgid16        # branch to system call
631
632         .globl  sys32_llseek_wrapper 
633 sys32_llseek_wrapper:
634         llgfr   %r2,%r2                 # unsigned int
635         llgfr   %r3,%r3                 # unsigned long
636         llgfr   %r4,%r4                 # unsigned long
637         llgtr   %r5,%r5                 # loff_t *
638         llgfr   %r6,%r6                 # unsigned int
639         jg      sys_llseek              # branch to system call
640
641         .globl  sys32_getdents_wrapper 
642 sys32_getdents_wrapper:
643         llgfr   %r2,%r2                 # unsigned int
644         llgtr   %r3,%r3                 # void *
645         llgfr   %r4,%r4                 # unsigned int
646         jg      compat_sys_getdents     # branch to system call
647
648         .globl  compat_sys_select_wrapper
649 compat_sys_select_wrapper:
650         lgfr    %r2,%r2                 # int
651         llgtr   %r3,%r3                 # compat_fd_set *
652         llgtr   %r4,%r4                 # compat_fd_set *
653         llgtr   %r5,%r5                 # compat_fd_set *
654         llgtr   %r6,%r6                 # struct compat_timeval *
655         jg      compat_sys_select       # branch to system call
656
657         .globl  sys32_flock_wrapper 
658 sys32_flock_wrapper:
659         llgfr   %r2,%r2                 # unsigned int
660         llgfr   %r3,%r3                 # unsigned int
661         jg      sys_flock               # branch to system call
662
663         .globl  sys32_msync_wrapper 
664 sys32_msync_wrapper:
665         llgfr   %r2,%r2                 # unsigned long
666         llgfr   %r3,%r3                 # size_t
667         lgfr    %r4,%r4                 # int
668         jg      sys_msync               # branch to system call
669
670         .globl  compat_sys_readv_wrapper
671 compat_sys_readv_wrapper:
672         lgfr    %r2,%r2                 # int
673         llgtr   %r3,%r3                 # const struct compat_iovec *
674         llgfr   %r4,%r4                 # unsigned long
675         jg      compat_sys_readv        # branch to system call
676
677         .globl  compat_sys_writev_wrapper
678 compat_sys_writev_wrapper:
679         lgfr    %r2,%r2                 # int
680         llgtr   %r3,%r3                 # const struct compat_iovec *
681         llgfr   %r4,%r4                 # unsigned long
682         jg      compat_sys_writev       # branch to system call
683
684         .globl  sys32_getsid_wrapper 
685 sys32_getsid_wrapper:
686         lgfr    %r2,%r2                 # pid_t
687         jg      sys_getsid              # branch to system call
688
689         .globl  sys32_fdatasync_wrapper 
690 sys32_fdatasync_wrapper:
691         llgfr   %r2,%r2                 # unsigned int
692         jg      sys_fdatasync           # branch to system call
693
694 #sys32_sysctl_wrapper                   # tbd 
695
696         .globl  sys32_mlock_wrapper 
697 sys32_mlock_wrapper:
698         llgfr   %r2,%r2                 # unsigned long
699         llgfr   %r3,%r3                 # size_t
700         jg      sys_mlock               # branch to system call
701
702         .globl  sys32_munlock_wrapper 
703 sys32_munlock_wrapper:
704         llgfr   %r2,%r2                 # unsigned long
705         llgfr   %r3,%r3                 # size_t
706         jg      sys_munlock             # branch to system call
707
708         .globl  sys32_mlockall_wrapper 
709 sys32_mlockall_wrapper:
710         lgfr    %r2,%r2                 # int
711         jg      sys_mlockall            # branch to system call
712
713 #sys32_munlockall_wrapper               # void 
714
715         .globl  sys32_sched_setparam_wrapper 
716 sys32_sched_setparam_wrapper:
717         lgfr    %r2,%r2                 # pid_t
718         llgtr   %r3,%r3                 # struct sched_param *
719         jg      sys_sched_setparam      # branch to system call
720
721         .globl  sys32_sched_getparam_wrapper 
722 sys32_sched_getparam_wrapper:
723         lgfr    %r2,%r2                 # pid_t
724         llgtr   %r3,%r3                 # struct sched_param *
725         jg      sys_sched_getparam      # branch to system call
726
727         .globl  sys32_sched_setscheduler_wrapper 
728 sys32_sched_setscheduler_wrapper:
729         lgfr    %r2,%r2                 # pid_t
730         lgfr    %r3,%r3                 # int
731         llgtr   %r4,%r4                 # struct sched_param *
732         jg      sys_sched_setscheduler  # branch to system call
733
734         .globl  sys32_sched_getscheduler_wrapper 
735 sys32_sched_getscheduler_wrapper:
736         lgfr    %r2,%r2                 # pid_t
737         jg      sys_sched_getscheduler  # branch to system call
738
739 #sys32_sched_yield_wrapper              # void 
740
741         .globl  sys32_sched_get_priority_max_wrapper 
742 sys32_sched_get_priority_max_wrapper:
743         lgfr    %r2,%r2                 # int
744         jg      sys_sched_get_priority_max      # branch to system call
745
746         .globl  sys32_sched_get_priority_min_wrapper 
747 sys32_sched_get_priority_min_wrapper:
748         lgfr    %r2,%r2                 # int
749         jg      sys_sched_get_priority_min      # branch to system call
750
751         .globl  sys32_sched_rr_get_interval_wrapper 
752 sys32_sched_rr_get_interval_wrapper:
753         lgfr    %r2,%r2                 # pid_t
754         llgtr   %r3,%r3                 # struct compat_timespec *
755         jg      sys32_sched_rr_get_interval     # branch to system call
756
757         .globl  compat_sys_nanosleep_wrapper 
758 compat_sys_nanosleep_wrapper:
759         llgtr   %r2,%r2                 # struct compat_timespec *
760         llgtr   %r3,%r3                 # struct compat_timespec *
761         jg      compat_sys_nanosleep            # branch to system call
762
763         .globl  sys32_mremap_wrapper 
764 sys32_mremap_wrapper:
765         llgfr   %r2,%r2                 # unsigned long
766         llgfr   %r3,%r3                 # unsigned long
767         llgfr   %r4,%r4                 # unsigned long
768         llgfr   %r5,%r5                 # unsigned long
769         llgfr   %r6,%r6                 # unsigned long
770         jg      sys_mremap              # branch to system call
771
772         .globl  sys32_setresuid16_wrapper 
773 sys32_setresuid16_wrapper:
774         llgfr   %r2,%r2                 # __kernel_old_uid_emu31_t 
775         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t 
776         llgfr   %r4,%r4                 # __kernel_old_uid_emu31_t 
777         jg      sys32_setresuid16       # branch to system call
778
779         .globl  sys32_getresuid16_wrapper 
780 sys32_getresuid16_wrapper:
781         llgtr   %r2,%r2                 # __kernel_old_uid_emu31_t *
782         llgtr   %r3,%r3                 # __kernel_old_uid_emu31_t *
783         llgtr   %r4,%r4                 # __kernel_old_uid_emu31_t *
784         jg      sys32_getresuid16       # branch to system call
785
786         .globl  sys32_poll_wrapper 
787 sys32_poll_wrapper:
788         llgtr   %r2,%r2                 # struct pollfd * 
789         llgfr   %r3,%r3                 # unsigned int 
790         lgfr    %r4,%r4                 # long 
791         jg      sys_poll                # branch to system call
792
793         .globl  compat_sys_nfsservctl_wrapper
794 compat_sys_nfsservctl_wrapper:
795         lgfr    %r2,%r2                 # int 
796         llgtr   %r3,%r3                 # struct compat_nfsctl_arg*
797         llgtr   %r4,%r4                 # union compat_nfsctl_res*
798         jg      compat_sys_nfsservctl   # branch to system call
799
800         .globl  sys32_setresgid16_wrapper 
801 sys32_setresgid16_wrapper:
802         llgfr   %r2,%r2                 # __kernel_old_gid_emu31_t 
803         llgfr   %r3,%r3                 # __kernel_old_gid_emu31_t 
804         llgfr   %r4,%r4                 # __kernel_old_gid_emu31_t 
805         jg      sys32_setresgid16       # branch to system call
806
807         .globl  sys32_getresgid16_wrapper 
808 sys32_getresgid16_wrapper:
809         llgtr   %r2,%r2                 # __kernel_old_gid_emu31_t *
810         llgtr   %r3,%r3                 # __kernel_old_gid_emu31_t *
811         llgtr   %r4,%r4                 # __kernel_old_gid_emu31_t *
812         jg      sys32_getresgid16       # branch to system call
813
814         .globl  sys32_prctl_wrapper 
815 sys32_prctl_wrapper:
816         lgfr    %r2,%r2                 # int
817         llgfr   %r3,%r3                 # unsigned long
818         llgfr   %r4,%r4                 # unsigned long
819         llgfr   %r5,%r5                 # unsigned long
820         llgfr   %r6,%r6                 # unsigned long
821         jg      sys_prctl               # branch to system call
822
823 #sys32_rt_sigreturn_wrapper             # done in rt_sigreturn_glue 
824
825         .globl  sys32_rt_sigaction_wrapper 
826 sys32_rt_sigaction_wrapper:
827         lgfr    %r2,%r2                 # int
828         llgtr   %r3,%r3                 # const struct sigaction_emu31 *
829         llgtr   %r4,%r4                 # const struct sigaction_emu31 *
830         llgfr   %r5,%r5                 # size_t
831         jg      sys32_rt_sigaction      # branch to system call
832
833         .globl  sys32_rt_sigprocmask_wrapper 
834 sys32_rt_sigprocmask_wrapper:
835         lgfr    %r2,%r2                 # int
836         llgtr   %r3,%r3                 # old_sigset_emu31 *
837         llgtr   %r4,%r4                 # old_sigset_emu31 *
838         llgfr   %r5,%r5                 # size_t
839         jg      sys32_rt_sigprocmask    # branch to system call
840
841         .globl  sys32_rt_sigpending_wrapper 
842 sys32_rt_sigpending_wrapper:
843         llgtr   %r2,%r2                 # sigset_emu31 *
844         llgfr   %r3,%r3                 # size_t
845         jg      sys32_rt_sigpending     # branch to system call
846
847         .globl  compat_sys_rt_sigtimedwait_wrapper
848 compat_sys_rt_sigtimedwait_wrapper:
849         llgtr   %r2,%r2                 # const sigset_emu31_t *
850         llgtr   %r3,%r3                 # siginfo_emu31_t *
851         llgtr   %r4,%r4                 # const struct compat_timespec *
852         llgfr   %r5,%r5                 # size_t
853         jg      compat_sys_rt_sigtimedwait      # branch to system call
854
855         .globl  sys32_rt_sigqueueinfo_wrapper 
856 sys32_rt_sigqueueinfo_wrapper:
857         lgfr    %r2,%r2                 # int
858         lgfr    %r3,%r3                 # int
859         llgtr   %r4,%r4                 # siginfo_emu31_t *
860         jg      sys32_rt_sigqueueinfo   # branch to system call
861
862         .globl compat_sys_rt_sigsuspend_wrapper
863 compat_sys_rt_sigsuspend_wrapper:
864         llgtr   %r2,%r2                 # compat_sigset_t *
865         llgfr   %r3,%r3                 # compat_size_t
866         jg      compat_sys_rt_sigsuspend
867
868         .globl  sys32_pread64_wrapper 
869 sys32_pread64_wrapper:
870         llgfr   %r2,%r2                 # unsigned int
871         llgtr   %r3,%r3                 # char *
872         llgfr   %r4,%r4                 # size_t
873         llgfr   %r5,%r5                 # u32
874         llgfr   %r6,%r6                 # u32
875         jg      sys32_pread64           # branch to system call
876
877         .globl  sys32_pwrite64_wrapper 
878 sys32_pwrite64_wrapper:
879         llgfr   %r2,%r2                 # unsigned int
880         llgtr   %r3,%r3                 # const char *
881         llgfr   %r4,%r4                 # size_t
882         llgfr   %r5,%r5                 # u32
883         llgfr   %r6,%r6                 # u32
884         jg      sys32_pwrite64          # branch to system call
885
886         .globl  sys32_chown16_wrapper 
887 sys32_chown16_wrapper:
888         llgtr   %r2,%r2                 # const char *
889         llgfr   %r3,%r3                 # __kernel_old_uid_emu31_t 
890         llgfr   %r4,%r4                 # __kernel_old_gid_emu31_t 
891         jg      sys32_chown16           # branch to system call
892
893         .globl  sys32_getcwd_wrapper 
894 sys32_getcwd_wrapper:
895         llgtr   %r2,%r2                 # char *
896         llgfr   %r3,%r3                 # unsigned long
897         jg      sys_getcwd              # branch to system call
898
899         .globl  sys32_capget_wrapper 
900 sys32_capget_wrapper:
901         llgtr   %r2,%r2                 # cap_user_header_t
902         llgtr   %r3,%r3                 # cap_user_data_t
903         jg      sys_capget              # branch to system call
904
905         .globl  sys32_capset_wrapper 
906 sys32_capset_wrapper:
907         llgtr   %r2,%r2                 # cap_user_header_t
908         llgtr   %r3,%r3                 # const cap_user_data_t
909         jg      sys_capset              # branch to system call
910
911         .globl sys32_sigaltstack_wrapper
912 sys32_sigaltstack_wrapper:
913         llgtr   %r2,%r2                 # const stack_emu31_t * 
914         llgtr   %r3,%r3                 # stack_emu31_t * 
915         jg      sys32_sigaltstack
916
917         .globl  sys32_sendfile_wrapper 
918 sys32_sendfile_wrapper:
919         lgfr    %r2,%r2                 # int
920         lgfr    %r3,%r3                 # int
921         llgtr   %r4,%r4                 # __kernel_off_emu31_t *
922         llgfr   %r5,%r5                 # size_t
923         jg      sys32_sendfile          # branch to system call
924
925 #sys32_vfork_wrapper                    # done in vfork_glue 
926
927         .globl  sys32_truncate64_wrapper 
928 sys32_truncate64_wrapper:
929         llgtr   %r2,%r2                 # const char *
930         llgfr   %r3,%r3                 # unsigned long
931         llgfr   %r4,%r4                 # unsigned long
932         jg      sys32_truncate64        # branch to system call
933
934         .globl  sys32_ftruncate64_wrapper 
935 sys32_ftruncate64_wrapper:
936         llgfr   %r2,%r2                 # unsigned int
937         llgfr   %r3,%r3                 # unsigned long
938         llgfr   %r4,%r4                 # unsigned long
939         jg      sys32_ftruncate64       # branch to system call
940
941         .globl sys32_lchown_wrapper     
942 sys32_lchown_wrapper:
943         llgtr   %r2,%r2                 # const char *
944         llgfr   %r3,%r3                 # uid_t
945         llgfr   %r4,%r4                 # gid_t
946         jg      sys_lchown              # branch to system call
947
948 #sys32_getuid_wrapper                   # void                   
949 #sys32_getgid_wrapper                   # void 
950 #sys32_geteuid_wrapper                  # void 
951 #sys32_getegid_wrapper                  # void 
952
953         .globl sys32_setreuid_wrapper
954 sys32_setreuid_wrapper:
955         llgfr   %r2,%r2                 # uid_t
956         llgfr   %r3,%r3                 # uid_t
957         jg      sys_setreuid            # branch to system call
958
959         .globl sys32_setregid_wrapper
960 sys32_setregid_wrapper:
961         llgfr   %r2,%r2                 # gid_t
962         llgfr   %r3,%r3                 # gid_t
963         jg      sys_setregid            # branch to system call
964
965         .globl  sys32_getgroups_wrapper 
966 sys32_getgroups_wrapper:
967         lgfr    %r2,%r2                 # int
968         llgtr   %r3,%r3                 # gid_t *
969         jg      sys_getgroups           # branch to system call
970
971         .globl  sys32_setgroups_wrapper 
972 sys32_setgroups_wrapper:
973         lgfr    %r2,%r2                 # int
974         llgtr   %r3,%r3                 # gid_t *
975         jg      sys_setgroups           # branch to system call
976
977         .globl sys32_fchown_wrapper     
978 sys32_fchown_wrapper:
979         llgfr   %r2,%r2                 # unsigned int
980         llgfr   %r3,%r3                 # uid_t
981         llgfr   %r4,%r4                 # gid_t
982         jg      sys_fchown              # branch to system call
983
984         .globl sys32_setresuid_wrapper  
985 sys32_setresuid_wrapper:
986         llgfr   %r2,%r2                 # uid_t
987         llgfr   %r3,%r3                 # uid_t
988         llgfr   %r4,%r4                 # uid_t
989         jg      sys_setresuid           # branch to system call
990
991         .globl sys32_getresuid_wrapper  
992 sys32_getresuid_wrapper:
993         llgtr   %r2,%r2                 # uid_t *
994         llgtr   %r3,%r3                 # uid_t *
995         llgtr   %r4,%r4                 # uid_t *
996         jg      sys_getresuid           # branch to system call
997
998         .globl sys32_setresgid_wrapper  
999 sys32_setresgid_wrapper:
1000         llgfr   %r2,%r2                 # gid_t
1001         llgfr   %r3,%r3                 # gid_t
1002         llgfr   %r4,%r4                 # gid_t
1003         jg      sys_setresgid           # branch to system call
1004
1005         .globl sys32_getresgid_wrapper  
1006 sys32_getresgid_wrapper:
1007         llgtr   %r2,%r2                 # gid_t *
1008         llgtr   %r3,%r3                 # gid_t *
1009         llgtr   %r4,%r4                 # gid_t *
1010         jg      sys_getresgid           # branch to system call
1011
1012         .globl sys32_chown_wrapper      
1013 sys32_chown_wrapper:
1014         llgtr   %r2,%r2                 # const char *
1015         llgfr   %r3,%r3                 # uid_t
1016         llgfr   %r4,%r4                 # gid_t
1017         jg      sys_chown               # branch to system call
1018
1019         .globl sys32_setuid_wrapper     
1020 sys32_setuid_wrapper:
1021         llgfr   %r2,%r2                 # uid_t
1022         jg      sys_setuid              # branch to system call
1023
1024         .globl sys32_setgid_wrapper     
1025 sys32_setgid_wrapper:
1026         llgfr   %r2,%r2                 # gid_t
1027         jg      sys_setgid              # branch to system call
1028
1029         .globl sys32_setfsuid_wrapper   
1030 sys32_setfsuid_wrapper:
1031         llgfr   %r2,%r2                 # uid_t
1032         jg      sys_setfsuid            # branch to system call
1033
1034         .globl sys32_setfsgid_wrapper   
1035 sys32_setfsgid_wrapper:
1036         llgfr   %r2,%r2                 # gid_t
1037         jg      sys_setfsgid            # branch to system call
1038
1039         .globl  sys32_pivot_root_wrapper 
1040 sys32_pivot_root_wrapper:
1041         llgtr   %r2,%r2                 # const char *
1042         llgtr   %r3,%r3                 # const char *
1043         jg      sys_pivot_root          # branch to system call
1044
1045         .globl  sys32_mincore_wrapper 
1046 sys32_mincore_wrapper:
1047         llgfr   %r2,%r2                 # unsigned long
1048         llgfr   %r3,%r3                 # size_t
1049         llgtr   %r4,%r4                 # unsigned char *
1050         jg      sys_mincore             # branch to system call
1051
1052         .globl  sys32_madvise_wrapper 
1053 sys32_madvise_wrapper:
1054         llgfr   %r2,%r2                 # unsigned long
1055         llgfr   %r3,%r3                 # size_t
1056         lgfr    %r4,%r4                 # int
1057         jg      sys_madvise             # branch to system call
1058
1059         .globl  sys32_getdents64_wrapper 
1060 sys32_getdents64_wrapper:
1061         llgfr   %r2,%r2                 # unsigned int
1062         llgtr   %r3,%r3                 # void *
1063         llgfr   %r4,%r4                 # unsigned int
1064         jg      sys_getdents64          # branch to system call
1065
1066         .globl  compat_sys_fcntl64_wrapper 
1067 compat_sys_fcntl64_wrapper:
1068         llgfr   %r2,%r2                 # unsigned int
1069         llgfr   %r3,%r3                 # unsigned int 
1070         llgfr   %r4,%r4                 # unsigned long
1071         jg      compat_sys_fcntl64      # branch to system call
1072
1073         .globl  sys32_stat64_wrapper
1074 sys32_stat64_wrapper:
1075         llgtr   %r2,%r2                 # char *
1076         llgtr   %r3,%r3                 # struct stat64 *
1077         jg      sys32_stat64            # branch to system call
1078
1079         .globl  sys32_lstat64_wrapper
1080 sys32_lstat64_wrapper:
1081         llgtr   %r2,%r2                 # char *
1082         llgtr   %r3,%r3                 # struct stat64 *
1083         jg      sys32_lstat64           # branch to system call
1084
1085         .globl  sys32_stime_wrapper
1086 sys32_stime_wrapper:
1087         llgtr   %r2,%r2                 # long *
1088         jg      compat_sys_stime        # branch to system call
1089
1090         .globl  sys32_sysctl_wrapper
1091 sys32_sysctl_wrapper:
1092         llgtr   %r2,%r2                 # struct __sysctl_args32 *
1093         jg      sys32_sysctl
1094
1095         .globl  sys32_fstat64_wrapper
1096 sys32_fstat64_wrapper:
1097         llgfr   %r2,%r2                 # unsigned long
1098         llgtr   %r3,%r3                 # struct stat64 *
1099         jg      sys32_fstat64           # branch to system call
1100
1101         .globl  compat_sys_futex_wrapper 
1102 compat_sys_futex_wrapper:
1103         llgtr   %r2,%r2                 # u32 *
1104         lgfr    %r3,%r3                 # int
1105         lgfr    %r4,%r4                 # int
1106         llgtr   %r5,%r5                 # struct compat_timespec *
1107         llgtr   %r6,%r6                 # u32 *
1108         lgf     %r0,164(%r15)           # int
1109         stg     %r0,160(%r15)
1110         jg      compat_sys_futex        # branch to system call
1111
1112         .globl  sys32_setxattr_wrapper
1113 sys32_setxattr_wrapper:
1114         llgtr   %r2,%r2                 # char *
1115         llgtr   %r3,%r3                 # char *
1116         llgtr   %r4,%r4                 # void *
1117         llgfr   %r5,%r5                 # size_t
1118         lgfr    %r6,%r6                 # int
1119         jg      sys_setxattr
1120
1121         .globl  sys32_lsetxattr_wrapper
1122 sys32_lsetxattr_wrapper:
1123         llgtr   %r2,%r2                 # char *
1124         llgtr   %r3,%r3                 # char *
1125         llgtr   %r4,%r4                 # void *
1126         llgfr   %r5,%r5                 # size_t
1127         lgfr    %r6,%r6                 # int
1128         jg      sys_lsetxattr
1129
1130         .globl  sys32_fsetxattr_wrapper
1131 sys32_fsetxattr_wrapper:
1132         lgfr    %r2,%r2                 # int
1133         llgtr   %r3,%r3                 # char *
1134         llgtr   %r4,%r4                 # void *
1135         llgfr   %r5,%r5                 # size_t
1136         lgfr    %r6,%r6                 # int
1137         jg      sys_fsetxattr
1138
1139         .globl  sys32_getxattr_wrapper
1140 sys32_getxattr_wrapper:
1141         llgtr   %r2,%r2                 # char *
1142         llgtr   %r3,%r3                 # char *
1143         llgtr   %r4,%r4                 # void *
1144         llgfr   %r5,%r5                 # size_t
1145         jg      sys_getxattr
1146
1147         .globl  sys32_lgetxattr_wrapper
1148 sys32_lgetxattr_wrapper:
1149         llgtr   %r2,%r2                 # char *
1150         llgtr   %r3,%r3                 # char *
1151         llgtr   %r4,%r4                 # void *
1152         llgfr   %r5,%r5                 # size_t
1153         jg      sys_lgetxattr
1154
1155         .globl  sys32_fgetxattr_wrapper
1156 sys32_fgetxattr_wrapper:
1157         lgfr    %r2,%r2                 # int
1158         llgtr   %r3,%r3                 # char *
1159         llgtr   %r4,%r4                 # void *
1160         llgfr   %r5,%r5                 # size_t
1161         jg      sys_fgetxattr
1162
1163         .globl  sys32_listxattr_wrapper
1164 sys32_listxattr_wrapper:
1165         llgtr   %r2,%r2                 # char *
1166         llgtr   %r3,%r3                 # char *
1167         llgfr   %r4,%r4                 # size_t
1168         jg      sys_listxattr
1169
1170         .globl  sys32_llistxattr_wrapper
1171 sys32_llistxattr_wrapper:
1172         llgtr   %r2,%r2                 # char *
1173         llgtr   %r3,%r3                 # char *
1174         llgfr   %r4,%r4                 # size_t
1175         jg      sys_llistxattr
1176
1177         .globl  sys32_flistxattr_wrapper
1178 sys32_flistxattr_wrapper:
1179         lgfr    %r2,%r2                 # int
1180         llgtr   %r3,%r3                 # char *
1181         llgfr   %r4,%r4                 # size_t
1182         jg      sys_flistxattr
1183
1184         .globl  sys32_removexattr_wrapper
1185 sys32_removexattr_wrapper:
1186         llgtr   %r2,%r2                 # char *
1187         llgtr   %r3,%r3                 # char *
1188         jg      sys_removexattr
1189
1190         .globl  sys32_lremovexattr_wrapper
1191 sys32_lremovexattr_wrapper:
1192         llgtr   %r2,%r2                 # char *
1193         llgtr   %r3,%r3                 # char *
1194         jg      sys_lremovexattr
1195
1196         .globl  sys32_fremovexattr_wrapper
1197 sys32_fremovexattr_wrapper:
1198         lgfr    %r2,%r2                 # int
1199         llgtr   %r3,%r3                 # char *
1200         jg      sys_fremovexattr
1201
1202         .globl  sys32_sched_setaffinity_wrapper
1203 sys32_sched_setaffinity_wrapper:
1204         lgfr    %r2,%r2                 # int
1205         llgfr   %r3,%r3                 # unsigned int
1206         llgtr   %r4,%r4                 # unsigned long *
1207         jg      compat_sys_sched_setaffinity
1208
1209         .globl  sys32_sched_getaffinity_wrapper
1210 sys32_sched_getaffinity_wrapper:
1211         lgfr    %r2,%r2                 # int
1212         llgfr   %r3,%r3                 # unsigned int
1213         llgtr   %r4,%r4                 # unsigned long *
1214         jg      compat_sys_sched_getaffinity
1215
1216         .globl  sys32_exit_group_wrapper
1217 sys32_exit_group_wrapper:
1218         lgfr    %r2,%r2                 # int
1219         jg      sys_exit_group          # branch to system call
1220
1221         .globl  sys32_set_tid_address_wrapper
1222 sys32_set_tid_address_wrapper:
1223         llgtr   %r2,%r2                 # int *
1224         jg      sys_set_tid_address     # branch to system call
1225
1226         .globl  sys_epoll_create_wrapper
1227 sys_epoll_create_wrapper:
1228         lgfr    %r2,%r2                 # int
1229         jg      sys_epoll_create        # branch to system call
1230
1231         .globl  sys_epoll_ctl_wrapper
1232 sys_epoll_ctl_wrapper:
1233         lgfr    %r2,%r2                 # int
1234         lgfr    %r3,%r3                 # int
1235         lgfr    %r4,%r4                 # int
1236         llgtr   %r5,%r5                 # struct epoll_event *
1237         jg      sys_epoll_ctl           # branch to system call
1238
1239         .globl  sys_epoll_wait_wrapper
1240 sys_epoll_wait_wrapper:
1241         lgfr    %r2,%r2                 # int
1242         llgtr   %r3,%r3                 # struct epoll_event *
1243         lgfr    %r4,%r4                 # int
1244         lgfr    %r5,%r5                 # int
1245         jg      sys_epoll_wait          # branch to system call
1246
1247         .globl  sys32_lookup_dcookie_wrapper
1248 sys32_lookup_dcookie_wrapper:
1249         sllg    %r2,%r2,32              # get high word of 64bit dcookie
1250         or      %r2,%r3                 # get low word of 64bit dcookie
1251         llgtr   %r3,%r4                 # char *
1252         llgfr   %r4,%r5                 # size_t
1253         jg      sys_lookup_dcookie
1254
1255         .globl  sys32_fadvise64_wrapper
1256 sys32_fadvise64_wrapper:
1257         lgfr    %r2,%r2                 # int
1258         sllg    %r3,%r3,32              # get high word of 64bit loff_t
1259         or      %r3,%r4                 # get low word of 64bit loff_t
1260         llgfr   %r4,%r5                 # size_t (unsigned long)
1261         lgfr    %r5,%r6                 # int
1262         jg      sys32_fadvise64
1263
1264         .globl  sys32_fadvise64_64_wrapper
1265 sys32_fadvise64_64_wrapper:
1266         llgtr   %r2,%r2                 # struct fadvise64_64_args *
1267         jg      sys32_fadvise64_64
1268
1269         .globl  sys32_clock_settime_wrapper
1270 sys32_clock_settime_wrapper:
1271         lgfr    %r2,%r2                 # clockid_t (int)
1272         llgtr   %r3,%r3                 # struct compat_timespec *
1273         jg      compat_sys_clock_settime
1274
1275         .globl  sys32_clock_gettime_wrapper
1276 sys32_clock_gettime_wrapper:
1277         lgfr    %r2,%r2                 # clockid_t (int)
1278         llgtr   %r3,%r3                 # struct compat_timespec *
1279         jg      compat_sys_clock_gettime
1280
1281         .globl  sys32_clock_getres_wrapper
1282 sys32_clock_getres_wrapper:
1283         lgfr    %r2,%r2                 # clockid_t (int)
1284         llgtr   %r3,%r3                 # struct compat_timespec *
1285         jg      compat_sys_clock_getres
1286
1287         .globl  sys32_clock_nanosleep_wrapper
1288 sys32_clock_nanosleep_wrapper:
1289         lgfr    %r2,%r2                 # clockid_t (int)
1290         lgfr    %r3,%r3                 # int
1291         llgtr   %r4,%r4                 # struct compat_timespec *
1292         llgtr   %r5,%r5                 # struct compat_timespec *
1293         jg      compat_sys_clock_nanosleep
1294
1295         .globl  sys32_timer_create_wrapper
1296 sys32_timer_create_wrapper:
1297         lgfr    %r2,%r2                 # timer_t (int)
1298         llgtr   %r3,%r3                 # struct compat_sigevent *
1299         llgtr   %r4,%r4                 # timer_t *
1300         jg      compat_sys_timer_create
1301
1302         .globl  sys32_timer_settime_wrapper
1303 sys32_timer_settime_wrapper:
1304         lgfr    %r2,%r2                 # timer_t (int)
1305         lgfr    %r3,%r3                 # int
1306         llgtr   %r4,%r4                 # struct compat_itimerspec *
1307         llgtr   %r5,%r5                 # struct compat_itimerspec *
1308         jg      compat_sys_timer_settime
1309
1310         .globl  sys32_timer_gettime_wrapper
1311 sys32_timer_gettime_wrapper:
1312         lgfr    %r2,%r2                 # timer_t (int)
1313         llgtr   %r3,%r3                 # struct compat_itimerspec *
1314         jg      compat_sys_timer_gettime
1315
1316         .globl  sys32_timer_getoverrun_wrapper
1317 sys32_timer_getoverrun_wrapper:
1318         lgfr    %r2,%r2                 # timer_t (int)
1319         jg      sys_timer_getoverrun
1320
1321         .globl  sys32_timer_delete_wrapper
1322 sys32_timer_delete_wrapper:
1323         lgfr    %r2,%r2                 # timer_t (int)
1324         jg      sys_timer_delete
1325
1326         .globl  sys32_io_setup_wrapper
1327 sys32_io_setup_wrapper:
1328         llgfr   %r2,%r2                 # unsigned int
1329         llgtr   %r3,%r3                 # u32 *
1330         jg      compat_sys_io_setup
1331
1332         .globl  sys32_io_destroy_wrapper
1333 sys32_io_destroy_wrapper:
1334         llgfr   %r2,%r2                 # (aio_context_t) u32
1335         jg      sys_io_destroy
1336
1337         .globl  sys32_io_getevents_wrapper
1338 sys32_io_getevents_wrapper:
1339         llgfr   %r2,%r2                 # (aio_context_t) u32
1340         lgfr    %r3,%r3                 # long
1341         lgfr    %r4,%r4                 # long
1342         llgtr   %r5,%r5                 # struct io_event *
1343         llgtr   %r6,%r6                 # struct compat_timespec *
1344         jg      compat_sys_io_getevents
1345
1346         .globl  sys32_io_submit_wrapper
1347 sys32_io_submit_wrapper:
1348         llgfr   %r2,%r2                 # (aio_context_t) u32
1349         lgfr    %r3,%r3                 # long
1350         llgtr   %r4,%r4                 # struct iocb **
1351         jg      compat_sys_io_submit
1352
1353         .globl  sys32_io_cancel_wrapper
1354 sys32_io_cancel_wrapper:
1355         llgfr   %r2,%r2                 # (aio_context_t) u32
1356         llgtr   %r3,%r3                 # struct iocb *
1357         llgtr   %r4,%r4                 # struct io_event *
1358         jg      sys_io_cancel
1359
1360         .globl compat_sys_statfs64_wrapper
1361 compat_sys_statfs64_wrapper:
1362         llgtr   %r2,%r2                 # const char *
1363         llgfr   %r3,%r3                 # compat_size_t
1364         llgtr   %r4,%r4                 # struct compat_statfs64 *
1365         jg      compat_sys_statfs64
1366
1367         .globl compat_sys_fstatfs64_wrapper
1368 compat_sys_fstatfs64_wrapper:
1369         llgfr   %r2,%r2                 # unsigned int fd
1370         llgfr   %r3,%r3                 # compat_size_t
1371         llgtr   %r4,%r4                 # struct compat_statfs64 *
1372         jg      compat_sys_fstatfs64
1373
1374         .globl  compat_sys_mq_open_wrapper
1375 compat_sys_mq_open_wrapper:
1376         llgtr   %r2,%r2                 # const char *
1377         lgfr    %r3,%r3                 # int
1378         llgfr   %r4,%r4                 # mode_t
1379         llgtr   %r5,%r5                 # struct compat_mq_attr *
1380         jg      compat_sys_mq_open
1381
1382         .globl  sys32_mq_unlink_wrapper
1383 sys32_mq_unlink_wrapper:
1384         llgtr   %r2,%r2                 # const char *
1385         jg      sys_mq_unlink
1386
1387         .globl  compat_sys_mq_timedsend_wrapper
1388 compat_sys_mq_timedsend_wrapper:
1389         lgfr    %r2,%r2                 # mqd_t
1390         llgtr   %r3,%r3                 # const char *
1391         llgfr   %r4,%r4                 # size_t
1392         llgfr   %r5,%r5                 # unsigned int
1393         llgtr   %r6,%r6                 # const struct compat_timespec *
1394         jg      compat_sys_mq_timedsend
1395
1396         .globl  compat_sys_mq_timedreceive_wrapper
1397 compat_sys_mq_timedreceive_wrapper:
1398         lgfr    %r2,%r2                 # mqd_t
1399         llgtr   %r3,%r3                 # char *
1400         llgfr   %r4,%r4                 # size_t
1401         llgtr   %r5,%r5                 # unsigned int *
1402         llgtr   %r6,%r6                 # const struct compat_timespec *
1403         jg      compat_sys_mq_timedreceive
1404
1405         .globl  compat_sys_mq_notify_wrapper
1406 compat_sys_mq_notify_wrapper:
1407         lgfr    %r2,%r2                 # mqd_t
1408         llgtr   %r3,%r3                 # struct compat_sigevent *
1409         jg      compat_sys_mq_notify
1410
1411         .globl  compat_sys_mq_getsetattr_wrapper
1412 compat_sys_mq_getsetattr_wrapper:
1413         lgfr    %r2,%r2                 # mqd_t
1414         llgtr   %r3,%r3                 # struct compat_mq_attr *
1415         llgtr   %r4,%r4                 # struct compat_mq_attr *
1416         jg      compat_sys_mq_getsetattr
1417
1418         .globl  compat_sys_add_key_wrapper
1419 compat_sys_add_key_wrapper:
1420         llgtr   %r2,%r2                 # const char *
1421         llgtr   %r3,%r3                 # const char *
1422         llgtr   %r4,%r4                 # const void *
1423         llgfr   %r5,%r5                 # size_t
1424         llgfr   %r6,%r6                 # (key_serial_t) u32
1425         jg      sys_add_key
1426
1427         .globl  compat_sys_request_key_wrapper
1428 compat_sys_request_key_wrapper:
1429         llgtr   %r2,%r2                 # const char *
1430         llgtr   %r3,%r3                 # const char *
1431         llgtr   %r4,%r4                 # const void *
1432         llgfr   %r5,%r5                 # (key_serial_t) u32
1433         jg      sys_request_key
1434
1435         .globl  sys32_remap_file_pages_wrapper
1436 sys32_remap_file_pages_wrapper:
1437         llgfr   %r2,%r2                 # unsigned long
1438         llgfr   %r3,%r3                 # unsigned long
1439         llgfr   %r4,%r4                 # unsigned long
1440         llgfr   %r5,%r5                 # unsigned long
1441         llgfr   %r6,%r6                 # unsigned long
1442         jg      sys_remap_file_pages
1443
1444         .globl  compat_sys_waitid_wrapper
1445 compat_sys_waitid_wrapper:
1446         lgfr    %r2,%r2                 # int
1447         lgfr    %r3,%r3                 # pid_t
1448         llgtr   %r4,%r4                 # siginfo_emu31_t *
1449         lgfr    %r5,%r5                 # int
1450         llgtr   %r6,%r6                 # struct rusage_emu31 *
1451         jg      compat_sys_waitid
1452
1453         .globl  compat_sys_kexec_load_wrapper
1454 compat_sys_kexec_load_wrapper:
1455         llgfr   %r2,%r2                 # unsigned long
1456         llgfr   %r3,%r3                 # unsigned long
1457         llgtr   %r4,%r4                 # struct kexec_segment *
1458         llgfr   %r5,%r5                 # unsigned long
1459         jg      compat_sys_kexec_load
1460
1461         .globl  sys_ioprio_set_wrapper
1462 sys_ioprio_set_wrapper:
1463         lgfr    %r2,%r2                 # int
1464         lgfr    %r3,%r3                 # int
1465         lgfr    %r4,%r4                 # int
1466         jg      sys_ioprio_set
1467
1468         .globl  sys_ioprio_get_wrapper
1469 sys_ioprio_get_wrapper:
1470         lgfr    %r2,%r2                 # int
1471         lgfr    %r3,%r3                 # int
1472         jg      sys_ioprio_get
1473
1474         .globl  sys_inotify_add_watch_wrapper
1475 sys_inotify_add_watch_wrapper:
1476         lgfr    %r2,%r2                 # int
1477         llgtr   %r3,%r3                 # const char *
1478         llgfr   %r4,%r4                 # u32
1479         jg      sys_inotify_add_watch
1480
1481         .globl  sys_inotify_rm_watch_wrapper
1482 sys_inotify_rm_watch_wrapper:
1483         lgfr    %r2,%r2                 # int
1484         llgfr   %r3,%r3                 # u32
1485         jg      sys_inotify_rm_watch
1486
1487         .globl compat_sys_openat_wrapper
1488 compat_sys_openat_wrapper:
1489         llgfr   %r2,%r2                 # unsigned int
1490         llgtr   %r3,%r3                 # const char *
1491         lgfr    %r4,%r4                 # int
1492         lgfr    %r5,%r5                 # int
1493         jg      compat_sys_openat
1494
1495         .globl sys_mkdirat_wrapper
1496 sys_mkdirat_wrapper:
1497         lgfr    %r2,%r2                 # int
1498         llgtr   %r3,%r3                 # const char *
1499         lgfr    %r4,%r4                 # int
1500         jg      sys_mkdirat
1501
1502         .globl sys_mknodat_wrapper
1503 sys_mknodat_wrapper:
1504         lgfr    %r2,%r2                 # int
1505         llgtr   %r3,%r3                 # const char *
1506         lgfr    %r4,%r4                 # int
1507         llgfr   %r5,%r5                 # unsigned int
1508         jg      sys_mknodat
1509
1510         .globl sys_fchownat_wrapper
1511 sys_fchownat_wrapper:
1512         lgfr    %r2,%r2                 # int
1513         llgtr   %r3,%r3                 # const char *
1514         llgfr   %r4,%r4                 # uid_t
1515         llgfr   %r5,%r5                 # gid_t
1516         lgfr    %r6,%r6                 # int
1517         jg      sys_fchownat
1518
1519         .globl compat_sys_futimesat_wrapper
1520 compat_sys_futimesat_wrapper:
1521         llgfr   %r2,%r2                 # unsigned int
1522         llgtr   %r3,%r3                 # char *
1523         llgtr   %r4,%r4                 # struct timeval *
1524         jg      compat_sys_futimesat
1525
1526         .globl sys32_fstatat64_wrapper
1527 sys32_fstatat64_wrapper:
1528         llgfr   %r2,%r2                 # unsigned int
1529         llgtr   %r3,%r3                 # char *
1530         llgtr   %r4,%r4                 # struct stat64 *
1531         lgfr    %r5,%r5                 # int
1532         jg      sys32_fstatat64
1533
1534         .globl sys_unlinkat_wrapper
1535 sys_unlinkat_wrapper:
1536         lgfr    %r2,%r2                 # int
1537         llgtr   %r3,%r3                 # const char *
1538         lgfr    %r4,%r4                 # int
1539         jg      sys_unlinkat
1540
1541         .globl sys_renameat_wrapper
1542 sys_renameat_wrapper:
1543         lgfr    %r2,%r2                 # int
1544         llgtr   %r3,%r3                 # const char *
1545         lgfr    %r4,%r4                 # int
1546         llgtr   %r5,%r5                 # const char *
1547         jg      sys_renameat
1548
1549         .globl sys_linkat_wrapper
1550 sys_linkat_wrapper:
1551         lgfr    %r2,%r2                 # int
1552         llgtr   %r3,%r3                 # const char *
1553         lgfr    %r4,%r4                 # int
1554         llgtr   %r5,%r5                 # const char *
1555         lgfr    %r6,%r6                 # int
1556         jg      sys_linkat
1557
1558         .globl sys_symlinkat_wrapper
1559 sys_symlinkat_wrapper:
1560         llgtr   %r2,%r2                 # const char *
1561         lgfr    %r3,%r3                 # int
1562         llgtr   %r4,%r4                 # const char *
1563         jg      sys_symlinkat
1564
1565         .globl sys_readlinkat_wrapper
1566 sys_readlinkat_wrapper:
1567         lgfr    %r2,%r2                 # int
1568         llgtr   %r3,%r3                 # const char *
1569         llgtr   %r4,%r4                 # char *
1570         lgfr    %r5,%r5                 # int
1571         jg      sys_readlinkat
1572
1573         .globl sys_fchmodat_wrapper
1574 sys_fchmodat_wrapper:
1575         lgfr    %r2,%r2                 # int
1576         llgtr   %r3,%r3                 # const char *
1577         llgfr   %r4,%r4                 # mode_t
1578         jg      sys_fchmodat
1579
1580         .globl sys_faccessat_wrapper
1581 sys_faccessat_wrapper:
1582         lgfr    %r2,%r2                 # int
1583         llgtr   %r3,%r3                 # const char *
1584         lgfr    %r4,%r4                 # int
1585         jg      sys_faccessat
1586
1587         .globl compat_sys_pselect6_wrapper
1588 compat_sys_pselect6_wrapper:
1589         lgfr    %r2,%r2                 # int
1590         llgtr   %r3,%r3                 # fd_set *
1591         llgtr   %r4,%r4                 # fd_set *
1592         llgtr   %r5,%r5                 # fd_set *
1593         llgtr   %r6,%r6                 # struct timespec *
1594         llgt    %r0,164(%r15)           # void *
1595         stg     %r0,160(%r15)
1596         jg      compat_sys_pselect6
1597
1598         .globl compat_sys_ppoll_wrapper
1599 compat_sys_ppoll_wrapper:
1600         llgtr   %r2,%r2                 # struct pollfd *
1601         llgfr   %r3,%r3                 # unsigned int
1602         llgtr   %r4,%r4                 # struct timespec *
1603         llgtr   %r5,%r5                 # const sigset_t *
1604         llgfr   %r6,%r6                 # size_t
1605         jg      compat_sys_ppoll
1606
1607         .globl sys_unshare_wrapper
1608 sys_unshare_wrapper:
1609         llgfr   %r2,%r2                 # unsigned long
1610         jg      sys_unshare