-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exit Exits twice #27
Comments
I believe he's intentionally adding an exit at the end of a program (even if you didnt add it yourself), which would mean that this isn't a bug (and you can't really exit twice, it exists and the second one isnt executed) |
This seems to be the case (check Line 247 of generation.hpp) |
Ok. I would change it to only add an exit if there is no exit declared in the program |
Personally I'd just leave it as is. |
the code
exit(12)
produces the following ASMglobal _start _start: ;; exit mov rax, 12 push rax mov rax, 60 pop rdi syscall ;; /exit mov rax, 60 mov rdi, 0 syscall
the program exits twice.
The text was updated successfully, but these errors were encountered: