9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] GAS front-end for 8a?
@ 2012-12-03 10:02 Jens Staal
  2012-12-03 10:11 ` Charles Forsyth
  2012-12-03 14:23 ` Tassilo Philipp
  0 siblings, 2 replies; 6+ messages in thread
From: Jens Staal @ 2012-12-03 10:02 UTC (permalink / raw)
  To: 9fans

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 :)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] GAS front-end for 8a?
  2012-12-03 10:02 [9fans] GAS front-end for 8a? Jens Staal
@ 2012-12-03 10:11 ` Charles Forsyth
  2012-12-03 10:24   ` Charles Forsyth
  2012-12-03 14:23 ` Tassilo Philipp
  1 sibling, 1 reply; 6+ messages in thread
From: Charles Forsyth @ 2012-12-03 10:11 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Perhaps you could do the transformation using a sam -d script.
I've done that incrementally by hand in the past, I think, for 68k not x86.

On 3 December 2012 10:02, Jens Staal <staal1978@gmail.com> wrote:
> Alternative ways of dealing with GAS ASM and still get native object files are
> also welcome :)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] GAS front-end for 8a?
  2012-12-03 10:11 ` Charles Forsyth
@ 2012-12-03 10:24   ` Charles Forsyth
  0 siblings, 0 replies; 6+ messages in thread
From: Charles Forsyth @ 2012-12-03 10:24 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Oh. I think you might still have to tweak the result by hand, because
the calling conventions are different.
Then again, if you're linking it with something else using the same
conventions, it will work.


On 3 December 2012 10:11, Charles Forsyth <charles.forsyth@gmail.com> wrote:
> Perhaps you could do the transformation using a sam -d script.
> I've done that incrementally by hand in the past, I think, for 68k not x86.
>
> On 3 December 2012 10:02, Jens Staal <staal1978@gmail.com> wrote:
>> Alternative ways of dealing with GAS ASM and still get native object files are
>> also welcome :)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] GAS front-end for 8a?
  2012-12-03 10:02 [9fans] GAS front-end for 8a? Jens Staal
  2012-12-03 10:11 ` Charles Forsyth
@ 2012-12-03 14:23 ` Tassilo Philipp
  2012-12-03 17:45   ` Jens Staal
  1 sibling, 1 reply; 6+ messages in thread
From: Tassilo Philipp @ 2012-12-03 14:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

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 :)
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] GAS front-end for 8a?
  2012-12-03 14:23 ` Tassilo Philipp
@ 2012-12-03 17:45   ` Jens Staal
  2012-12-03 18:27     ` Tassilo Philipp
  0 siblings, 1 reply; 6+ messages in thread
From: Jens Staal @ 2012-12-03 17:45 UTC (permalink / raw)
  To: Tassilo Philipp; +Cc: Fans of the OS Plan 9 from Bell Labs

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 :)



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [9fans] GAS front-end for 8a?
  2012-12-03 17:45   ` Jens Staal
@ 2012-12-03 18:27     ` Tassilo Philipp
  0 siblings, 0 replies; 6+ messages in thread
From: Tassilo Philipp @ 2012-12-03 18:27 UTC (permalink / raw)
  To: Jens Staal; +Cc: Fans of the OS Plan 9 from Bell Labs

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 :)
>
>



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-03 18:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-03 10:02 [9fans] GAS front-end for 8a? 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 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).