From bc5b5df2c72d9b345b5cd242915aba2d2b975747 Mon Sep 17 00:00:00 2001 From: Koakuma Date: Thu, 21 Apr 2022 21:16:24 +0700 Subject: [PATCH] stage2: sparcv9: Update test case --- test/cases/sparcv9-linux/hello_world.zig | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/test/cases/sparcv9-linux/hello_world.zig b/test/cases/sparcv9-linux/hello_world.zig index 327a8c56ad..1aea9da7a3 100644 --- a/test/cases/sparcv9-linux/hello_world.zig +++ b/test/cases/sparcv9-linux/hello_world.zig @@ -1,23 +1,18 @@ const msg = "Hello, World!\n"; -pub export fn _start() noreturn { +fn length() usize { + return msg.len; +} + +pub fn main() void { asm volatile ("ta 0x6d" : : [number] "{g1}" (4), [arg1] "{o0}" (1), [arg2] "{o1}" (@ptrToInt(msg)), - [arg3] "{o2}" (msg.len), + [arg3] "{o2}" (length()), : "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", "memory" ); - - asm volatile ("ta 0x6d" - : - : [number] "{g1}" (1), - [arg1] "{o0}" (0), - : "o0", "o1", "o2", "o3", "o4", "o5", "o6", "o7", "memory" - ); - - unreachable; } // run