Print this page
saveargs: Implement as libsaveargs

Split Close
Expand all
Collapse all
          --- old/usr/src/common/saveargs/tests/testmatch/data.s
          +++ new/usr/src/lib/libsaveargs/tests/testmatch/data.s
↓ open down ↓ 56 lines elided ↑ open up ↑
  57   57  pushq   %rbp
  58   58  movq    %rsp, %rbp
  59   59  movq    %rbx,-0x28(%rbp)
  60   60  movq    %rcx,-0x20(%rbp)
  61   61  movq    %rdx,-0x18(%rbp)
  62   62  movq    %rsi,-0x10(%rbp)
  63   63  movq    %rdi,-0x8(%rbp)
  64   64  subq    $0x50,%rsp
  65   65  SET_SIZE(gcc_mov_basic, gcc_mov_basic_end)
  66   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 +        
  67   78  FUNC(gcc_mov_big_struct_ret)
  68   79  pushq   %rbp
  69   80  movq    %rsp,%rbp
  70   81  movq    %rbx,-0x28(%rbp)
  71   82  movq    %r8,-0x20(%rbp)
  72   83  movq    %rcx,-0x18(%rbp)
  73   84  movq    %rdx,-0x10(%rbp)
  74   85  movq    %rsi,-0x8(%rbp)
  75   86  subq    $0x50,%rsp
  76   87  SET_SIZE(gcc_mov_big_struct_ret, gcc_mov_big_struct_ret_end)
  77   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 +
  78  100  FUNC(gcc_mov_big_struct_ret_and_spill)
  79  101  pushq   %rbp
  80  102  movq    %rsp,%rbp
  81  103  movq    %rbx,-0x38(%rbp)
  82  104  movq    %r9,-0x28(%rbp)
  83  105  movq    %r8,-0x20(%rbp)
  84  106  movq    %rcx,-0x18(%rbp)
  85  107  movq    %rdx,-0x10(%rbp)
  86  108  movq    %rsi,-0x8(%rbp)
  87  109  subq    $0x90,%rsp
↓ open down ↓ 51 lines elided ↑ open up ↑
 139  161  FUNC(gcc_push_basic)
 140  162  pushq   %rbp
 141  163  movq    %rsp,%rbp
 142  164  pushq   %rdi
 143  165  pushq   %rsi
 144  166  pushq   %rdx
 145  167  pushq   %rcx
 146  168  subq    $0x20,%rsp
 147  169  SET_SIZE(gcc_push_basic, gcc_push_basic_end)
 148  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 +
 149  181  FUNC(gcc_push_big_struct_ret)
 150  182  pushq   %rbp
 151  183  movq    %rsp,%rbp
 152  184  pushq   %rsi
 153  185  pushq   %rdx
 154  186  pushq   %rcx
 155  187  pushq   %r8
 156  188  subq    $0x30,%rsp
 157  189  SET_SIZE(gcc_push_big_struct_ret, gcc_push_big_struct_ret_end)
 158  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 +        
 159  201  FUNC(gcc_push_big_struct_ret_and_spill)
 160  202  pushq   %rbp
 161  203  movq    %rsp,%rbp
 162  204  pushq   %rsi
 163  205  pushq   %rdx
 164  206  pushq   %rcx
 165  207  pushq   %r8
 166  208  pushq   %r9
 167  209  subq    $0x8,%rsp
 168  210  subq    $0x50,%rsp
↓ open down ↓ 218 lines elided ↑ open up ↑
 387  429  SET_SIZE(big_struct_arg_by_value, big_struct_arg_by_value_end)
 388  430  
 389  431  FUNC(small_struct_arg_by_value)
 390  432  pushq   %rbp
 391  433  movq    %rsp,%rbp
 392  434  movq    %rdx,-0x18(%rbp)
 393  435  movq    %rsi,-0x10(%rbp)
 394  436  movq    %rdi,-0x8(%rbp)
 395  437  subq    $0x50,%rsp
 396  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)
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX