6
6
#![ feature( naked_functions) ]
7
7
use std:: arch:: naked_asm;
8
8
9
- // CHECK: Function Attrs: naked
10
- // CHECK-NEXT: define{{.*}}void @naked_empty()
9
+ // CHECK: module asm ".intel_syntax"
10
+ // CHECK: .pushsection .text.naked_empty,\22ax\22, @progbits
11
+ // CHECK: .balign 4"
12
+ // CHECK: .globl naked_empty"
13
+ // CHECK: .hidden naked_empty"
14
+ // CHECK: .type naked_empty, @function"
15
+ // CHECK-LABEL: naked_empty:
16
+ // CHECK: ret
17
+ // CHECK: .popsection
18
+ // CHECK: .att_syntax
19
+
11
20
#[ no_mangle]
12
21
#[ naked]
13
22
pub unsafe extern "C" fn naked_empty ( ) {
@@ -17,8 +26,19 @@ pub unsafe extern "C" fn naked_empty() {
17
26
naked_asm ! ( "ret" ) ;
18
27
}
19
28
20
- // CHECK: Function Attrs: naked
21
- // CHECK-NEXT: define{{.*}}i{{[0-9]+}} @naked_with_args_and_return(i64 %0, i64 %1)
29
+ // CHECK: .intel_syntax
30
+ // CHECK: .pushsection .text.naked_with_args_and_return,\22ax\22, @progbits
31
+ // CHECK: .balign 4
32
+ // CHECK: .globl naked_with_args_and_return
33
+ // CHECK: .hidden naked_with_args_and_return
34
+ // CHECK: .type naked_with_args_and_return, @function
35
+ // CHECK-LABEL: naked_with_args_and_return:
36
+ // CHECK: lea rax, [rdi + rsi]
37
+ // CHECK: ret
38
+ // CHECK: .size naked_with_args_and_return, . - naked_with_args_and_return
39
+ // CHECK: .popsection
40
+ // CHECK: .att_syntax
41
+
22
42
#[ no_mangle]
23
43
#[ naked]
24
44
pub unsafe extern "C" fn naked_with_args_and_return ( a : isize , b : isize ) -> isize {
0 commit comments