Print this page
3544 save-args matcher could be considerably more robust
3545 save-args matcher should accept saves may be out-of-order
Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
Reviewed by: Robert Mustacchi <rm@joyent.com>


  47 movq    %rbx, -0x38(%rbp)
  48 movq    %r8, -0x28(%rbp)
  49 movq    %rcx, -0x20(%rbp)
  50 movq    %rdx, -0x18(%rbp)
  51 movq    %rsi, -0x10(%rbp)
  52 movq    %rdi, -0x8(%rbp)
  53 subq    $0x70, %rsp
  54 SET_SIZE(gcc_mov_align, gcc_mov_align_end)
  55 
  56 FUNC(gcc_mov_basic)
  57 pushq   %rbp
  58 movq    %rsp, %rbp
  59 movq    %rbx,-0x28(%rbp)
  60 movq    %rcx,-0x20(%rbp)
  61 movq    %rdx,-0x18(%rbp)
  62 movq    %rsi,-0x10(%rbp)
  63 movq    %rdi,-0x8(%rbp)
  64 subq    $0x50,%rsp
  65 SET_SIZE(gcc_mov_basic, gcc_mov_basic_end)
  66 











  67 FUNC(gcc_mov_big_struct_ret)
  68 pushq   %rbp
  69 movq    %rsp,%rbp
  70 movq    %rbx,-0x28(%rbp)
  71 movq    %r8,-0x20(%rbp)
  72 movq    %rcx,-0x18(%rbp)
  73 movq    %rdx,-0x10(%rbp)
  74 movq    %rsi,-0x8(%rbp)
  75 subq    $0x50,%rsp
  76 SET_SIZE(gcc_mov_big_struct_ret, gcc_mov_big_struct_ret_end)
  77 











  78 FUNC(gcc_mov_big_struct_ret_and_spill)
  79 pushq   %rbp
  80 movq    %rsp,%rbp
  81 movq    %rbx,-0x38(%rbp)
  82 movq    %r9,-0x28(%rbp)
  83 movq    %r8,-0x20(%rbp)
  84 movq    %rcx,-0x18(%rbp)
  85 movq    %rdx,-0x10(%rbp)
  86 movq    %rsi,-0x8(%rbp)
  87 subq    $0x90,%rsp
  88 SET_SIZE(gcc_mov_big_struct_ret_and_spill, gcc_mov_big_struct_ret_and_spill_end)
  89 
  90 FUNC(gcc_mov_small_struct_ret)
  91 pushq   %rbp
  92 movq    %rsp,%rbp
  93 movq    %rbx,-0x28(%rbp)
  94 movq    %rcx,-0x20(%rbp)
  95 movq    %rdx,-0x18(%rbp)
  96 movq    %rsi,-0x10(%rbp)
  97 movq    %rdi,-0x8(%rbp)


 129 movq    %rsp,%rbp
 130 pushq   %rdi
 131 pushq   %rsi
 132 pushq   %rdx
 133 pushq   %rcx
 134 pushq   %r8
 135 subq    $0x8,%rsp
 136 subq    $0x30,%rsp
 137 SET_SIZE(gcc_push_align, gcc_push_align_end)
 138 
 139 FUNC(gcc_push_basic)
 140 pushq   %rbp
 141 movq    %rsp,%rbp
 142 pushq   %rdi
 143 pushq   %rsi
 144 pushq   %rdx
 145 pushq   %rcx
 146 subq    $0x20,%rsp
 147 SET_SIZE(gcc_push_basic, gcc_push_basic_end)
 148 










 149 FUNC(gcc_push_big_struct_ret)
 150 pushq   %rbp
 151 movq    %rsp,%rbp
 152 pushq   %rsi
 153 pushq   %rdx
 154 pushq   %rcx
 155 pushq   %r8
 156 subq    $0x30,%rsp
 157 SET_SIZE(gcc_push_big_struct_ret, gcc_push_big_struct_ret_end)
 158 










 159 FUNC(gcc_push_big_struct_ret_and_spill)
 160 pushq   %rbp
 161 movq    %rsp,%rbp
 162 pushq   %rsi
 163 pushq   %rdx
 164 pushq   %rcx
 165 pushq   %r8
 166 pushq   %r9
 167 subq    $0x8,%rsp
 168 subq    $0x50,%rsp
 169 SET_SIZE(gcc_push_big_struct_ret_and_spill, gcc_push_big_struct_ret_and_spill_end)
 170 
 171 FUNC(gcc_push_small_struct_ret)
 172 pushq   %rbp
 173 movq    %rsp,%rbp
 174 pushq   %rdi
 175 pushq   %rsi
 176 pushq   %rdx
 177 pushq   %rcx
 178 subq    $0x20,%rsp


 377 movl   $0x0,%eax
 378 leave
 379 ret
 380 SET_SIZE(big_struct_ret_w_float, big_struct_ret_w_float_end)
 381 
 382 FUNC(big_struct_arg_by_value)
 383 pushq   %rbp
 384 movq    %rsp,%rbp
 385 movq    %rdi,-0x8(%rbp)
 386 subq    $0x40,%rsp
 387 SET_SIZE(big_struct_arg_by_value, big_struct_arg_by_value_end)
 388 
 389 FUNC(small_struct_arg_by_value)
 390 pushq   %rbp
 391 movq    %rsp,%rbp
 392 movq    %rdx,-0x18(%rbp)
 393 movq    %rsi,-0x10(%rbp)
 394 movq    %rdi,-0x8(%rbp)
 395 subq    $0x50,%rsp
 396 SET_SIZE(small_struct_arg_by_value, small_struct_arg_by_value_end)


















  47 movq    %rbx, -0x38(%rbp)
  48 movq    %r8, -0x28(%rbp)
  49 movq    %rcx, -0x20(%rbp)
  50 movq    %rdx, -0x18(%rbp)
  51 movq    %rsi, -0x10(%rbp)
  52 movq    %rdi, -0x8(%rbp)
  53 subq    $0x70, %rsp
  54 SET_SIZE(gcc_mov_align, gcc_mov_align_end)
  55 
  56 FUNC(gcc_mov_basic)
  57 pushq   %rbp
  58 movq    %rsp, %rbp
  59 movq    %rbx,-0x28(%rbp)
  60 movq    %rcx,-0x20(%rbp)
  61 movq    %rdx,-0x18(%rbp)
  62 movq    %rsi,-0x10(%rbp)
  63 movq    %rdi,-0x8(%rbp)
  64 subq    $0x50,%rsp
  65 SET_SIZE(gcc_mov_basic, gcc_mov_basic_end)
  66 
  67 FUNC(gcc_mov_noorder)
  68 pushq   %rbp
  69 movq    %rsp, %rbp
  70 movq    %rcx,-0x20(%rbp)
  71 movq    %rbx,-0x28(%rbp)
  72 movq    %rdi,-0x8(%rbp)
  73 movq    %rdx,-0x18(%rbp)
  74 movq    %rsi,-0x10(%rbp)
  75 subq    $0x50,%rsp
  76 SET_SIZE(gcc_mov_noorder, gcc_mov_noorder_end)
  77         
  78 FUNC(gcc_mov_big_struct_ret)
  79 pushq   %rbp
  80 movq    %rsp,%rbp
  81 movq    %rbx,-0x28(%rbp)
  82 movq    %r8,-0x20(%rbp)
  83 movq    %rcx,-0x18(%rbp)
  84 movq    %rdx,-0x10(%rbp)
  85 movq    %rsi,-0x8(%rbp)
  86 subq    $0x50,%rsp
  87 SET_SIZE(gcc_mov_big_struct_ret, gcc_mov_big_struct_ret_end)
  88 
  89 FUNC(gcc_mov_struct_noorder)
  90 pushq   %rbp
  91 movq    %rsp,%rbp
  92 movq    %rcx,-0x18(%rbp)
  93 movq    %r8,-0x20(%rbp)
  94 movq    %rsi,-0x8(%rbp)
  95 movq    %rdx,-0x10(%rbp)
  96 movq    %rbx,-0x28(%rbp)
  97 subq    $0x50,%rsp
  98 SET_SIZE(gcc_mov_struct_noorder, gcc_mov_struct_noorder_end)
  99 
 100 FUNC(gcc_mov_big_struct_ret_and_spill)
 101 pushq   %rbp
 102 movq    %rsp,%rbp
 103 movq    %rbx,-0x38(%rbp)
 104 movq    %r9,-0x28(%rbp)
 105 movq    %r8,-0x20(%rbp)
 106 movq    %rcx,-0x18(%rbp)
 107 movq    %rdx,-0x10(%rbp)
 108 movq    %rsi,-0x8(%rbp)
 109 subq    $0x90,%rsp
 110 SET_SIZE(gcc_mov_big_struct_ret_and_spill, gcc_mov_big_struct_ret_and_spill_end)
 111 
 112 FUNC(gcc_mov_small_struct_ret)
 113 pushq   %rbp
 114 movq    %rsp,%rbp
 115 movq    %rbx,-0x28(%rbp)
 116 movq    %rcx,-0x20(%rbp)
 117 movq    %rdx,-0x18(%rbp)
 118 movq    %rsi,-0x10(%rbp)
 119 movq    %rdi,-0x8(%rbp)


 151 movq    %rsp,%rbp
 152 pushq   %rdi
 153 pushq   %rsi
 154 pushq   %rdx
 155 pushq   %rcx
 156 pushq   %r8
 157 subq    $0x8,%rsp
 158 subq    $0x30,%rsp
 159 SET_SIZE(gcc_push_align, gcc_push_align_end)
 160 
 161 FUNC(gcc_push_basic)
 162 pushq   %rbp
 163 movq    %rsp,%rbp
 164 pushq   %rdi
 165 pushq   %rsi
 166 pushq   %rdx
 167 pushq   %rcx
 168 subq    $0x20,%rsp
 169 SET_SIZE(gcc_push_basic, gcc_push_basic_end)
 170 
 171 FUNC(gcc_push_noorder)
 172 pushq   %rbp
 173 movq    %rsp,%rbp
 174 pushq   %rsi
 175 pushq   %rdi
 176 pushq   %rcx
 177 pushq   %rdx
 178 subq    $0x20,%rsp
 179 SET_SIZE(gcc_push_noorder, gcc_push_noorder_end)
 180 
 181 FUNC(gcc_push_big_struct_ret)
 182 pushq   %rbp
 183 movq    %rsp,%rbp
 184 pushq   %rsi
 185 pushq   %rdx
 186 pushq   %rcx
 187 pushq   %r8
 188 subq    $0x30,%rsp
 189 SET_SIZE(gcc_push_big_struct_ret, gcc_push_big_struct_ret_end)
 190 
 191 FUNC(gcc_push_struct_noorder)
 192 pushq   %rbp
 193 movq    %rsp,%rbp
 194 pushq   %rdx
 195 pushq   %rsi
 196 pushq   %r8
 197 pushq   %rcx
 198 subq    $0x30,%rsp
 199 SET_SIZE(gcc_push_struct_noorder, gcc_push_struct_noorder_end)
 200         
 201 FUNC(gcc_push_big_struct_ret_and_spill)
 202 pushq   %rbp
 203 movq    %rsp,%rbp
 204 pushq   %rsi
 205 pushq   %rdx
 206 pushq   %rcx
 207 pushq   %r8
 208 pushq   %r9
 209 subq    $0x8,%rsp
 210 subq    $0x50,%rsp
 211 SET_SIZE(gcc_push_big_struct_ret_and_spill, gcc_push_big_struct_ret_and_spill_end)
 212 
 213 FUNC(gcc_push_small_struct_ret)
 214 pushq   %rbp
 215 movq    %rsp,%rbp
 216 pushq   %rdi
 217 pushq   %rsi
 218 pushq   %rdx
 219 pushq   %rcx
 220 subq    $0x20,%rsp


 419 movl   $0x0,%eax
 420 leave
 421 ret
 422 SET_SIZE(big_struct_ret_w_float, big_struct_ret_w_float_end)
 423 
 424 FUNC(big_struct_arg_by_value)
 425 pushq   %rbp
 426 movq    %rsp,%rbp
 427 movq    %rdi,-0x8(%rbp)
 428 subq    $0x40,%rsp
 429 SET_SIZE(big_struct_arg_by_value, big_struct_arg_by_value_end)
 430 
 431 FUNC(small_struct_arg_by_value)
 432 pushq   %rbp
 433 movq    %rsp,%rbp
 434 movq    %rdx,-0x18(%rbp)
 435 movq    %rsi,-0x10(%rbp)
 436 movq    %rdi,-0x8(%rbp)
 437 subq    $0x50,%rsp
 438 SET_SIZE(small_struct_arg_by_value, small_struct_arg_by_value_end)
 439 
 440 FUNC(interleaved_argument_saves)
 441 pushq   %rbp
 442 movq    %rdi,%rax
 443 shlq    $0x21,%rax
 444 movq    %rsp,%rbp
 445 shrq    $0x29,%rax
 446 subq    $0x30,%rsp
 447 movq    %rdi,-0x8(%rbp)
 448 movq    %rbx,-0x28(%rbp)
 449 movzbl  %dil,%edi
 450 movq    %rcx,-0x20(%rbp)
 451 movq    %rdx,-0x18(%rbp)
 452 movq    %rsi,-0x10(%rbp)
 453 movq    0x0(,%rax,8),%rax
 454 SET_SIZE(interleaved_argument_saves, interleaved_argument_saves_end)