@@ -227,7 +227,12 @@ impl fmt::Debug for c_void {
227
227
/// Basic implementation of a `va_list`.
228
228
// The name is WIP, using `VaListImpl` for now.
229
229
#[ cfg( any(
230
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
230
+ all(
231
+ not( target_arch = "aarch64" ) ,
232
+ not( target_arch = "powerpc" ) ,
233
+ not( target_arch = "s390x" ) ,
234
+ not( target_arch = "x86_64" )
235
+ ) ,
231
236
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
232
237
target_family = "wasm" ,
233
238
target_arch = "asmjs" ,
@@ -251,7 +256,12 @@ pub struct VaListImpl<'f> {
251
256
}
252
257
253
258
#[ cfg( any(
254
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
259
+ all(
260
+ not( target_arch = "aarch64" ) ,
261
+ not( target_arch = "powerpc" ) ,
262
+ not( target_arch = "s390x" ) ,
263
+ not( target_arch = "x86_64" )
264
+ ) ,
255
265
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
256
266
target_family = "wasm" ,
257
267
target_arch = "asmjs" ,
@@ -319,6 +329,25 @@ pub struct VaListImpl<'f> {
319
329
_marker : PhantomData < & ' f mut & ' f c_void > ,
320
330
}
321
331
332
+ /// s390x ABI implementation of a `va_list`.
333
+ #[ cfg( target_arch = "s390x" ) ]
334
+ #[ repr( C ) ]
335
+ #[ derive( Debug ) ]
336
+ #[ unstable(
337
+ feature = "c_variadic" ,
338
+ reason = "the `c_variadic` feature has not been properly tested on \
339
+ all supported platforms",
340
+ issue = "44930"
341
+ ) ]
342
+ #[ lang = "va_list" ]
343
+ pub struct VaListImpl < ' f > {
344
+ gpr : i64 ,
345
+ fpr : i64 ,
346
+ overflow_arg_area : * mut c_void ,
347
+ reg_save_area : * mut c_void ,
348
+ _marker : PhantomData < & ' f mut & ' f c_void > ,
349
+ }
350
+
322
351
/// x86_64 ABI implementation of a `va_list`.
323
352
#[ cfg( all( target_arch = "x86_64" , not( target_os = "uefi" ) , not( windows) ) ) ]
324
353
#[ repr( C ) ]
@@ -352,6 +381,7 @@ pub struct VaList<'a, 'f: 'a> {
352
381
all(
353
382
not( target_arch = "aarch64" ) ,
354
383
not( target_arch = "powerpc" ) ,
384
+ not( target_arch = "s390x" ) ,
355
385
not( target_arch = "x86_64" )
356
386
) ,
357
387
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
@@ -363,7 +393,12 @@ pub struct VaList<'a, 'f: 'a> {
363
393
inner : VaListImpl < ' f > ,
364
394
365
395
#[ cfg( all(
366
- any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" ) ,
396
+ any(
397
+ target_arch = "aarch64" ,
398
+ target_arch = "powerpc" ,
399
+ target_arch = "s390x" ,
400
+ target_arch = "x86_64"
401
+ ) ,
367
402
any( not( target_arch = "aarch64" ) , not( any( target_os = "macos" , target_os = "ios" ) ) ) ,
368
403
not( target_family = "wasm" ) ,
369
404
not( target_arch = "asmjs" ) ,
@@ -376,7 +411,12 @@ pub struct VaList<'a, 'f: 'a> {
376
411
}
377
412
378
413
#[ cfg( any(
379
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
414
+ all(
415
+ not( target_arch = "aarch64" ) ,
416
+ not( target_arch = "powerpc" ) ,
417
+ not( target_arch = "s390x" ) ,
418
+ not( target_arch = "x86_64" )
419
+ ) ,
380
420
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
381
421
target_family = "wasm" ,
382
422
target_arch = "asmjs" ,
@@ -398,7 +438,12 @@ impl<'f> VaListImpl<'f> {
398
438
}
399
439
400
440
#[ cfg( all(
401
- any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" ) ,
441
+ any(
442
+ target_arch = "aarch64" ,
443
+ target_arch = "powerpc" ,
444
+ target_arch = "s390x" ,
445
+ target_arch = "x86_64"
446
+ ) ,
402
447
any( not( target_arch = "aarch64" ) , not( any( target_os = "macos" , target_os = "ios" ) ) ) ,
403
448
not( target_family = "wasm" ) ,
404
449
not( target_arch = "asmjs" ) ,
0 commit comments