9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Anthony Martin <ality@pbrane.org>
To: 9fans@9fans.net
Subject: [9fans] spim syscall stack adjustment
Date: Thu, 26 Jan 2023 18:46:29 -0800	[thread overview]
Message-ID: <Y9M7BfRX0zuSxw01@alice> (raw)

Does anyone know why the libc system call functions for
spim add four to the stack pointer (R29) before issuing
the SYSCALL instruction?


It was introduced in the third edition but there were
never any spim kernels released so I wasn't able to
compare the libc additions to the trap code.

I was watching one of adventuresin9's videos about his
ongoing port to the MediaTek MT7688 and he mentioned
having to modify the stack offsets in the syscall trap
handler just as cherry9 had done for the loongson port.

Is there any reason not to simply get rid of that ADD $4?


9fans: 9fans
Permalink: https://9fans.topicbox.com/groups/9fans/T589fa55313abbdb4-Mc96c7cb218c2b6a69a83b8e8
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

             reply	other threads:[~2023-01-27  2:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  2:46 Anthony Martin [this message]
2023-01-27 21:10 ` adventures in9

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y9M7BfRX0zuSxw01@alice \
    --to=ality@pbrane.org \
    --cc=9fans@9fans.net \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).