@@ -16,6 +16,7 @@ use crate::ops::{Deref, DerefMut};
16
16
not( target_arch = "aarch64" ) ,
17
17
not( target_arch = "powerpc" ) ,
18
18
not( target_arch = "s390x" ) ,
19
+ not( target_arch = "xtensa" ) ,
19
20
not( target_arch = "x86_64" )
20
21
) ,
21
22
all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -38,6 +39,7 @@ pub struct VaListImpl<'f> {
38
39
not( target_arch = "aarch64" ) ,
39
40
not( target_arch = "powerpc" ) ,
40
41
not( target_arch = "s390x" ) ,
42
+ not( target_arch = "xtensa" ) ,
41
43
not( target_arch = "x86_64" )
42
44
) ,
43
45
all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -114,6 +116,24 @@ pub struct VaListImpl<'f> {
114
116
_marker : PhantomData < & ' f mut & ' f c_void > ,
115
117
}
116
118
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
+
117
137
/// A wrapper for a `va_list`
118
138
#[ cfg_attr( not( doc) , repr( transparent) ) ] // work around https://github.com/rust-lang/rust/issues/90435
119
139
#[ derive( Debug ) ]
@@ -123,6 +143,7 @@ pub struct VaList<'a, 'f: 'a> {
123
143
not( target_arch = "aarch64" ) ,
124
144
not( target_arch = "powerpc" ) ,
125
145
not( target_arch = "s390x" ) ,
146
+ not( target_arch = "xtensa" ) ,
126
147
not( target_arch = "x86_64" )
127
148
) ,
128
149
all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -137,6 +158,7 @@ pub struct VaList<'a, 'f: 'a> {
137
158
target_arch = "aarch64" ,
138
159
target_arch = "powerpc" ,
139
160
target_arch = "s390x" ,
161
+ target_arch = "xtensa" ,
140
162
target_arch = "x86_64"
141
163
) ,
142
164
any( not( target_arch = "aarch64" ) , not( target_vendor = "apple" ) ) ,
@@ -154,6 +176,7 @@ pub struct VaList<'a, 'f: 'a> {
154
176
not( target_arch = "aarch64" ) ,
155
177
not( target_arch = "powerpc" ) ,
156
178
not( target_arch = "s390x" ) ,
179
+ not( target_arch = "xtensa" ) ,
157
180
not( target_arch = "x86_64" )
158
181
) ,
159
182
all( target_arch = "aarch64" , target_vendor = "apple" ) ,
@@ -174,6 +197,7 @@ impl<'f> VaListImpl<'f> {
174
197
target_arch = "aarch64" ,
175
198
target_arch = "powerpc" ,
176
199
target_arch = "s390x" ,
200
+ target_arch = "xtensa" ,
177
201
target_arch = "x86_64"
178
202
) ,
179
203
any( not( target_arch = "aarch64" ) , not( target_vendor = "apple" ) ) ,
0 commit comments