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