This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Assembly in Gcc


Much as I dislike the MSVC style, this would be a valuable contribution.
----- Original Message -----
From: "Graham Stott" <grahams@redhat.com>
To: <mcuss@cdlsystems.com>
Cc: <gcc@gcc.gnu.org>
Sent: Tuesday, December 04, 2001 1:03 PM
Subject: Re: Assembly in Gcc


> Mark,
>
> Mark Cuss wrote:
> >
> > Hello all,
> >
> > I am new to doing inline asembly in gcc and have a few questions -
hopefully
> > someone can help me out.
> >
> > I read the section of the manual on the doing inline assembly.  It is
quite
> > different than the old Borland compiler I used to use on DOS - I could
just
> > put an "asm " and enclose all of my Intel syntax assmebly instructions
> > inside there.  Is there any way to do this in gcc?  I found the
intel_syntax
> > directive and passed that in, but it seems that I still need to put %' s
in
> > front of register names, etc.
> >
> You might like to try ".intel_syntax noprefix" that avoids the needs to
the %
> on register names.
>
> > The project I am working on involves integrating a large chunk (~ 40
pages)
> > of Intel assembly instructions into a program which I must compile with
gcc.
> > So, my goal is to be able to do something like this:
> >
> >     asm {
> >                 mov dx, 378
> >                 mov al, FF
> >                 out dx, al
> >         } ;
> >
> >  ... Without reformatting the code.  Is this possible?
> >
> Not as things currently stand you have to convert the asm { ... } form
into
> GCC's own asm construct.
>
> Now it just so happens that I'm working on adding support of MS style
inline
> assembler in to GCC for the x86. It's in an advanced state and almost
ready
> to be submitted.
>
> > Thanks in advance
> >
>
> > Mark
>
> Graham


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]