Advertisement
Guest User

RUST Boxing of stack-allocated value

a guest
Apr 13th, 2015
640
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     .text
  2.     .file   "rust_out.0.rs"
  3.     .section    .text._ZN4main20h1b0ee7751a0669e4iaaE,"ax",@progbits
  4.     .align  16, 0x90
  5.     .type   _ZN4main20h1b0ee7751a0669e4iaaE,@function
  6. _ZN4main20h1b0ee7751a0669e4iaaE:
  7.     .cfi_startproc
  8.     cmpq    %fs:112, %rsp
  9.     ja  .LBB0_2
  10.     movabsq $88, %r10
  11.     movabsq $0, %r11
  12.     callq   __morestack
  13.     retq
  14. .LBB0_2:
  15.     pushq   %rbx
  16. .Ltmp0:
  17.     .cfi_def_cfa_offset 16
  18.     subq    $80, %rsp
  19. .Ltmp1:
  20.     .cfi_def_cfa_offset 96
  21. .Ltmp2:
  22.     .cfi_offset %rbx, -16
  23.     movl    $1, 72(%rsp)
  24.     movq    _ZN3fmt3num16i32.fmt..Display3fmt20he8730d9eb37a86628NLE@GOTPCREL(%rip), %rax
  25.     movq    %rax, 8(%rsp)
  26.     leaq    72(%rsp), %rax
  27.     movq    %rax, (%rsp)
  28.     movups  _ZN4main15__STATIC_FMTSTR20h910e8b82b4c5a8feyaaE(%rip), %xmm0
  29.     movaps  %xmm0, 16(%rsp)
  30.     xorps   %xmm0, %xmm0
  31.     movaps  %xmm0, 32(%rsp)
  32.     leaq    (%rsp), %rax
  33.     movq    %rax, 48(%rsp)
  34.     movq    $1, 56(%rsp)
  35.     leaq    16(%rsp), %rdi
  36.     callq   _ZN2io5stdio6_print20h494510ac6720bf89aNhE@PLT
  37.     movl    72(%rsp), %ebx
  38.     movl    $4, %edi
  39.     xorl    %esi, %esi
  40.     callq   je_mallocx@PLT
  41.     testq   %rax, %rax
  42.     je  .LBB0_6
  43.     movl    %ebx, (%rax)
  44.     movabsq $2097865012304223517, %rcx
  45.     cmpq    %rcx, %rax
  46.     je  .LBB0_5
  47.     movl    $4, %esi
  48.     xorl    %edx, %edx
  49.     movq    %rax, %rdi
  50.     callq   je_sdallocx@PLT
  51. .LBB0_5:
  52.     addq    $80, %rsp
  53.     popq    %rbx
  54.     retq
  55. .LBB0_6:
  56.     callq   _ZN3oom20he7076b57c17ed7c6HYaE@PLT
  57. .Ltmp3:
  58.     .size   _ZN4main20h1b0ee7751a0669e4iaaE, .Ltmp3-_ZN4main20h1b0ee7751a0669e4iaaE
  59.     .cfi_endproc
  60.  
  61.     .section    .text.main,"ax",@progbits
  62.     .globl  main
  63.     .align  16, 0x90
  64.     .type   main,@function
  65. main:
  66.     .cfi_startproc
  67.     movq    %rsi, %rax
  68.     movq    %rdi, %rcx
  69.     leaq    _ZN4main20h1b0ee7751a0669e4iaaE(%rip), %rdi
  70.     movq    %rcx, %rsi
  71.     movq    %rax, %rdx
  72.     jmp _ZN2rt10lang_start20he050f8de3bcc02b7VRIE@PLT
  73. .Ltmp4:
  74.     .size   main, .Ltmp4-main
  75.     .cfi_endproc
  76.  
  77.     .type   str1056,@object
  78.     .section    .rodata.str1056,"a",@progbits
  79. str1056:
  80.     .size   str1056, 0
  81.  
  82.     .type   str1057,@object
  83.     .section    .rodata.str1057,"a",@progbits
  84. str1057:
  85.     .byte   10
  86.     .size   str1057, 1
  87.  
  88.     .type   ref31,@object
  89.     .section    .data.rel.ro.local.ref31,"aw",@progbits
  90.     .align  16
  91. ref31:
  92.     .quad   str1056
  93.     .quad   0
  94.     .quad   str1057
  95.     .quad   1
  96.     .size   ref31, 32
  97.  
  98.     .type   _ZN4main15__STATIC_FMTSTR20h910e8b82b4c5a8feyaaE,@object
  99.     .section    .data.rel.ro.local._ZN4main15__STATIC_FMTSTR20h910e8b82b4c5a8feyaaE,"aw",@progbits
  100.     .align  8
  101. _ZN4main15__STATIC_FMTSTR20h910e8b82b4c5a8feyaaE:
  102.     .quad   ref31
  103.     .quad   2
  104.     .size   _ZN4main15__STATIC_FMTSTR20h910e8b82b4c5a8feyaaE, 16
  105.  
  106.  
  107.     .section    ".note.GNU-stack","",@progbits
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement