9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Tassilo Philipp" <tphilipp@potion-studios.com>
To: "Jens Staal" <staal1978@gmail.com>
Cc: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] GAS front-end for 8a?
Date: Mon,  3 Dec 2012 19:27:15 +0100	[thread overview]
Message-ID: <724b96c03d40f80dd6ec579a2e521bab-EhVcXl5HRQddRwgcBDpQCEFddQZLVF5dQUBACjBYXV5ZUlsWXl1oAFVVMl5cREEHWlNbQ10=-webmailer1@server03.webmailer.hosteurope.de> (raw)
In-Reply-To: <1773872.G6c3GLPfnf@krypton>

Yes, libffi has been around for quite a while, so I'm sure that there's a
lot of projects that depend on it. Looking at the assembly code for
plan9/x86 that comes with dyncall, might be helpful for adding plan9
support to libffi, as well, though - at the very core, both libraries do
similar things.

About converting GAS ASM to Plan9 ASM - I don't know of any
library/program that does this, per se, but dyncall has a little helper
'lib' called portasm, that tries to abstract platform syntax away using
the C preprocessor.
Maybe that's a good start for rolling your own, as well...
http://dyncall.org/svn/dyncall/trunk/dyncall/portasm/

It doesn't come with any documentation, though, as it is used internally,
but yes... it's just C preprocessor...

Hope this helps,
Tassilo


> Thanks!
>
> I will check it out. I mostly made a shot at ffi since it is listed as a
> dependency for a couple of packages I would be interested in building (or
> at
> least try to build).
>
> On a more general note though, being able to convert GAS ASM to Plan9 ASM
> (and
> possibly also the other way around) would be quite handy sometimes, I
> guess.
>
> måndagen den 3 december 2012 08.23.29 skrev  Tassilo Philipp:
>> Hi,
>>
>> I noticed you were asking on the libffi mailing list for Plan9 support,
>> so I
>> guess your question is related to getting libffi to run on Plan9? If you
>> just need a ffi, dyncall is running on Plan9 already (x86, only calls,
>> not
>> callbacks, though), supporting Plan9's calling convention. Check out
>> dyncall.org
>>
>> Hope this helps,
>> Tassilo
>>
>>
>> On Mon, 03 Dec 2012 11:02:49 +0100
>>
>> Jens Staal <staal1978@gmail.com> wrote:
>> > Hi
>> >
>> > I just wondered if anyone has made some sort of wrapper similar to the
>> > posix c compiler (pcc) front end for 8c, but for ASM?
>> >
>> > The reason I ask is that some projects have mixed .c and .S code and
>> the
>> > ASM is mostly GAS syntax.
>> >
>> > Alternative ways of dealing with GAS ASM and still get native object
>> files
>> > are also welcome :)
>
>



      reply	other threads:[~2012-12-03 18:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 10:02 Jens Staal
2012-12-03 10:11 ` Charles Forsyth
2012-12-03 10:24   ` Charles Forsyth
2012-12-03 14:23 ` Tassilo Philipp
2012-12-03 17:45   ` Jens Staal
2012-12-03 18:27     ` Tassilo Philipp [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='724b96c03d40f80dd6ec579a2e521bab-EhVcXl5HRQddRwgcBDpQCEFddQZLVF5dQUBACjBYXV5ZUlsWXl1oAFVVMl5cREEHWlNbQ10=-webmailer1@server03.webmailer.hosteurope.de' \
    --to=tphilipp@potion-studios.com \
    --cc=9fans@9fans.net \
    --cc=staal1978@gmail.com \
    /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).