From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16602 invoked by alias); 4 Dec 2001 21:03:06 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16567 invoked from network); 4 Dec 2001 21:03:01 -0000 Received: from unknown (HELO executor.cambridge.redhat.com) (195.224.55.237) by sources.redhat.com with SMTP; 4 Dec 2001 21:03:01 -0000 Received: from redhat.com (apple.cambridge.redhat.com [172.16.18.78]) by executor.cambridge.redhat.com (Postfix) with ESMTP id 156B2ABB05; Tue, 4 Dec 2001 21:03:01 +0000 (GMT) Message-ID: <3C0D3A05.6FE3602F@redhat.com> Date: Tue, 04 Dec 2001 13:03:00 -0000 From: Graham Stott X-Mailer: Mozilla 4.77 [en] (X11; U; Linux 2.2.19-7.0.8smp i686) X-Accept-Language: en MIME-Version: 1.0 To: mcuss@cdlsystems.com Cc: gcc@gcc.gnu.org Subject: Re: Assembly in Gcc References: <20011204153416.A24659@disaster.jaj.com> <20011204155032.A24992@disaster.jaj.com> <00d001c17d05$4be398c0$160e10ac@hades> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2001-12/txt/msg00164.txt.bz2 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