@@ -227,7 +227,7 @@ 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( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) , not ( target_arch = "xtensa" ) ) ,
231
231
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
232
232
target_family = "wasm" ,
233
233
target_arch = "asmjs" ,
@@ -250,7 +250,7 @@ pub struct VaListImpl<'f> {
250
250
}
251
251
252
252
#[ cfg( any(
253
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
253
+ all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) , not ( target_arch = "xtensa" ) ) ,
254
254
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
255
255
target_family = "wasm" ,
256
256
target_arch = "asmjs" ,
@@ -335,6 +335,24 @@ pub struct VaListImpl<'f> {
335
335
_marker : PhantomData < & ' f mut & ' f c_void > ,
336
336
}
337
337
338
+ /// xtensa ABI implementation of a `va_list`.
339
+ #[ cfg( target_arch = "xtensa" ) ]
340
+ #[ repr( C ) ]
341
+ #[ derive( Debug ) ]
342
+ #[ unstable(
343
+ feature = "c_variadic" ,
344
+ reason = "the `c_variadic` feature has not been properly tested on \
345
+ all supported platforms",
346
+ issue = "44930"
347
+ ) ]
348
+ #[ lang = "va_list" ]
349
+ pub struct VaListImpl < ' f > {
350
+ stk : * mut i32 ,
351
+ reg : * mut i32 ,
352
+ ndx : i32 ,
353
+ _marker : PhantomData < & ' f mut & ' f i32 > ,
354
+ }
355
+
338
356
/// A wrapper for a `va_list`
339
357
#[ repr( transparent) ]
340
358
#[ derive( Debug ) ]
@@ -349,7 +367,8 @@ pub struct VaList<'a, 'f: 'a> {
349
367
all(
350
368
not( target_arch = "aarch64" ) ,
351
369
not( target_arch = "powerpc" ) ,
352
- not( target_arch = "x86_64" )
370
+ not( target_arch = "x86_64" ) ,
371
+ not( target_arch = "xtensa" )
353
372
) ,
354
373
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
355
374
target_family = "wasm" ,
@@ -359,7 +378,7 @@ pub struct VaList<'a, 'f: 'a> {
359
378
inner : VaListImpl < ' f > ,
360
379
361
380
#[ cfg( all(
362
- any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" ) ,
381
+ any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" , target_arch = "xtensa" ) ,
363
382
any( not( target_arch = "aarch64" ) , not( any( target_os = "macos" , target_os = "ios" ) ) ) ,
364
383
not( target_family = "wasm" ) ,
365
384
not( target_arch = "asmjs" ) ,
@@ -371,7 +390,7 @@ pub struct VaList<'a, 'f: 'a> {
371
390
}
372
391
373
392
#[ cfg( any(
374
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
393
+ all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) , not ( target_arch = "xtensa" ) ) ,
375
394
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
376
395
target_family = "wasm" ,
377
396
target_arch = "asmjs" ,
@@ -392,7 +411,7 @@ impl<'f> VaListImpl<'f> {
392
411
}
393
412
394
413
#[ cfg( all(
395
- any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" ) ,
414
+ any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" , target_arch = "xtensa" ) ,
396
415
any( not( target_arch = "aarch64" ) , not( any( target_os = "macos" , target_os = "ios" ) ) ) ,
397
416
not( target_family = "wasm" ) ,
398
417
not( target_arch = "asmjs" ) ,
0 commit comments