At&t syntax emitter

For other topics related to the FreeBASIC project or its community.
dkl
Site Admin
Posts: 3217
Joined: Jul 28, 2005 14:45
Location: Germany

Postby dkl » Dec 02, 2010 17:08

Looking pretty good already, would be awesome to solve all the issues. Right now I don't have time to play around with it, but I'll keep it in mind. I think it could eventually be included into fbc, even if it's not 100% compatible (inline assembly would probably be the only problem, as with -gen gcc).
parkovski
Posts: 16
Joined: Apr 05, 2010 23:26

Postby parkovski » Dec 03, 2010 11:33

Re: the C emitter, GCC can already output intel syntax, maybe we could reuse the -as option for that, which would fix some problems with inline asm:
fbc file.bas => fb generates intel asm
fbc file.bas -as att => fb generates at&t asm
fbc file.bas -gen gcc => fb generates c -> gcc generates at&t asm
fbc file.bas -gen gcc -as intel => fb generates c -> gcc generates intel asm (-masm=intel)

It might be better to make the c emitter default to intel syntax though for consistency, and use the -as option to switch back to at&t where needed.

Depending on what the devs think, maybe this could be added as a work in progress like the C emitter? That way someone with more experience in this area could just patch it up instead of having to track this down and add it into their compiler. Just an idea.

Re: any mac users, currently there's not really an easy way to get fb working on the mac, either with cross compiling or natively, but hopefully this is a step in the right direction, so stay tuned for more updates!
fxm
Posts: 10061
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Postby fxm » Dec 03, 2010 12:25

What about my post of August 2009 ?
http://www.freebasic.net/forum/viewtopi ... 630#141630
counting_pine
Site Admin
Posts: 6237
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: At&t syntax emitter

Postby counting_pine » Jan 20, 2012 19:37

Hi. Just to say, I uploaded parkovski's patches as a github branch: www.github.com/countingpine/fbc/commits/parkovski_att
fxm
Posts: 10061
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re:

Postby fxm » Jan 20, 2012 20:11

fxm wrote:What about my post of August 2009 ?
viewtopic.php?p=141630#141630

Coming from the old forum, the link above points only to the top of the right page, but not to the right post.

It lacks a "p" as this following to well point to the post:
viewtopic.php?p=141630#p141630

Is it a general problem due to the forum upgrade?
dkl
Site Admin
Posts: 3217
Joined: Jul 28, 2005 14:45
Location: Germany

Re: At&t syntax emitter

Postby dkl » Jan 20, 2012 21:33

I have the patch here in my private git repo too, although to be honest I stopped worrying about it, since parkovski said it wasn't ready yet. See also:
https://sourceforge.net/tracker/?func=d ... tid=693198
Sannaj
Posts: 27
Joined: Dec 19, 2010 16:39

Re: At&t syntax emitter

Postby Sannaj » Jan 21, 2012 12:29

So what about inline assembly in relation with the as Option?

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 9 guests