Advertisement
Guest User

Optimized code

a guest
May 17th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .section    __TEXT,__text,regular,pure_instructions
  2.     .macosx_version_min 10, 12
  3.     .globl  _spice_alignment_warning
  4.     .p2align    4, 0x90
  5. _spice_alignment_warning:               ## @spice_alignment_warning
  6.     .cfi_startproc
  7. ## BB#0:
  8.     pushq   %rbp
  9. Ltmp0:
  10.     .cfi_def_cfa_offset 16
  11. Ltmp1:
  12.     .cfi_offset %rbp, -16
  13.     movq    %rsp, %rbp
  14. Ltmp2:
  15.     .cfi_def_cfa_register %rbp
  16.     leaq    L_str(%rip), %rdi
  17.     popq    %rbp
  18.     jmp _puts                   ## TAILCALL
  19.     .cfi_endproc
  20.  
  21.     .globl  _spice_alignment_debug
  22.     .p2align    4, 0x90
  23. _spice_alignment_debug:                 ## @spice_alignment_debug
  24.     .cfi_startproc
  25. ## BB#0:
  26.     pushq   %rbp
  27. Ltmp3:
  28.     .cfi_def_cfa_offset 16
  29. Ltmp4:
  30.     .cfi_offset %rbp, -16
  31.     movq    %rsp, %rbp
  32. Ltmp5:
  33.     .cfi_def_cfa_register %rbp
  34.     leaq    L_str.4(%rip), %rdi
  35.     popq    %rbp
  36.     jmp _puts                   ## TAILCALL
  37.     .cfi_endproc
  38.  
  39.     .globl  _main
  40.     .p2align    4, 0x90
  41. _main:                                  ## @main
  42.     .cfi_startproc
  43. ## BB#0:
  44.     pushq   %rbp
  45. Ltmp6:
  46.     .cfi_def_cfa_offset 16
  47. Ltmp7:
  48.     .cfi_offset %rbp, -16
  49.     movq    %rsp, %rbp
  50. Ltmp8:
  51.     .cfi_def_cfa_register %rbp
  52.     movl    $27, %edi
  53.     callq   _malloc
  54.  
  55. ## A single instruction to test
  56.     testb   $7, %al
  57.  
  58. ## Fall through jump not taken, cost presumably 0 cycles
  59.     jne LBB2_1
  60. LBB2_2:
  61.     xorl    %eax, %eax
  62.     popq    %rbp
  63.     retq
  64. LBB2_1:
  65.     leaq    L_str(%rip), %rdi
  66.     callq   _puts
  67.     jmp LBB2_2
  68.     .cfi_endproc
  69.  
  70.     .section    __TEXT,__cstring,cstring_literals
  71. L_str:                                  ## @str
  72.     .asciz  "warning"
  73.  
  74. L_str.4:                                ## @str.4
  75.     .asciz  "debug"
  76.  
  77.  
  78. .subsections_via_symbols
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement