9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Jens Staal <staal1978@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: [9fans] asm question
Date: Sat, 28 Jul 2012 20:12:51 +0200	[thread overview]
Message-ID: <CAK8RtFrK-6qwXt+ceySuhPB6wOQJFJWKD+XN9EPEJngmnQabNg@mail.gmail.com> (raw)

Hi

I am currently attempting to build up-to-date APE libs for gnu/gcc
(the port found in /n/sources/extra/gcc). The APE libs there are from
2002 and there are some significant additions after that that I would
like to exploit.

The .c parts of the library builds nicely and I have a near-complete port.
The only issues I have is that .s files seem to be assembler-specific.
crt0.s can only be processed by gnu/as and the .s files in ap/386/ and
9/386/ can only be processed by 8a. I actually naively tried making
APE libraries with the .s files processed by 8a and renamed them from
.8 to .o and built the libraries. That failed during linking of a
test-compile (with clear error messages pointing to those .s-derived
object files) so apparently asm is compiler-specific (which sort of
demonstrates how little I know on this level...).

The only solution I can see is to try to manually "translate" those .s
files from "Plan9 assembly" to "GNU assembly". The best reference
comparison I have found is "libc/386/setlongjmp.s" from the old port
in /n/sources/extra/gcc and the current APE libs ap/386/setlongjmp.s.
The two files look quite similar, appart from that the first is "GNU"
style and the other "Plan9" style.

It is however still pretty unclear to me what the different things
actually say and especially carry over that info to translate the rest
of the .s files.

What I wonder is whether there is any good documentation/info
somewhere that could help me translate the rest of the .s files?



             reply	other threads:[~2012-07-28 18:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-28 18:12 Jens Staal [this message]
2012-07-28 18:16 ` Jens Staal

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=CAK8RtFrK-6qwXt+ceySuhPB6wOQJFJWKD+XN9EPEJngmnQabNg@mail.gmail.com \
    --to=staal1978@gmail.com \
    --cc=9fans@9fans.net \
    /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).