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>
@@ -62,10 +62,21 @@
movq %rsi,-0x10(%rbp)
movq %rdi,-0x8(%rbp)
subq $0x50,%rsp
SET_SIZE(gcc_mov_basic, gcc_mov_basic_end)
+FUNC(gcc_mov_noorder)
+pushq %rbp
+movq %rsp, %rbp
+movq %rcx,-0x20(%rbp)
+movq %rbx,-0x28(%rbp)
+movq %rdi,-0x8(%rbp)
+movq %rdx,-0x18(%rbp)
+movq %rsi,-0x10(%rbp)
+subq $0x50,%rsp
+SET_SIZE(gcc_mov_noorder, gcc_mov_noorder_end)
+
FUNC(gcc_mov_big_struct_ret)
pushq %rbp
movq %rsp,%rbp
movq %rbx,-0x28(%rbp)
movq %r8,-0x20(%rbp)
@@ -73,10 +84,21 @@
movq %rdx,-0x10(%rbp)
movq %rsi,-0x8(%rbp)
subq $0x50,%rsp
SET_SIZE(gcc_mov_big_struct_ret, gcc_mov_big_struct_ret_end)
+FUNC(gcc_mov_struct_noorder)
+pushq %rbp
+movq %rsp,%rbp
+movq %rcx,-0x18(%rbp)
+movq %r8,-0x20(%rbp)
+movq %rsi,-0x8(%rbp)
+movq %rdx,-0x10(%rbp)
+movq %rbx,-0x28(%rbp)
+subq $0x50,%rsp
+SET_SIZE(gcc_mov_struct_noorder, gcc_mov_struct_noorder_end)
+
FUNC(gcc_mov_big_struct_ret_and_spill)
pushq %rbp
movq %rsp,%rbp
movq %rbx,-0x38(%rbp)
movq %r9,-0x28(%rbp)
@@ -144,20 +166,40 @@
pushq %rdx
pushq %rcx
subq $0x20,%rsp
SET_SIZE(gcc_push_basic, gcc_push_basic_end)
+FUNC(gcc_push_noorder)
+pushq %rbp
+movq %rsp,%rbp
+pushq %rsi
+pushq %rdi
+pushq %rcx
+pushq %rdx
+subq $0x20,%rsp
+SET_SIZE(gcc_push_noorder, gcc_push_noorder_end)
+
FUNC(gcc_push_big_struct_ret)
pushq %rbp
movq %rsp,%rbp
pushq %rsi
pushq %rdx
pushq %rcx
pushq %r8
subq $0x30,%rsp
SET_SIZE(gcc_push_big_struct_ret, gcc_push_big_struct_ret_end)
+FUNC(gcc_push_struct_noorder)
+pushq %rbp
+movq %rsp,%rbp
+pushq %rdx
+pushq %rsi
+pushq %r8
+pushq %rcx
+subq $0x30,%rsp
+SET_SIZE(gcc_push_struct_noorder, gcc_push_struct_noorder_end)
+
FUNC(gcc_push_big_struct_ret_and_spill)
pushq %rbp
movq %rsp,%rbp
pushq %rsi
pushq %rdx
@@ -392,5 +434,21 @@
movq %rdx,-0x18(%rbp)
movq %rsi,-0x10(%rbp)
movq %rdi,-0x8(%rbp)
subq $0x50,%rsp
SET_SIZE(small_struct_arg_by_value, small_struct_arg_by_value_end)
+
+FUNC(interleaved_argument_saves)
+pushq %rbp
+movq %rdi,%rax
+shlq $0x21,%rax
+movq %rsp,%rbp
+shrq $0x29,%rax
+subq $0x30,%rsp
+movq %rdi,-0x8(%rbp)
+movq %rbx,-0x28(%rbp)
+movzbl %dil,%edi
+movq %rcx,-0x20(%rbp)
+movq %rdx,-0x18(%rbp)
+movq %rsi,-0x10(%rbp)
+movq 0x0(,%rax,8),%rax
+SET_SIZE(interleaved_argument_saves, interleaved_argument_saves_end)