aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/kernel/compat_wrapper.S
blob: 707e37524d9f295a73a06857b983a7c37ccbb537 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
/*
*    wrapper for 31 bit compatible system calls.
*
*    Copyright IBM Corp. 2000, 2006
*    Author(s): Gerhard Tonn (ton@de.ibm.com),
*		Thomas Spatzier (tspat@de.ibm.com)
*/

#include <linux/linkage.h>

ENTRY(sys32_time_wrapper)
	llgtr	%r2,%r2			# int *
	jg	compat_sys_time		# branch to system call

#sys32_getpid_wrapper				# void

ENTRY(sys32_mount_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# char *
	llgfr	%r5,%r5			# unsigned long
	llgtr	%r6,%r6			# void *
	jg	compat_sys_mount	# branch to system call

ENTRY(sys32_ptrace_wrapper)
	lgfr	%r2,%r2			# long
	lgfr	%r3,%r3			# long
	llgtr	%r4,%r4			# long
	llgfr	%r5,%r5			# long
	jg	compat_sys_ptrace	# branch to system call

ENTRY(compat_sys_utime_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# struct compat_utimbuf *
	jg	compat_sys_utime	# branch to system call

ENTRY(compat_sys_times_wrapper)
	llgtr	%r2,%r2			# struct compat_tms *
	jg	compat_sys_times	# branch to system call

ENTRY(compat_sys_ioctl_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgfr	%r3,%r3			# unsigned int
	llgfr	%r4,%r4			# unsigned int
	jg	compat_sys_ioctl	# branch to system call

ENTRY(compat_sys_fcntl_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgfr	%r3,%r3			# unsigned int
	llgfr	%r4,%r4			# unsigned long
	jg	compat_sys_fcntl	# branch to system call

ENTRY(sys32_ustat_wrapper)
	llgfr	%r2,%r2			# dev_t
	llgtr	%r3,%r3			# struct ustat *
	jg	compat_sys_ustat

ENTRY(compat_sys_sigpending_wrapper)
	llgtr	%r2,%r2			# compat_old_sigset_t *
	jg	compat_sys_sigpending	# branch to system call

ENTRY(compat_sys_setrlimit_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# struct rlimit_emu31 *
	jg	compat_sys_setrlimit	# branch to system call

ENTRY(compat_sys_old_getrlimit_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# struct rlimit_emu31 *
	jg	compat_sys_old_getrlimit # branch to system call

ENTRY(compat_sys_getrlimit_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# struct rlimit_emu31 *
	jg	compat_sys_getrlimit	# branch to system call

ENTRY(compat_sys_gettimeofday_wrapper)
	llgtr	%r2,%r2			# struct timeval_emu31 *
	llgtr	%r3,%r3			# struct timezone *
	jg	compat_sys_gettimeofday	# branch to system call

ENTRY(compat_sys_settimeofday_wrapper)
	llgtr	%r2,%r2			# struct timeval_emu31 *
	llgtr	%r3,%r3			# struct timezone *
	jg	compat_sys_settimeofday	# branch to system call

ENTRY(old32_readdir_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# void *
	llgfr	%r4,%r4			# unsigned int
	jg	compat_sys_old_readdir	# branch to system call

ENTRY(compat_sys_statfs_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# struct compat_statfs *
	jg	compat_sys_statfs	# branch to system call

ENTRY(compat_sys_fstatfs_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# struct compat_statfs *
	jg	compat_sys_fstatfs	# branch to system call

ENTRY(compat_sys_socketcall_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# u32 *
	jg	compat_sys_socketcall	# branch to system call

ENTRY(compat_sys_newstat_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# struct stat_emu31 *
	jg	compat_sys_newstat	# branch to system call

ENTRY(compat_sys_newlstat_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# struct stat_emu31 *
	jg	compat_sys_newlstat	# branch to system call

ENTRY(compat_sys_newfstat_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# struct stat_emu31 *
	jg	compat_sys_newfstat	# branch to system call

ENTRY(compat_sys_sysinfo_wrapper)
	llgtr	%r2,%r2			# struct sysinfo_emu31 *
	jg	compat_sys_sysinfo	# branch to system call

ENTRY(compat_sys_adjtimex_wrapper)
	llgtr	%r2,%r2			# struct compat_timex *
	jg	compat_sys_adjtimex	# branch to system call

ENTRY(sys32_getdents_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# void *
	llgfr	%r4,%r4			# unsigned int
	jg	compat_sys_getdents	# branch to system call

ENTRY(compat_sys_select_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# compat_fd_set *
	llgtr	%r4,%r4			# compat_fd_set *
	llgtr	%r5,%r5			# compat_fd_set *
	llgtr	%r6,%r6			# struct compat_timeval *
	jg	compat_sys_select	# branch to system call

ENTRY(compat_sys_readv_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const struct compat_iovec *
	llgfr	%r4,%r4			# unsigned long
	jg	compat_sys_readv	# branch to system call

ENTRY(compat_sys_writev_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const struct compat_iovec *
	llgfr	%r4,%r4			# unsigned long
	jg	compat_sys_writev	# branch to system call

ENTRY(sys32_sched_getscheduler_wrapper)
	lgfr	%r2,%r2			# pid_t
	jg	sys_sched_getscheduler	# branch to system call

#sys32_sched_yield_wrapper		# void

ENTRY(sys32_sched_get_priority_max_wrapper)
	lgfr	%r2,%r2			# int
	jg	sys_sched_get_priority_max	# branch to system call

ENTRY(sys32_sched_get_priority_min_wrapper)
	lgfr	%r2,%r2			# int
	jg	sys_sched_get_priority_min	# branch to system call

ENTRY(compat_sys_nanosleep_wrapper)
	llgtr	%r2,%r2			# struct compat_timespec *
	llgtr	%r3,%r3			# struct compat_timespec *
	jg	compat_sys_nanosleep		# branch to system call

ENTRY(sys32_mremap_wrapper)
	llgfr	%r2,%r2			# unsigned long
	llgfr	%r3,%r3			# unsigned long
	llgfr	%r4,%r4			# unsigned long
	llgfr	%r5,%r5			# unsigned long
	llgfr	%r6,%r6			# unsigned long
	jg	sys_mremap		# branch to system call

ENTRY(sys32_poll_wrapper)
	llgtr	%r2,%r2			# struct pollfd *
	llgfr	%r3,%r3			# unsigned int
	lgfr	%r4,%r4			# int
	jg	sys_poll		# branch to system call

ENTRY(sys32_prctl_wrapper)
	lgfr	%r2,%r2			# int
	llgfr	%r3,%r3			# unsigned long
	llgfr	%r4,%r4			# unsigned long
	llgfr	%r5,%r5			# unsigned long
	llgfr	%r6,%r6			# unsigned long
	jg	sys_prctl		# branch to system call

#sys32_rt_sigreturn_wrapper		# done in rt_sigreturn_glue

ENTRY(sys32_getcwd_wrapper)
	llgtr	%r2,%r2			# char *
	llgfr	%r3,%r3			# unsigned long
	jg	sys_getcwd		# branch to system call

ENTRY(sys32_capget_wrapper)
	llgtr	%r2,%r2			# cap_user_header_t
	llgtr	%r3,%r3			# cap_user_data_t
	jg	sys_capget		# branch to system call

ENTRY(sys32_capset_wrapper)
	llgtr	%r2,%r2			# cap_user_header_t
	llgtr	%r3,%r3			# const cap_user_data_t
	jg	sys_capset		# branch to system call

#sys32_vfork_wrapper			# done in vfork_glue

ENTRY(sys32_lchown_wrapper)
	llgtr	%r2,%r2			# const char *
	llgfr	%r3,%r3			# uid_t
	llgfr	%r4,%r4			# gid_t
	jg	sys_lchown		# branch to system call

#sys32_getuid_wrapper			# void
#sys32_getgid_wrapper			# void
#sys32_geteuid_wrapper			# void
#sys32_getegid_wrapper			# void

ENTRY(sys32_setreuid_wrapper)
	llgfr	%r2,%r2			# uid_t
	llgfr	%r3,%r3			# uid_t
	jg	sys_setreuid		# branch to system call

ENTRY(sys32_setregid_wrapper)
	llgfr	%r2,%r2			# gid_t
	llgfr	%r3,%r3			# gid_t
	jg	sys_setregid		# branch to system call

ENTRY(sys32_getgroups_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# gid_t *
	jg	sys_getgroups		# branch to system call

ENTRY(sys32_setgroups_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# gid_t *
	jg	sys_setgroups		# branch to system call

ENTRY(sys32_fchown_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgfr	%r3,%r3			# uid_t
	llgfr	%r4,%r4			# gid_t
	jg	sys_fchown		# branch to system call

ENTRY(sys32_setresuid_wrapper)
	llgfr	%r2,%r2			# uid_t
	llgfr	%r3,%r3			# uid_t
	llgfr	%r4,%r4			# uid_t
	jg	sys_setresuid		# branch to system call

ENTRY(sys32_getresuid_wrapper)
	llgtr	%r2,%r2			# uid_t *
	llgtr	%r3,%r3			# uid_t *
	llgtr	%r4,%r4			# uid_t *
	jg	sys_getresuid		# branch to system call

ENTRY(sys32_setresgid_wrapper)
	llgfr	%r2,%r2			# gid_t
	llgfr	%r3,%r3			# gid_t
	llgfr	%r4,%r4			# gid_t
	jg	sys_setresgid		# branch to system call

ENTRY(sys32_getresgid_wrapper)
	llgtr	%r2,%r2			# gid_t *
	llgtr	%r3,%r3			# gid_t *
	llgtr	%r4,%r4			# gid_t *
	jg	sys_getresgid		# branch to system call

ENTRY(sys32_chown_wrapper)
	llgtr	%r2,%r2			# const char *
	llgfr	%r3,%r3			# uid_t
	llgfr	%r4,%r4			# gid_t
	jg	sys_chown		# branch to system call

ENTRY(sys32_setuid_wrapper)
	llgfr	%r2,%r2			# uid_t
	jg	sys_setuid		# branch to system call

ENTRY(sys32_setgid_wrapper)
	llgfr	%r2,%r2			# gid_t
	jg	sys_setgid		# branch to system call

ENTRY(sys32_setfsuid_wrapper)
	llgfr	%r2,%r2			# uid_t
	jg	sys_setfsuid		# branch to system call

ENTRY(sys32_setfsgid_wrapper)
	llgfr	%r2,%r2			# gid_t
	jg	sys_setfsgid		# branch to system call

ENTRY(sys32_pivot_root_wrapper)
	llgtr	%r2,%r2			# const char *
	llgtr	%r3,%r3			# const char *
	jg	sys_pivot_root		# branch to system call

ENTRY(sys32_mincore_wrapper)
	llgfr	%r2,%r2			# unsigned long
	llgfr	%r3,%r3			# size_t
	llgtr	%r4,%r4			# unsigned char *
	jg	sys_mincore		# branch to system call

ENTRY(sys32_madvise_wrapper)
	llgfr	%r2,%r2			# unsigned long
	llgfr	%r3,%r3			# size_t
	lgfr	%r4,%r4			# int
	jg	sys_madvise		# branch to system call

ENTRY(sys32_getdents64_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# void *
	llgfr	%r4,%r4			# unsigned int
	jg	sys_getdents64		# branch to system call

ENTRY(compat_sys_fcntl64_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgfr	%r3,%r3			# unsigned int
	llgfr	%r4,%r4			# unsigned long
	jg	compat_sys_fcntl64	# branch to system call

ENTRY(sys32_stime_wrapper)
	llgtr	%r2,%r2			# long *
	jg	compat_sys_stime	# branch to system call

ENTRY(sys32_setxattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# void *
	llgfr	%r5,%r5			# size_t
	lgfr	%r6,%r6			# int
	jg	sys_setxattr

ENTRY(sys32_lsetxattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# void *
	llgfr	%r5,%r5			# size_t
	lgfr	%r6,%r6			# int
	jg	sys_lsetxattr

ENTRY(sys32_fsetxattr_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# void *
	llgfr	%r5,%r5			# size_t
	lgfr	%r6,%r6			# int
	jg	sys_fsetxattr

ENTRY(sys32_getxattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# void *
	llgfr	%r5,%r5			# size_t
	jg	sys_getxattr

ENTRY(sys32_lgetxattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# void *
	llgfr	%r5,%r5			# size_t
	jg	sys_lgetxattr

ENTRY(sys32_fgetxattr_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# void *
	llgfr	%r5,%r5			# size_t
	jg	sys_fgetxattr

ENTRY(sys32_listxattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	llgfr	%r4,%r4			# size_t
	jg	sys_listxattr

ENTRY(sys32_llistxattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	llgfr	%r4,%r4			# size_t
	jg	sys_llistxattr

ENTRY(sys32_flistxattr_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# char *
	llgfr	%r4,%r4			# size_t
	jg	sys_flistxattr

ENTRY(sys32_removexattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	jg	sys_removexattr

ENTRY(sys32_lremovexattr_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# char *
	jg	sys_lremovexattr

ENTRY(sys32_fremovexattr_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# char *
	jg	sys_fremovexattr

ENTRY(sys32_sched_setaffinity_wrapper)
	lgfr	%r2,%r2			# int
	llgfr	%r3,%r3			# unsigned int
	llgtr	%r4,%r4			# unsigned long *
	jg	compat_sys_sched_setaffinity

ENTRY(sys32_sched_getaffinity_wrapper)
	lgfr	%r2,%r2			# int
	llgfr	%r3,%r3			# unsigned int
	llgtr	%r4,%r4			# unsigned long *
	jg	compat_sys_sched_getaffinity

ENTRY(sys32_exit_group_wrapper)
	lgfr	%r2,%r2			# int
	jg	sys_exit_group		# branch to system call

ENTRY(sys32_set_tid_address_wrapper)
	llgtr	%r2,%r2			# int *
	jg	sys_set_tid_address	# branch to system call

ENTRY(sys_epoll_create_wrapper)
	lgfr	%r2,%r2			# int
	jg	sys_epoll_create	# branch to system call

ENTRY(sys_epoll_ctl_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	lgfr	%r4,%r4			# int
	llgtr	%r5,%r5			# struct epoll_event *
	jg	sys_epoll_ctl		# branch to system call

ENTRY(sys_epoll_wait_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# struct epoll_event *
	lgfr	%r4,%r4			# int
	lgfr	%r5,%r5			# int
	jg	sys_epoll_wait		# branch to system call

ENTRY(sys32_clock_settime_wrapper)
	lgfr	%r2,%r2			# clockid_t (int)
	llgtr	%r3,%r3			# struct compat_timespec *
	jg	compat_sys_clock_settime

ENTRY(sys32_clock_gettime_wrapper)
	lgfr	%r2,%r2			# clockid_t (int)
	llgtr	%r3,%r3			# struct compat_timespec *
	jg	compat_sys_clock_gettime

ENTRY(sys32_clock_getres_wrapper)
	lgfr	%r2,%r2			# clockid_t (int)
	llgtr	%r3,%r3			# struct compat_timespec *
	jg	compat_sys_clock_getres

ENTRY(sys32_clock_nanosleep_wrapper)
	lgfr	%r2,%r2			# clockid_t (int)
	lgfr	%r3,%r3			# int
	llgtr	%r4,%r4			# struct compat_timespec *
	llgtr	%r5,%r5			# struct compat_timespec *
	jg	compat_sys_clock_nanosleep

ENTRY(sys32_timer_create_wrapper)
	lgfr	%r2,%r2			# timer_t (int)
	llgtr	%r3,%r3			# struct compat_sigevent *
	llgtr	%r4,%r4			# timer_t *
	jg	compat_sys_timer_create

ENTRY(sys32_timer_settime_wrapper)
	lgfr	%r2,%r2			# timer_t (int)
	lgfr	%r3,%r3			# int
	llgtr	%r4,%r4			# struct compat_itimerspec *
	llgtr	%r5,%r5			# struct compat_itimerspec *
	jg	compat_sys_timer_settime

ENTRY(sys32_timer_gettime_wrapper)
	lgfr	%r2,%r2			# timer_t (int)
	llgtr	%r3,%r3			# struct compat_itimerspec *
	jg	compat_sys_timer_gettime

ENTRY(sys32_timer_getoverrun_wrapper)
	lgfr	%r2,%r2			# timer_t (int)
	jg	sys_timer_getoverrun

ENTRY(sys32_timer_delete_wrapper)
	lgfr	%r2,%r2			# timer_t (int)
	jg	sys_timer_delete

ENTRY(sys32_io_setup_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# u32 *
	jg	compat_sys_io_setup

ENTRY(sys32_io_destroy_wrapper)
	llgfr	%r2,%r2			# (aio_context_t) u32
	jg	sys_io_destroy

ENTRY(sys32_io_getevents_wrapper)
	llgfr	%r2,%r2			# (aio_context_t) u32
	lgfr	%r3,%r3			# long
	lgfr	%r4,%r4			# long
	llgtr	%r5,%r5			# struct io_event *
	llgtr	%r6,%r6			# struct compat_timespec *
	jg	compat_sys_io_getevents

ENTRY(sys32_io_submit_wrapper)
	llgfr	%r2,%r2			# (aio_context_t) u32
	lgfr	%r3,%r3			# long
	llgtr	%r4,%r4			# struct iocb **
	jg	compat_sys_io_submit

ENTRY(sys32_io_cancel_wrapper)
	llgfr	%r2,%r2			# (aio_context_t) u32
	llgtr	%r3,%r3			# struct iocb *
	llgtr	%r4,%r4			# struct io_event *
	jg	sys_io_cancel

ENTRY(compat_sys_statfs64_wrapper)
	llgtr	%r2,%r2			# const char *
	llgfr	%r3,%r3			# compat_size_t
	llgtr	%r4,%r4			# struct compat_statfs64 *
	jg	compat_sys_statfs64

ENTRY(compat_sys_fstatfs64_wrapper)
	llgfr	%r2,%r2			# unsigned int fd
	llgfr	%r3,%r3			# compat_size_t
	llgtr	%r4,%r4			# struct compat_statfs64 *
	jg	compat_sys_fstatfs64

ENTRY(compat_sys_mq_open_wrapper)
	llgtr	%r2,%r2			# const char *
	lgfr	%r3,%r3			# int
	llgfr	%r4,%r4			# mode_t
	llgtr	%r5,%r5			# struct compat_mq_attr *
	jg	compat_sys_mq_open

ENTRY(sys32_mq_unlink_wrapper)
	llgtr	%r2,%r2			# const char *
	jg	sys_mq_unlink

ENTRY(compat_sys_mq_timedsend_wrapper)
	lgfr	%r2,%r2			# mqd_t
	llgtr	%r3,%r3			# const char *
	llgfr	%r4,%r4			# size_t
	llgfr	%r5,%r5			# unsigned int
	llgtr	%r6,%r6			# const struct compat_timespec *
	jg	compat_sys_mq_timedsend

ENTRY(compat_sys_mq_timedreceive_wrapper)
	lgfr	%r2,%r2			# mqd_t
	llgtr	%r3,%r3			# char *
	llgfr	%r4,%r4			# size_t
	llgtr	%r5,%r5			# unsigned int *
	llgtr	%r6,%r6			# const struct compat_timespec *
	jg	compat_sys_mq_timedreceive

ENTRY(compat_sys_mq_notify_wrapper)
	lgfr	%r2,%r2			# mqd_t
	llgtr	%r3,%r3			# struct compat_sigevent *
	jg	compat_sys_mq_notify

ENTRY(compat_sys_mq_getsetattr_wrapper)
	lgfr	%r2,%r2			# mqd_t
	llgtr	%r3,%r3			# struct compat_mq_attr *
	llgtr	%r4,%r4			# struct compat_mq_attr *
	jg	compat_sys_mq_getsetattr

ENTRY(compat_sys_add_key_wrapper)
	llgtr	%r2,%r2			# const char *
	llgtr	%r3,%r3			# const char *
	llgtr	%r4,%r4			# const void *
	llgfr	%r5,%r5			# size_t
	llgfr	%r6,%r6			# (key_serial_t) u32
	jg	sys_add_key

ENTRY(compat_sys_request_key_wrapper)
	llgtr	%r2,%r2			# const char *
	llgtr	%r3,%r3			# const char *
	llgtr	%r4,%r4			# const void *
	llgfr	%r5,%r5			# (key_serial_t) u32
	jg	sys_request_key

ENTRY(sys32_remap_file_pages_wrapper)
	llgfr	%r2,%r2			# unsigned long
	llgfr	%r3,%r3			# unsigned long
	llgfr	%r4,%r4			# unsigned long
	llgfr	%r5,%r5			# unsigned long
	llgfr	%r6,%r6			# unsigned long
	jg	sys_remap_file_pages

ENTRY(compat_sys_kexec_load_wrapper)
	llgfr	%r2,%r2			# unsigned long
	llgfr	%r3,%r3			# unsigned long
	llgtr	%r4,%r4			# struct kexec_segment *
	llgfr	%r5,%r5			# unsigned long
	jg	compat_sys_kexec_load

ENTRY(sys_ioprio_set_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	lgfr	%r4,%r4			# int
	jg	sys_ioprio_set

ENTRY(sys_ioprio_get_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	jg	sys_ioprio_get

ENTRY(sys_inotify_add_watch_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	llgfr	%r4,%r4			# u32
	jg	sys_inotify_add_watch

ENTRY(sys_inotify_rm_watch_wrapper)
	lgfr	%r2,%r2			# int
	llgfr	%r3,%r3			# u32
	jg	sys_inotify_rm_watch

ENTRY(sys_mkdirat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	lgfr	%r4,%r4			# int
	jg	sys_mkdirat

ENTRY(sys_mknodat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	lgfr	%r4,%r4			# int
	llgfr	%r5,%r5			# unsigned int
	jg	sys_mknodat

ENTRY(sys_fchownat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	llgfr	%r4,%r4			# uid_t
	llgfr	%r5,%r5			# gid_t
	lgfr	%r6,%r6			# int
	jg	sys_fchownat

ENTRY(compat_sys_futimesat_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# struct timeval *
	jg	compat_sys_futimesat

ENTRY(sys_unlinkat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	lgfr	%r4,%r4			# int
	jg	sys_unlinkat

ENTRY(sys_renameat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	lgfr	%r4,%r4			# int
	llgtr	%r5,%r5			# const char *
	jg	sys_renameat

ENTRY(sys_linkat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	lgfr	%r4,%r4			# int
	llgtr	%r5,%r5			# const char *
	lgfr	%r6,%r6			# int
	jg	sys_linkat

ENTRY(sys_symlinkat_wrapper)
	llgtr	%r2,%r2			# const char *
	lgfr	%r3,%r3			# int
	llgtr	%r4,%r4			# const char *
	jg	sys_symlinkat

ENTRY(sys_readlinkat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	llgtr	%r4,%r4			# char *
	lgfr	%r5,%r5			# int
	jg	sys_readlinkat

ENTRY(sys_fchmodat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	llgfr	%r4,%r4			# mode_t
	jg	sys_fchmodat

ENTRY(sys_faccessat_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char *
	lgfr	%r4,%r4			# int
	jg	sys_faccessat

ENTRY(compat_sys_pselect6_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# fd_set *
	llgtr	%r4,%r4			# fd_set *
	llgtr	%r5,%r5			# fd_set *
	llgtr	%r6,%r6			# struct timespec *
	llgt	%r0,164(%r15)		# void *
	stg	%r0,160(%r15)
	jg	compat_sys_pselect6

ENTRY(compat_sys_ppoll_wrapper)
	llgtr	%r2,%r2			# struct pollfd *
	llgfr	%r3,%r3			# unsigned int
	llgtr	%r4,%r4			# struct timespec *
	llgtr	%r5,%r5			# const sigset_t *
	llgfr	%r6,%r6			# size_t
	jg	compat_sys_ppoll

ENTRY(sys_unshare_wrapper)
	llgfr	%r2,%r2			# unsigned long
	jg	sys_unshare

ENTRY(sys_splice_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# loff_t *
	lgfr	%r4,%r4			# int
	llgtr	%r5,%r5			# loff_t *
	llgfr	%r6,%r6			# size_t
	llgf	%r0,164(%r15)		# unsigned int
	stg	%r0,160(%r15)
	jg	sys_splice

ENTRY(sys_sync_file_range_wrapper)
	lgfr	%r2,%r2			# int
	sllg	%r3,%r3,32		# get high word of 64bit loff_t
	or	%r3,%r4			# get low word of 64bit loff_t
	sllg	%r4,%r5,32		# get high word of 64bit loff_t
	or	%r4,%r6			# get low word of 64bit loff_t
	llgf	%r5,164(%r15)		# unsigned int
	jg	sys_sync_file_range

ENTRY(sys_tee_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	llgfr	%r4,%r4			# size_t
	llgfr	%r5,%r5			# unsigned int
	jg	sys_tee

ENTRY(sys_getcpu_wrapper)
	llgtr	%r2,%r2			# unsigned *
	llgtr	%r3,%r3			# unsigned *
	llgtr	%r4,%r4			# struct getcpu_cache *
	jg	sys_getcpu

ENTRY(compat_sys_utimes_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# struct compat_timeval *
	jg	compat_sys_utimes

ENTRY(compat_sys_utimensat_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgtr	%r3,%r3			# char *
	llgtr	%r4,%r4			# struct compat_timespec *
	lgfr	%r5,%r5			# int
	jg	compat_sys_utimensat

ENTRY(sys_eventfd_wrapper)
	llgfr	%r2,%r2			# unsigned int
	jg	sys_eventfd

ENTRY(sys_fallocate_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	sllg	%r4,%r4,32		# get high word of 64bit loff_t
	lr	%r4,%r5			# get low word of 64bit loff_t
	sllg	%r5,%r6,32		# get high word of 64bit loff_t
	l	%r5,164(%r15)		# get low word of 64bit loff_t
	jg	sys_fallocate

ENTRY(sys_timerfd_create_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	jg	sys_timerfd_create

ENTRY(sys_eventfd2_wrapper)
	llgfr	%r2,%r2			# unsigned int
	lgfr	%r3,%r3			# int
	jg	sys_eventfd2

ENTRY(sys_inotify_init1_wrapper)
	lgfr	%r2,%r2			# int
	jg	sys_inotify_init1

ENTRY(sys_pipe2_wrapper)
	llgtr	%r2,%r2			# u32 *
	lgfr	%r3,%r3			# int
	jg	sys_pipe2		# branch to system call

ENTRY(sys_dup3_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgfr	%r3,%r3			# unsigned int
	lgfr	%r4,%r4			# int
	jg	sys_dup3		# branch to system call

ENTRY(sys_epoll_create1_wrapper)
	lgfr	%r2,%r2			# int
	jg	sys_epoll_create1	# branch to system call

ENTRY(sys_tkill_wrapper)
	lgfr	%r2,%r2			# pid_t
	lgfr	%r3,%r3			# int
	jg	sys_tkill		# branch to system call

ENTRY(sys_tgkill_wrapper)
	lgfr	%r2,%r2			# pid_t
	lgfr	%r3,%r3			# pid_t
	lgfr	%r4,%r4			# int
	jg	sys_tgkill		# branch to system call

ENTRY(compat_sys_keyctl_wrapper)
	llgfr	%r2,%r2			# u32
	llgfr	%r3,%r3			# u32
	llgfr	%r4,%r4			# u32
	llgfr	%r5,%r5			# u32
	llgfr	%r6,%r6			# u32
	jg	compat_sys_keyctl	# branch to system call

ENTRY(sys_perf_event_open_wrapper)
	llgtr	%r2,%r2			# const struct perf_event_attr *
	lgfr	%r3,%r3			# pid_t
	lgfr	%r4,%r4			# int
	lgfr	%r5,%r5			# int
	llgfr	%r6,%r6			# unsigned long
	jg	sys_perf_event_open	# branch to system call

ENTRY(sys_clone_wrapper)
	llgfr	%r2,%r2			# unsigned long
	llgfr	%r3,%r3			# unsigned long
	llgtr	%r4,%r4			# int *
	llgtr	%r5,%r5			# int *
	jg	sys_clone		# branch to system call

ENTRY(sys32_execve_wrapper)
	llgtr	%r2,%r2			# char *
	llgtr	%r3,%r3			# compat_uptr_t *
	llgtr	%r4,%r4			# compat_uptr_t *
	jg	compat_sys_execve	# branch to system call

ENTRY(sys_fanotify_init_wrapper)
	llgfr	%r2,%r2			# unsigned int
	llgfr	%r3,%r3			# unsigned int
	jg	sys_fanotify_init	# branch to system call

ENTRY(sys_prlimit64_wrapper)
	lgfr	%r2,%r2			# pid_t
	llgfr	%r3,%r3			# unsigned int
	llgtr	%r4,%r4			# const struct rlimit64 __user *
	llgtr	%r5,%r5			# struct rlimit64 __user *
	jg	sys_prlimit64		# branch to system call

ENTRY(sys_name_to_handle_at_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char __user *
	llgtr	%r4,%r4			# struct file_handle __user *
	llgtr	%r5,%r5			# int __user *
	lgfr	%r6,%r6			# int
	jg	sys_name_to_handle_at

ENTRY(compat_sys_clock_adjtime_wrapper)
	lgfr	%r2,%r2			# clockid_t (int)
	llgtr	%r3,%r3			# struct compat_timex __user *
	jg	compat_sys_clock_adjtime

ENTRY(sys_syncfs_wrapper)
	lgfr	%r2,%r2			# int
	jg	sys_syncfs

ENTRY(sys_setns_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	jg	sys_setns

ENTRY(compat_sys_process_vm_readv_wrapper)
	lgfr	%r2,%r2			# compat_pid_t
	llgtr	%r3,%r3			# struct compat_iovec __user *
	llgfr	%r4,%r4			# unsigned long
	llgtr	%r5,%r5			# struct compat_iovec __user *
	llgfr	%r6,%r6			# unsigned long
	llgf	%r0,164(%r15)		# unsigned long
	stg	%r0,160(%r15)
	jg	compat_sys_process_vm_readv

ENTRY(compat_sys_process_vm_writev_wrapper)
	lgfr	%r2,%r2			# compat_pid_t
	llgtr	%r3,%r3			# struct compat_iovec __user *
	llgfr	%r4,%r4			# unsigned long
	llgtr	%r5,%r5			# struct compat_iovec __user *
	llgfr	%r6,%r6			# unsigned long
	llgf	%r0,164(%r15)		# unsigned long
	stg	%r0,160(%r15)
	jg	compat_sys_process_vm_writev

ENTRY(sys_s390_runtime_instr_wrapper)
	lgfr	%r2,%r2			# int
	lgfr	%r3,%r3			# int
	jg	sys_s390_runtime_instr

ENTRY(sys_kcmp_wrapper)
	lgfr	%r2,%r2			# pid_t
	lgfr	%r3,%r3			# pid_t
	lgfr	%r4,%r4			# int
	llgfr	%r5,%r5			# unsigned long
	llgfr	%r6,%r6			# unsigned long
	jg	sys_kcmp

ENTRY(sys_finit_module_wrapper)
	lgfr	%r2,%r2			# int
	llgtr	%r3,%r3			# const char __user *
	lgfr	%r4,%r4			# int
	jg	sys_finit_module

ENTRY(sys_sched_setattr_wrapper)
	lgfr	%r2,%r2			# pid_t
	llgtr	%r3,%r3			# struct sched_attr __user *
	jg	sys_sched_setattr

ENTRY(sys_sched_getattr_wrapper)
	lgfr	%r2,%r2			# pid_t
	llgtr	%r3,%r3			# const char __user *
	llgfr	%r4,%r4			# unsigned int
	jg	sys_sched_getattr