Date: Wed, 17 Nov 2021 20:22:47 GMT From: Brooks Davis <brooks@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: a016320dfb4e - main - freebsd32: rename 32-bit compat pads to _pad Message-ID: <202111172022.1AHKMllB060190@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=a016320dfb4e2363deeee658ac931220ec517cad commit a016320dfb4e2363deeee658ac931220ec517cad Author: Brooks Davis <brooks@FreeBSD.org> AuthorDate: 2021-11-17 20:12:26 +0000 Commit: Brooks Davis <brooks@FreeBSD.org> CommitDate: 2021-11-17 20:12:26 +0000 freebsd32: rename 32-bit compat pads to _pad Some 32-bit architectures pass 64-bit values in aligned register pairs (a0,a1), (a2,a3) etc. In freebsd32 we add these pads explicitly from compat code. We also sometimes add pads in the default ABI. Differentiate the two by making the freebsd32 ones int _pad. In a future commit the 32-bit ones will be automatically generated. Reviewed by: kevans --- sys/compat/freebsd32/freebsd32_proto.h | 24 ++++++++++++------------ sys/compat/freebsd32/freebsd32_systrace_args.c | 24 ++++++++++++------------ sys/compat/freebsd32/syscalls.master | 24 ++++++++++++------------ 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h index 9025871780aa..a7a38e39dccc 100644 --- a/sys/compat/freebsd32/freebsd32_proto.h +++ b/sys/compat/freebsd32/freebsd32_proto.h @@ -429,7 +429,7 @@ struct freebsd32_pread_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(void *)]; void * buf; char buf_r_[PADR_(void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; @@ -437,7 +437,7 @@ struct freebsd32_pwrite_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char buf_l_[PADL_(const void *)]; const void * buf; char buf_r_[PADR_(const void *)]; char nbyte_l_[PADL_(size_t)]; size_t nbyte; char nbyte_r_[PADR_(size_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; }; @@ -447,26 +447,26 @@ struct freebsd32_mmap_args { char prot_l_[PADL_(int)]; int prot; char prot_r_[PADR_(int)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char pos1_l_[PADL_(uint32_t)]; uint32_t pos1; char pos1_r_[PADR_(uint32_t)]; char pos2_l_[PADL_(uint32_t)]; uint32_t pos2; char pos2_r_[PADR_(uint32_t)]; }; struct freebsd32_lseek_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char whence_l_[PADL_(int)]; int whence; char whence_r_[PADR_(int)]; }; struct freebsd32_truncate_args { char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; struct freebsd32_ftruncate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)]; char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)]; }; @@ -514,7 +514,7 @@ struct freebsd32_ftruncate_args { #ifdef PAD64_REQUIRED struct freebsd32_cpuset_setid_args { char which_l_[PADL_(cpuwhich_t)]; cpuwhich_t which; char which_r_[PADR_(cpuwhich_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char setid_l_[PADL_(cpusetid_t)]; cpusetid_t setid; char setid_r_[PADR_(cpusetid_t)]; @@ -597,7 +597,7 @@ struct freebsd32_pselect_args { #ifdef PAD64_REQUIRED struct freebsd32_posix_fallocate_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; @@ -605,7 +605,7 @@ struct freebsd32_posix_fallocate_args { }; struct freebsd32_posix_fadvise_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char offset1_l_[PADL_(uint32_t)]; uint32_t offset1; char offset1_r_[PADR_(uint32_t)]; char offset2_l_[PADL_(uint32_t)]; uint32_t offset2; char offset2_r_[PADR_(uint32_t)]; char len1_l_[PADL_(uint32_t)]; uint32_t len1; char len1_r_[PADR_(uint32_t)]; @@ -614,7 +614,7 @@ struct freebsd32_posix_fadvise_args { }; struct freebsd32_wait6_args { char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char status_l_[PADL_(int *)]; int * status; char status_r_[PADR_(int *)]; @@ -664,7 +664,7 @@ struct freebsd32_aio_mlock_args { #ifdef PAD64_REQUIRED struct freebsd32_procctl_args { char idtype_l_[PADL_(idtype_t)]; idtype_t idtype; char idtype_r_[PADR_(idtype_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char id1_l_[PADL_(uint32_t)]; uint32_t id1; char id1_r_[PADR_(uint32_t)]; char id2_l_[PADL_(uint32_t)]; uint32_t id2; char id2_r_[PADR_(uint32_t)]; char com_l_[PADL_(int)]; int com; char com_r_[PADR_(int)]; @@ -719,7 +719,7 @@ struct freebsd32_mknodat_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; char path_l_[PADL_(const char *)]; const char * path; char path_r_[PADR_(const char *)]; char mode_l_[PADL_(mode_t)]; mode_t mode; char mode_r_[PADR_(mode_t)]; - char pad_l_[PADL_(int)]; int pad; char pad_r_[PADR_(int)]; + char _pad_l_[PADL_(int)]; int _pad; char _pad_r_[PADR_(int)]; char dev1_l_[PADL_(uint32_t)]; uint32_t dev1; char dev1_r_[PADR_(uint32_t)]; char dev2_l_[PADL_(uint32_t)]; uint32_t dev2; char dev2_r_[PADR_(uint32_t)]; }; diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c index 971a7a4ca416..611a59f1328e 100644 --- a/sys/compat/freebsd32/freebsd32_systrace_args.c +++ b/sys/compat/freebsd32/freebsd32_systrace_args.c @@ -2386,7 +2386,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->buf; /* void * */ uarg[2] = p->nbyte; /* size_t */ - iarg[3] = p->pad; /* int */ + iarg[3] = p->_pad; /* int */ uarg[4] = p->offset1; /* uint32_t */ uarg[5] = p->offset2; /* uint32_t */ *n_args = 6; @@ -2398,7 +2398,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->buf; /* const void * */ uarg[2] = p->nbyte; /* size_t */ - iarg[3] = p->pad; /* int */ + iarg[3] = p->_pad; /* int */ uarg[4] = p->offset1; /* uint32_t */ uarg[5] = p->offset2; /* uint32_t */ *n_args = 6; @@ -2412,7 +2412,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[2] = p->prot; /* int */ iarg[3] = p->flags; /* int */ iarg[4] = p->fd; /* int */ - iarg[5] = p->pad; /* int */ + iarg[5] = p->_pad; /* int */ uarg[6] = p->pos1; /* uint32_t */ uarg[7] = p->pos2; /* uint32_t */ *n_args = 8; @@ -2422,7 +2422,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 478: { struct freebsd32_lseek_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->offset1; /* uint32_t */ uarg[3] = p->offset2; /* uint32_t */ iarg[4] = p->whence; /* int */ @@ -2433,7 +2433,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 479: { struct freebsd32_truncate_args *p = params; uarg[0] = (intptr_t)p->path; /* const char * */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->length1; /* uint32_t */ uarg[3] = p->length2; /* uint32_t */ *n_args = 4; @@ -2443,7 +2443,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 480: { struct freebsd32_ftruncate_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->length1; /* uint32_t */ uarg[3] = p->length2; /* uint32_t */ *n_args = 4; @@ -2542,7 +2542,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 485: { struct freebsd32_cpuset_setid_args *p = params; iarg[0] = p->which; /* cpuwhich_t */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ iarg[4] = p->setid; /* cpusetid_t */ @@ -2924,7 +2924,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 530: { struct freebsd32_posix_fallocate_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->offset1; /* uint32_t */ uarg[3] = p->offset2; /* uint32_t */ uarg[4] = p->len1; /* uint32_t */ @@ -2936,7 +2936,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 531: { struct freebsd32_posix_fadvise_args *p = params; iarg[0] = p->fd; /* int */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->offset1; /* uint32_t */ uarg[3] = p->offset2; /* uint32_t */ uarg[4] = p->len1; /* uint32_t */ @@ -2949,7 +2949,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 532: { struct freebsd32_wait6_args *p = params; iarg[0] = p->idtype; /* idtype_t */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ uarg[4] = (intptr_t)p->status; /* int * */ @@ -3099,7 +3099,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) case 544: { struct freebsd32_procctl_args *p = params; iarg[0] = p->idtype; /* idtype_t */ - iarg[1] = p->pad; /* int */ + iarg[1] = p->_pad; /* int */ uarg[2] = p->id1; /* uint32_t */ uarg[3] = p->id2; /* uint32_t */ iarg[4] = p->com; /* int */ @@ -3231,7 +3231,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t)p->path; /* const char * */ iarg[2] = p->mode; /* mode_t */ - iarg[3] = p->pad; /* int */ + iarg[3] = p->_pad; /* int */ uarg[4] = p->dev1; /* uint32_t */ uarg[5] = p->dev2; /* uint32_t */ *n_args = 6; diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master index 8a4f9b56b7d5..cb40aa8418e7 100644 --- a/sys/compat/freebsd32/syscalls.master +++ b/sys/compat/freebsd32/syscalls.master @@ -900,25 +900,25 @@ #ifdef PAD64_REQUIRED 475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ void *buf,size_t nbyte, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2); } 476 AUE_PWRITE STD { ssize_t freebsd32_pwrite(int fd, \ const void *buf, size_t nbyte, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2); } 477 AUE_MMAP STD { void *freebsd32_mmap(void *addr, \ size_t len, int prot, int flags, int fd, \ - int pad, \ + int _pad, \ uint32_t pos1, uint32_t pos2); } 478 AUE_LSEEK STD { off_t freebsd32_lseek(int fd, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2, \ int whence); } 479 AUE_TRUNCATE STD { int freebsd32_truncate(const char *path, \ - int pad, \ + int _pad, \ uint32_t length1, uint32_t length2); } 480 AUE_FTRUNCATE STD { int freebsd32_ftruncate(int fd, \ - int pad, \ + int _pad, \ uint32_t length1, uint32_t length2); } #else 475 AUE_PREAD STD { ssize_t freebsd32_pread(int fd, \ @@ -945,7 +945,7 @@ 484 AUE_NULL NOPROTO { int cpuset(cpusetid_t *setid); } #ifdef PAD64_REQUIRED 485 AUE_NULL STD { int freebsd32_cpuset_setid(cpuwhich_t which, \ - int pad, \ + int _pad, \ uint32_t id1, uint32_t id2, \ cpusetid_t setid); } #else @@ -1050,15 +1050,15 @@ size_t outbuflen); } #ifdef PAD64_REQUIRED 530 AUE_POSIX_FALLOCATE STD { int freebsd32_posix_fallocate(int fd, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2); } 531 AUE_POSIX_FADVISE STD { int freebsd32_posix_fadvise(int fd, \ - int pad, \ + int _pad, \ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2, \ int advice); } -532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, int pad, \ +532 AUE_WAIT6 STD { int freebsd32_wait6(idtype_t idtype, int _pad, \ uint32_t id1, uint32_t id2, \ int *status, int options, \ struct __wrusage32 *wrusage, \ @@ -1106,7 +1106,7 @@ 543 AUE_AIO_MLOCK STD { int freebsd32_aio_mlock( \ struct aiocb32 *aiocbp); } #ifdef PAD64_REQUIRED -544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, int pad, \ +544 AUE_PROCCTL STD { int freebsd32_procctl(idtype_t idtype, int _pad, \ uint32_t id1, uint32_t id2, int com, \ void *data); } #else @@ -1147,7 +1147,7 @@ #ifdef PAD64_REQUIRED 559 AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \ const char *path, mode_t mode, \ - int pad, uint32_t dev1, uint32_t dev2); } + int _pad, uint32_t dev1, uint32_t dev2); } #else 559 AUE_MKNODAT STD { int freebsd32_mknodat(int fd, \ const char *path, mode_t mode, \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111172022.1AHKMllB060190>