@@ -61,7 +61,7 @@ impl fmt::Debug for c_void {
61
61
/// Basic implementation of a `va_list`.
62
62
// The name is WIP, using `VaListImpl` for now.
63
63
#[ cfg( any(
64
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
64
+ all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) , not ( target_arch = "xtensa" ) ) ,
65
65
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
66
66
target_arch = "wasm32" ,
67
67
target_arch = "asmjs" ,
@@ -84,7 +84,7 @@ pub struct VaListImpl<'f> {
84
84
}
85
85
86
86
#[ cfg( any(
87
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
87
+ all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) , not ( target_arch = "xtensa" ) ) ,
88
88
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
89
89
target_arch = "wasm32" ,
90
90
target_arch = "asmjs" ,
@@ -169,6 +169,24 @@ pub struct VaListImpl<'f> {
169
169
_marker : PhantomData < & ' f mut & ' f c_void > ,
170
170
}
171
171
172
+ /// xtensa ABI implementation of a `va_list`.
173
+ #[ cfg( target_arch = "xtensa" ) ]
174
+ #[ repr( C ) ]
175
+ #[ derive( Debug ) ]
176
+ #[ unstable(
177
+ feature = "c_variadic" ,
178
+ reason = "the `c_variadic` feature has not been properly tested on \
179
+ all supported platforms",
180
+ issue = "44930"
181
+ ) ]
182
+ #[ lang = "va_list" ]
183
+ pub struct VaListImpl < ' f > {
184
+ stk : * mut i32 ,
185
+ reg : * mut i32 ,
186
+ ndx : i32 ,
187
+ _marker : PhantomData < & ' f mut & ' f i32 > ,
188
+ }
189
+
172
190
/// A wrapper for a `va_list`
173
191
#[ repr( transparent) ]
174
192
#[ derive( Debug ) ]
@@ -183,7 +201,8 @@ pub struct VaList<'a, 'f: 'a> {
183
201
all(
184
202
not( target_arch = "aarch64" ) ,
185
203
not( target_arch = "powerpc" ) ,
186
- not( target_arch = "x86_64" )
204
+ not( target_arch = "x86_64" ) ,
205
+ not( target_arch = "xtensa" )
187
206
) ,
188
207
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
189
208
target_arch = "wasm32" ,
@@ -193,7 +212,7 @@ pub struct VaList<'a, 'f: 'a> {
193
212
inner : VaListImpl < ' f > ,
194
213
195
214
#[ cfg( all(
196
- any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" ) ,
215
+ any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" , target_arch = "xtensa" ) ,
197
216
any( not( target_arch = "aarch64" ) , not( any( target_os = "macos" , target_os = "ios" ) ) ) ,
198
217
not( target_arch = "wasm32" ) ,
199
218
not( target_arch = "asmjs" ) ,
@@ -205,7 +224,7 @@ pub struct VaList<'a, 'f: 'a> {
205
224
}
206
225
207
226
#[ cfg( any(
208
- all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) ) ,
227
+ all( not( target_arch = "aarch64" ) , not( target_arch = "powerpc" ) , not( target_arch = "x86_64" ) , not ( target_arch = "xtensa" ) ) ,
209
228
all( target_arch = "aarch64" , any( target_os = "macos" , target_os = "ios" ) ) ,
210
229
target_arch = "wasm32" ,
211
230
target_arch = "asmjs" ,
@@ -226,7 +245,7 @@ impl<'f> VaListImpl<'f> {
226
245
}
227
246
228
247
#[ cfg( all(
229
- any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" ) ,
248
+ any( target_arch = "aarch64" , target_arch = "powerpc" , target_arch = "x86_64" , target_arch = "xtensa" ) ,
230
249
any( not( target_arch = "aarch64" ) , not( any( target_os = "macos" , target_os = "ios" ) ) ) ,
231
250
not( target_arch = "wasm32" ) ,
232
251
not( target_arch = "asmjs" ) ,
0 commit comments