@@ -16,6 +16,7 @@ use crate::ops::{Deref, DerefMut};
1616 not( target_arch = "aarch64" ) ,
1717 not( target_arch = "powerpc" ) ,
1818 not( target_arch = "s390x" ) ,
19+ not( target_arch = "xtensa" ) ,
1920 not( target_arch = "x86_64" )
2021 ) ,
2122 all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -38,6 +39,7 @@ pub struct VaListImpl<'f> {
3839 not( target_arch = "aarch64" ) ,
3940 not( target_arch = "powerpc" ) ,
4041 not( target_arch = "s390x" ) ,
42+ not( target_arch = "xtensa" ) ,
4143 not( target_arch = "x86_64" )
4244 ) ,
4345 all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -114,6 +116,24 @@ pub struct VaListImpl<'f> {
114116 _marker : PhantomData < & ' f mut & ' f c_void > ,
115117}
116118
119+ /// Xtensa ABI implementation of a `va_list`.
120+ #[ cfg( target_arch = "xtensa" ) ]
121+ #[ repr( C ) ]
122+ #[ derive( Debug ) ]
123+ #[ unstable(
124+ feature = "c_variadic" ,
125+ reason = "the `c_variadic` feature has not been properly tested on \
126+ all supported platforms",
127+ issue = "44930"
128+ ) ]
129+ #[ lang = "va_list" ]
130+ pub struct VaListImpl < ' f > {
131+ stk : * mut i32 ,
132+ reg : * mut i32 ,
133+ ndx : i32 ,
134+ _marker : PhantomData < & ' f mut & ' f i32 > ,
135+ }
136+
117137/// A wrapper for a `va_list`
118138#[ cfg_attr( not( doc) , repr( transparent) ) ] // work around https://github.com/rust-lang/rust/issues/90435
119139#[ derive( Debug ) ]
@@ -123,6 +143,7 @@ pub struct VaList<'a, 'f: 'a> {
123143 not( target_arch = "aarch64" ) ,
124144 not( target_arch = "powerpc" ) ,
125145 not( target_arch = "s390x" ) ,
146+ not( target_arch = "xtensa" ) ,
126147 not( target_arch = "x86_64" )
127148 ) ,
128149 all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -137,6 +158,7 @@ pub struct VaList<'a, 'f: 'a> {
137158 target_arch = "aarch64" ,
138159 target_arch = "powerpc" ,
139160 target_arch = "s390x" ,
161+ target_arch = "xtensa" ,
140162 target_arch = "x86_64"
141163 ) ,
142164 any( not( target_arch = "aarch64" ) , not( target_vendor = "apple" ) ) ,
@@ -154,6 +176,7 @@ pub struct VaList<'a, 'f: 'a> {
154176 not( target_arch = "aarch64" ) ,
155177 not( target_arch = "powerpc" ) ,
156178 not( target_arch = "s390x" ) ,
179+ not( target_arch = "xtensa" ) ,
157180 not( target_arch = "x86_64" )
158181 ) ,
159182 all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -174,6 +197,7 @@ impl<'f> VaListImpl<'f> {
174197 target_arch = "aarch64" ,
175198 target_arch = "powerpc" ,
176199 target_arch = "s390x" ,
200+ target_arch = "xtensa" ,
177201 target_arch = "x86_64"
178202 ) ,
179203 any( not( target_arch = "aarch64" ) , not( target_vendor = "apple" ) ) ,
0 commit comments