@@ -262,8 +262,65 @@ macro_rules! or {
262262 } ;
263263}
264264
265- // See `generate_aarch64_outlined_atomics` in build.rs.
266- include ! ( concat!( env!( "OUT_DIR" ) , "/outlined_atomics.rs" ) ) ;
265+ macro_rules! foreach_ordering {
266+ ( $macro: path, $bytes: tt, $name: ident) => {
267+ $macro!( Relaxed , $bytes, ${ concat( $name, _relax) } ) ;
268+ $macro!( Acquire , $bytes, ${ concat( $name, _acq) } ) ;
269+ $macro!( Release , $bytes, ${ concat( $name, _rel) } ) ;
270+ $macro!( AcqRel , $bytes, ${ concat( $name, _acq_rel) } ) ;
271+ } ;
272+ ( $macro: path, $name: ident) => {
273+ $macro!( Relaxed , ${ concat( $name, _relax) } ) ;
274+ $macro!( Acquire , ${ concat( $name, _acq) } ) ;
275+ $macro!( Release , ${ concat( $name, _rel) } ) ;
276+ $macro!( AcqRel , ${ concat( $name, _acq_rel) } ) ;
277+ } ;
278+ }
279+
280+ macro_rules! foreach_bytes {
281+ ( $macro: path, $name: ident) => {
282+ foreach_ordering!( $macro, 1 , ${ concat( __aarch64_, $name, "1" ) } ) ;
283+ foreach_ordering!( $macro, 2 , ${ concat( __aarch64_, $name, "2" ) } ) ;
284+ foreach_ordering!( $macro, 4 , ${ concat( __aarch64_, $name, "4" ) } ) ;
285+ foreach_ordering!( $macro, 8 , ${ concat( __aarch64_, $name, "8" ) } ) ;
286+ } ;
287+ }
288+ macro_rules! foreach_cas {
289+ ( $macro: path) => {
290+ foreach_bytes!( $macro, cas) ;
291+ } ;
292+ }
293+ macro_rules! foreach_cas16 {
294+ ( $macro: path) => {
295+ foreach_ordering!( $macro, __aarch64_cas16) ;
296+ } ;
297+ }
298+ macro_rules! foreach_swp {
299+ ( $macro: path) => {
300+ foreach_bytes!( $macro, swp) ;
301+ } ;
302+ }
303+ macro_rules! foreach_ldadd {
304+ ( $macro: path) => {
305+ foreach_bytes!( $macro, ldadd) ;
306+ } ;
307+ }
308+ macro_rules! foreach_ldclr {
309+ ( $macro: path) => {
310+ foreach_bytes!( $macro, ldclr) ;
311+ } ;
312+ }
313+ macro_rules! foreach_ldeor {
314+ ( $macro: path) => {
315+ foreach_bytes!( $macro, ldeor) ;
316+ } ;
317+ }
318+ macro_rules! foreach_ldset {
319+ ( $macro: path) => {
320+ foreach_bytes!( $macro, ldset) ;
321+ } ;
322+ }
323+
267324foreach_cas ! ( compare_and_swap) ;
268325foreach_cas16 ! ( compare_and_swap_i128) ;
269326foreach_swp ! ( swap) ;
0 commit comments