public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Assembly in Gcc
@ 2001-12-04 20:05 mike stump
  2001-12-10 15:36 ` More Assembly Questions Mark Cuss
  0 siblings, 1 reply; 6+ messages in thread
From: mike stump @ 2001-12-04 20:05 UTC (permalink / raw)
  To: grahams, mcuss, tprince; +Cc: gcc

> From: "Tim Prince" <tprince@computer.org>
> To: "Graham Stott" <grahams@redhat.com>, <mcuss@cdlsystems.com>
> Cc: <gcc@gcc.gnu.org>
> Date: Tue, 4 Dec 2001 18:37:13 -0800

> Much as I dislike the MSVC style, this would be a valuable contribution.

The style I think predates MSVC.  The small C compiler I had, had that
syntax.  I think it started out that way (I didn't add it).  I think
I'd support the addition of the syntax.

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

* More Assembly Questions....
  2001-12-04 20:05 Assembly in Gcc mike stump
@ 2001-12-10 15:36 ` Mark Cuss
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Cuss @ 2001-12-10 15:36 UTC (permalink / raw)
  To: gcc

Hello all,

I am having problems using the "mmword" assembly directive on some inline
assembly code which I am compiling in gcc.  I issued the -m486 and -o2 flags
but the assembler still is upset.  Does anyone know which command line
options I have to issue to make this work?

My apologies for the newbie question - I am new to embedding assembly into a
gcc compiled program...

Mark



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

* Re: Assembly in Gcc
  2001-12-04 13:03       ` Graham Stott
  2001-12-04 13:27         ` Mark Cuss
@ 2001-12-04 19:00         ` Tim Prince
  1 sibling, 0 replies; 6+ messages in thread
From: Tim Prince @ 2001-12-04 19:00 UTC (permalink / raw)
  To: Graham Stott, mcuss; +Cc: 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

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

* Re: Assembly in Gcc
  2001-12-04 13:03       ` Graham Stott
@ 2001-12-04 13:27         ` Mark Cuss
  2001-12-04 19:00         ` Tim Prince
  1 sibling, 0 replies; 6+ messages in thread
From: Mark Cuss @ 2001-12-04 13:27 UTC (permalink / raw)
  To: gcc-return-42228-mcuss=cdlsystems.com; +Cc: gcc


> 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.

Graham,

That would definately make life much much easier :)  If you could let me
know when you think your converter will be ready that would be great.

Mark




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

* Re: Assembly in Gcc
  2001-12-04 12:50     ` Assembly in Gcc Mark Cuss
@ 2001-12-04 13:03       ` Graham Stott
  2001-12-04 13:27         ` Mark Cuss
  2001-12-04 19:00         ` Tim Prince
  0 siblings, 2 replies; 6+ messages in thread
From: Graham Stott @ 2001-12-04 13:03 UTC (permalink / raw)
  To: mcuss; +Cc: 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

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

* Assembly in Gcc
  2001-12-04 12:46   ` Phil Edwards
@ 2001-12-04 12:50     ` Mark Cuss
  2001-12-04 13:03       ` Graham Stott
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Cuss @ 2001-12-04 12:50 UTC (permalink / raw)
  To: gcc


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.

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?

Thanks in advance

Mark

Mark Cuss, B. Sc.
Junior Real Time Systems Analyst
CDL Systems Ltd
3553 - 31 Street NW
Calgary, Alberta
(403) 289-1733 ext 226
mcuss@cdlsystems.com


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

end of thread, other threads:[~2001-12-10 23:06 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-04 20:05 Assembly in Gcc mike stump
2001-12-10 15:36 ` More Assembly Questions Mark Cuss
  -- strict thread matches above, loose matches on Subject: below --
2001-12-04 12:30 gcc-ss-20011203 is now available Phil Edwards
2001-12-04 12:36 ` Joseph S. Myers
2001-12-04 12:46   ` Phil Edwards
2001-12-04 12:50     ` Assembly in Gcc Mark Cuss
2001-12-04 13:03       ` Graham Stott
2001-12-04 13:27         ` Mark Cuss
2001-12-04 19:00         ` Tim Prince

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 read-only IMAP folder(s) and NNTP newsgroup(s).