diff options
author | Carlos Maniero <carlos@maniero.me> | 2023-05-10 14:26:40 -0300 |
---|---|---|
committer | Carlos Maniero <carlos@maniero.me> | 2023-05-10 14:26:40 -0300 |
commit | 2cf0bcb409f3a1fd298b664103d57c945c6349f5 (patch) | |
tree | 6756f530d3007d529fae11fd0168c235355bc220 /examples/arithmetics.pipa | |
parent | f1b1c191975581d5ef13bd04f33b6965235d00b4 (diff) |
gas: Removes Linux entrypoint logic from function declaration
Before this commit, function declarations were making syscalls to
interrupt the flow. This is a fair approach considering all our examples
just have a main function. But won't work if the namespace has more then
a single function.
The return now always sets the return value on RAX and jumps to the
function return label.
The function return label, will restore RBP and jump back to callee's
next instruction using RET instruction.
Function labels are kept, which means that a function called my_fn will
have the assembly label my_fn, so then, they can have INTEROP with other
languages.
Signed-off-by: Carlos Maniero <carlos@maniero.me>
Diffstat (limited to 'examples/arithmetics.pipa')
0 files changed, 0 insertions, 0 deletions