Discussion:
[9fans] asm question
(too old to reply)
Jens Staal
2012-07-28 18:12:51 UTC
Permalink
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?
Jens Staal
2012-07-28 18:16:09 UTC
Permalink
Post by Jens Staal
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.
sorry it should be setjmp.s

Continue reading on narkive:
Loading...