aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/qemu-src/test.s
diff options
context:
space:
mode:
Diffstat (limited to 'tools/qemu-src/test.s')
-rw-r--r--tools/qemu-src/test.s16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/qemu-src/test.s b/tools/qemu-src/test.s
new file mode 100644
index 0000000..562b2ec
--- /dev/null
+++ b/tools/qemu-src/test.s
@@ -0,0 +1,16 @@
+.section .text, "ax"
+
+.global _start
+_start:
+ xor %rax, %rax
+ mov $0x8, %rax
+1:
+ cmp $0, %rax
+ je 2f
+ dec %rax
+ jmp 1b
+2:
+ # x86-64 exit(2) syscall
+ mov $0, %rdi
+ mov $60, %rax
+ syscall