@@ -71,46 +71,6 @@ pub fn validate_array_mut<T, const COUNT: usize>(ptr: *mut T) -> Option<&'static
71
71
slice. map ( |e| unsafe { & mut * ( e. as_ptr ( ) as * mut [ T ; COUNT ] ) } )
72
72
}
73
73
74
- pub macro intel_asm( $( $code: expr, ) +) {
75
- core:: arch:: global_asm!( concat!( $( $code) , +, ) ) ;
76
- }
77
-
78
- pub macro const_unsafe( $( $vis: vis const $name: ident: $ty: ty = $value: expr; ) * ) {
79
- $(
80
- $vis const $name: $ty = unsafe { $value } ;
81
- ) *
82
- }
83
-
84
- pub macro intel_fn {
85
- (
86
- $( #! [ $total: meta] ) *
87
-
88
- $( #[ $outer: meta] ) * $fn_vis: vis extern "asm" fn $name: ident( $( $arg_name: ident : $arg_type: ty) , * ) { $( $body: expr, ) + }
89
- $( pub extern "asm" $label_name: expr => { $( $label_body: expr, ) + } ) *
90
- ) => {
91
- $( #[ $total] ) *
92
- $crate:: utils:: intel_asm!(
93
- ".global " , stringify!( $name) , "\n " ,
94
- ".type " , stringify!( $name) , ", @function\n " ,
95
- ".section .text." , stringify!( $name) , ", \" ax\" , @progbits\n " ,
96
- stringify!( $name) , ":\n " ,
97
- $( $body) , +,
98
- $(
99
- stringify!( $label_name) , ":\n " ,
100
- $( $label_body) , +,
101
- ) *
102
- ".size " , stringify!( $name) , ", . - " , stringify!( $name) , "\n " ,
103
- ".text\n " ,
104
- ) ;
105
-
106
- $( #[ $total] ) *
107
- extern "C" {
108
- $( #[ $outer] ) *
109
- $fn_vis fn $name( $( $arg_name : $arg_type) , * ) ;
110
- }
111
- }
112
- }
113
-
114
74
pub trait Downcastable : Any + Send + Sync {
115
75
fn as_any ( self : Arc < Self > ) -> Arc < dyn Any + Send + Sync > ;
116
76
}
0 commit comments