[Libre-soc-bugs] [Bug 982] Support PowerPC ABI in ISACaller

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Sep 6 01:03:00 BST 2023


https://bugs.libre-soc.org/show_bug.cgi?id=982

--- Comment #15 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
okaaaay fiiinallyyy, found one.

https://github.com/matja/asm-examples/blob/master/ppc64/hello.ppc64.linux.syscall.gas.asm

message:
        .ascii "Hello world!\n"

._start:
        li     0, 4 # syscall 4 - write
        li     3, 1 # arg 0 - fd = 1 (stdout)
        lis    4, message at highest # arg 1 - buffer
        ori    4, 4, message at higher
        rldicr 4, 4, 32, 31
        oris   4, 4, message at h
        ori    4, 4, message at l
        li     5, message_length # arg 2 - size
        sc     # do syscall

        li     0, 1 # syscall 1 - exit
        li     3, 0 # arg 0 - exit code = 0
        sc     # do syscall

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list