hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/examples/arm64/exit.hdass
diff options
context:
space:
mode:
Diffstat (limited to 'examples/arm64/exit.hdass')
-rw-r--r--examples/arm64/exit.hdass7
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/arm64/exit.hdass b/examples/arm64/exit.hdass
index a86e5e2..a7e89df 100644
--- a/examples/arm64/exit.hdass
+++ b/examples/arm64/exit.hdass
@@ -1,14 +1,11 @@
[entry: main]
[enable: logical_registers]
-// Exits with status 42 on AArch64 Linux. Logical registers map r1 -> x0 and
-// r9 -> x8, so the exit code goes in x0 and the syscall number in x8; `syscall`
-// lowers to `svc #0`.
const SYS_EXIT = 93
proc main
{
- r1 = 42 // x0 = exit code
- r9 = SYS_EXIT // x8 = syscall number
+ r1 = 42
+ r9 = SYS_EXIT
syscall
}