How C structures get passed to function in assembly?

后端 未结 3 1302
眼角桃花
眼角桃花 2021-01-22 09:10

1)How C structures get passed to function in assembly. I mean pass by value, not pass by reference. 2)By the way, how callees return structure to its callers? I\'m so sorry for

3条回答
  •  渐次进展
    2021-01-22 09:39

    There's no general answer to your question - every compiler works differently and can do things differently according to what optimisations you select. What you've observed is a common optimisation - the first few parameters of suitable types are passed in registers, with extra and/or complex ones passed on the stack.

提交回复
热议问题