@@ -60,7 +60,7 @@ macro_rules! check { ($func:ident, $ty:ty, $class:ident, $mov:literal) => {
6060} ; }
6161
6262macro_rules! check_reg { ( $func: ident, $ty: ty, $reg: tt, $mov: literal) => {
63-
63+ # [ no_mangle ]
6464 pub unsafe fn $func( x: $ty) -> $ty {
6565 dont_merge( stringify!( func) ) ;
6666
@@ -70,17 +70,57 @@ macro_rules! check_reg { ($func:ident, $ty:ty, $reg:tt, $mov:literal) => {
7070 }
7171} ; }
7272
73- // systemz -LABEL: sym_fn_32:
74- // systemz : #APP
75- // systemz : brasl %r14, extern_func@PLT
76- // systemz : #NO_APP
73+ // CHECK -LABEL: sym_fn_32:
74+ // CHECK : #APP
75+ // CHECK : brasl %r14, extern_func
76+ // CHECK : #NO_APP
7777#[ cfg( s390x) ]
78+ #[ no_mangle]
7879pub unsafe fn sym_fn_32 ( ) {
7980 asm ! ( "brasl %r14, {}" , sym extern_func) ;
8081}
8182
83+ // CHECK-LABEL: sym_static:
84+ // CHECK: #APP
85+ // CHECK: brasl %r14, extern_static
86+ // CHECK: #NO_APP
87+ #[ no_mangle]
88+ pub unsafe fn sym_static ( ) {
89+ asm ! ( "brasl %r14, {}" , sym extern_static) ;
90+ }
91+
92+ // CHECK-LABEL: reg_i8:
93+ // CHECK: #APP
94+ // CHECK: lgr %r{{[0-9]+}}, %r{{[0-9]+}}
95+ // CHECK: #NO_APP
96+ check ! ( reg_i8, i8 , reg, "lgr" ) ;
97+
98+ // CHECK-LABEL: reg_i16:
99+ // CHECK: #APP
100+ // CHECK: lgr %r{{[0-9]+}}, %r{{[0-9]+}}
101+ // CHECK: #NO_APP
102+ check ! ( reg_i16, i16 , reg, "lgr" ) ;
103+
82104// CHECK-LABEL: reg_i32:
83105// CHECK: #APP
84- // CHECK: lgr r{{[0-15 ]+}}, r{{[0-15 ]+}}
106+ // CHECK: lgr % r{{[0-9 ]+}}, % r{{[0-9 ]+}}
85107// CHECK: #NO_APP
86108check ! ( reg_i32, i32 , reg, "lgr" ) ;
109+
110+ // CHECK-LABEL: reg_i64:
111+ // CHECK: #APP
112+ // CHECK: lgr %r{{[0-9]+}}, %r{{[0-9]+}}
113+ // CHECK: #NO_APP
114+ check ! ( reg_i64, i64 , reg, "lgr" ) ;
115+
116+ // CHECK-LABEL: reg_f32:
117+ // CHECK: #APP
118+ // CHECK: ler %f{{[0-9]+}}, %f{{[0-9]+}}
119+ // CHECK: #NO_APP
120+ check ! ( reg_f32, f32 , freg, "ler" ) ;
121+
122+ // CHECK-LABEL: reg_f64:
123+ // CHECK: #APP
124+ // CHECK: ldr %f{{[0-9]+}}, %f{{[0-9]+}}
125+ // CHECK: #NO_APP
126+ check ! ( reg_f64, f64 , freg, "ldr" ) ;
0 commit comments