Commit c6fb798740
Changed files (3)
test/cases/plan9/exit.zig
@@ -0,0 +1,5 @@
+pub fn main() void {}
+
+// run
+// target=x86_64-plan9,aarch64-plan9
+//
test/cases/plan9/hello_world_with_updates.0.zig
@@ -0,0 +1,28 @@
+pub fn main() void {
+ const str = "Hello World!\n";
+ asm volatile (
+ \\push $0
+ \\push %%r10
+ \\push %%r11
+ \\push $1
+ \\push $0
+ \\syscall
+ \\pop %%r11
+ \\pop %%r11
+ \\pop %%r11
+ \\pop %%r11
+ \\pop %%r11
+ :
+ // pwrite
+ : [syscall_number] "{rbp}" (51),
+ [hey] "{r11}" (@ptrToInt(str)),
+ [strlen] "{r10}" (str.len),
+ : "rcx", "rbp", "r11", "memory"
+ );
+}
+
+// run
+// target=x86_64-plan9
+//
+// Hello World
+//
test/cases/plan9/hello_world_with_updates.1.zig
@@ -0,0 +1,10 @@
+const std = @import("std");
+pub fn main() void {
+ const str = "Hello World!\n";
+ _ = std.os.plan9.pwrite(1, str, str.len, 0);
+}
+
+// run
+//
+// Hello World
+//