9front - general discussion about 9front
 help / color / mirror / Atom feed
From: cinap_lenrek@felloff.net
To: 9front@9front.org
Subject: Re: [9front] Re: [PATCH] game boy advance header target for 5l
Date: Sat, 04 Mar 2023 16:53:53 +0100	[thread overview]
Message-ID: <B8CCBA61902779C56B8247511AC8EF99@felloff.net> (raw)
In-Reply-To: <cc0b0481-8a24-3025-8fa3-7153a4207e55@posixcafe.org>


> In porting a more complicated rom, I realized that plan9 specific
> init code is unavoidable anyway due to needing to setup R12:

> 	MOVW	$setR12(SB), R12		/* load the SB */

It is not plan9 specific really. It is just an address bias value
for accessing the data section; generated by the linker.

The idea is that you want to keep the offsets small becuse small
offsets are more likely be encodable directly into a single
instruction, while larger ones need multiple instructions.

Also note this is a RISC thing; where you have usually a large
number of general purpose registers. For 386 code, there is
no such thing.

--
cinap

      reply	other threads:[~2023-03-04 15:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-02  6:56 [9front] " Jacob Moody
2023-03-02 11:15 ` [9front] " Anthony Martin
2023-03-02 16:08   ` Jacob Moody
2023-03-02 17:33     ` cinap_lenrek
2023-03-02 17:50       ` Jacob Moody
2023-03-03 20:59         ` cinap_lenrek
2023-03-03 21:18           ` Jacob Moody
2023-03-04 15:53             ` cinap_lenrek [this message]

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=B8CCBA61902779C56B8247511AC8EF99@felloff.net \
    --to=cinap_lenrek@felloff.net \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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).