diff options
| author | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-14 18:49:34 +0100 |
|---|---|---|
| committer | Sebastiano Tronto <sebastiano@tronto.net> | 2023-11-14 18:49:34 +0100 |
| commit | ce25bbd863904ac7784b647b6b8e22196e7674ff (patch) | |
| tree | e4e11995999db844bee50692e63d5c117af3e2f9 /src/blog/2023-11-14-test-visibility-c-macro/main2.s | |
| parent | 5ed505e280c6c6a7459bb2e4249313fa65df052f (diff) | |
| download | sebastiano.tronto.net-ce25bbd863904ac7784b647b6b8e22196e7674ff.tar.gz sebastiano.tronto.net-ce25bbd863904ac7784b647b6b8e22196e7674ff.zip | |
Added blog post
Diffstat (limited to 'src/blog/2023-11-14-test-visibility-c-macro/main2.s')
| -rw-r--r-- | src/blog/2023-11-14-test-visibility-c-macro/main2.s | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/blog/2023-11-14-test-visibility-c-macro/main2.s b/src/blog/2023-11-14-test-visibility-c-macro/main2.s new file mode 100644 index 0000000..a3f580e --- /dev/null +++ b/src/blog/2023-11-14-test-visibility-c-macro/main2.s | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | .text | ||
| 2 | .file "main2.c" | ||
| 3 | .globl foo # -- Begin function foo | ||
| 4 | .p2align 4, 0x90 | ||
| 5 | .type foo,@function | ||
| 6 | foo: # @foo | ||
| 7 | .cfi_startproc | ||
| 8 | # %bb.0: | ||
| 9 | imull $42, %edi, %ecx | ||
| 10 | imull $-69, %esi, %eax | ||
| 11 | addl %ecx, %eax | ||
| 12 | retq | ||
| 13 | .Lfunc_end0: | ||
| 14 | .size foo, .Lfunc_end0-foo | ||
| 15 | .cfi_endproc | ||
| 16 | # -- End function | ||
| 17 | .globl main # -- Begin function main | ||
| 18 | .p2align 4, 0x90 | ||
| 19 | .type main,@function | ||
| 20 | main: # @main | ||
| 21 | .cfi_startproc | ||
| 22 | # %bb.0: | ||
| 23 | pushq %rax | ||
| 24 | .cfi_def_cfa_offset 16 | ||
| 25 | leaq .L.str(%rip), %rdi | ||
| 26 | movl $351, %esi # imm = 0x15F | ||
| 27 | xorl %eax, %eax | ||
| 28 | callq printf@PLT | ||
| 29 | xorl %eax, %eax | ||
| 30 | popq %rcx | ||
| 31 | .cfi_def_cfa_offset 8 | ||
| 32 | retq | ||
| 33 | .Lfunc_end1: | ||
| 34 | .size main, .Lfunc_end1-main | ||
| 35 | .cfi_endproc | ||
| 36 | # -- End function | ||
| 37 | .type .L.str,@object # @.str | ||
| 38 | .section .rodata.str1.1,"aMS",@progbits,1 | ||
| 39 | .L.str: | ||
| 40 | .asciz "%d\n" | ||
| 41 | .size .L.str, 4 | ||
| 42 | |||
| 43 | .ident "clang version 15.0.7" | ||
| 44 | .section ".note.GNU-stack","",@progbits | ||
| 45 | .addrsig | ||
