@@ -37,52 +37,52 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
37
37
// File related shims
38
38
"readdir64" => {
39
39
let [ dirp] =
40
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
40
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
41
41
let result = this. linux_readdir64 ( dirp) ?;
42
42
this. write_scalar ( result, dest) ?;
43
43
}
44
44
"sync_file_range" => {
45
45
let [ fd, offset, nbytes, flags] =
46
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
46
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
47
47
let result = this. sync_file_range ( fd, offset, nbytes, flags) ?;
48
48
this. write_scalar ( result, dest) ?;
49
49
}
50
50
"statx" => {
51
51
let [ dirfd, pathname, flags, mask, statxbuf] =
52
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
52
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
53
53
let result = this. linux_statx ( dirfd, pathname, flags, mask, statxbuf) ?;
54
54
this. write_scalar ( result, dest) ?;
55
55
}
56
56
57
57
// epoll, eventfd
58
58
"epoll_create1" => {
59
59
let [ flag] =
60
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
60
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
61
61
let result = this. epoll_create1 ( flag) ?;
62
62
this. write_scalar ( result, dest) ?;
63
63
}
64
64
"epoll_ctl" => {
65
65
let [ epfd, op, fd, event] =
66
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
66
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
67
67
let result = this. epoll_ctl ( epfd, op, fd, event) ?;
68
68
this. write_scalar ( result, dest) ?;
69
69
}
70
70
"epoll_wait" => {
71
71
let [ epfd, events, maxevents, timeout] =
72
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
72
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
73
73
this. epoll_wait ( epfd, events, maxevents, timeout, dest) ?;
74
74
}
75
75
"eventfd" => {
76
76
let [ val, flag] =
77
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
77
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
78
78
let result = this. eventfd ( val, flag) ?;
79
79
this. write_scalar ( result, dest) ?;
80
80
}
81
81
82
82
// Threading
83
83
"pthread_setname_np" => {
84
84
let [ thread, name] =
85
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
85
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
86
86
let res = match this. pthread_setname_np (
87
87
this. read_scalar ( thread) ?,
88
88
this. read_scalar ( name) ?,
@@ -98,7 +98,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
98
98
}
99
99
"pthread_getname_np" => {
100
100
let [ thread, name, len] =
101
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
101
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
102
102
// The function's behavior isn't portable between platforms.
103
103
// In case of glibc, the length of the output buffer must
104
104
// be not shorter than TASK_COMM_LEN.
@@ -121,7 +121,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
121
121
this. write_scalar ( res, dest) ?;
122
122
}
123
123
"gettid" => {
124
- let [ ] = this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
124
+ let [ ] = this. check_shim ( abi, Conv :: C , link_name, args) ?;
125
125
let result = this. linux_gettid ( ) ?;
126
126
this. write_scalar ( result, dest) ?;
127
127
}
@@ -134,29 +134,29 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
134
134
// Miscellaneous
135
135
"mmap64" => {
136
136
let [ addr, length, prot, flags, fd, offset] =
137
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
137
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
138
138
let offset = this. read_scalar ( offset) ?. to_i64 ( ) ?;
139
139
let ptr = this. mmap ( addr, length, prot, flags, fd, offset. into ( ) ) ?;
140
140
this. write_scalar ( ptr, dest) ?;
141
141
}
142
142
"mremap" => {
143
143
let [ old_address, old_size, new_size, flags] =
144
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
144
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
145
145
let ptr = this. mremap ( old_address, old_size, new_size, flags) ?;
146
146
this. write_scalar ( ptr, dest) ?;
147
147
}
148
148
"__errno_location" => {
149
- let [ ] = this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
149
+ let [ ] = this. check_shim ( abi, Conv :: C , link_name, args) ?;
150
150
let errno_place = this. last_error_place ( ) ?;
151
151
this. write_scalar ( errno_place. to_ref ( this) . to_scalar ( ) , dest) ?;
152
152
}
153
153
"__libc_current_sigrtmin" => {
154
- let [ ] = this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
154
+ let [ ] = this. check_shim ( abi, Conv :: C , link_name, args) ?;
155
155
156
156
this. write_int ( SIGRTMIN , dest) ?;
157
157
}
158
158
"__libc_current_sigrtmax" => {
159
- let [ ] = this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
159
+ let [ ] = this. check_shim ( abi, Conv :: C , link_name, args) ?;
160
160
161
161
this. write_int ( SIGRTMAX , dest) ?;
162
162
}
@@ -165,7 +165,7 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> {
165
165
// These shims are enabled only when the caller is in the standard library.
166
166
"pthread_getattr_np" if this. frame_in_std ( ) => {
167
167
let [ _thread, _attr] =
168
- this. check_shim ( abi, ExternAbi :: C { unwind : false } , link_name, args) ?;
168
+ this. check_shim ( abi, Conv :: C , link_name, args) ?;
169
169
this. write_null ( dest) ?;
170
170
}
171
171
0 commit comments