www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/04/03/06:30:28

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: help with inline AT&T assembly
Date: Wed, 03 Apr 2002 14:11:30 +0300
Lines: 25
Message-ID: <3CAAE362.7187BFF3@is.elta.co.il>
References: <3CAAB61B DOT FC481AF4 AT is DOT elta DOT co DOT il> <20020403041106 DOT 20871 DOT 00001341 AT mb-mm DOT aol DOT com>
NNTP-Posting-Host: 192.116.55.139
Mime-Version: 1.0
X-Trace: fu-berlin.de 1017832553 28981708 192.116.55.139 (16 [61365])
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Sterten wrote:
> 
> I'd like to view C as an assembler with "macros" , but I'd have
> to be able to predict the exact opcode being generated.
> And all assembly commands should be part of the C-language.

In most cases, an optimizing compiler will produce a good code, so you don't
need to force it to generate specific opcodes.

> BTW. can I specify which register to use for a C-variable and
> can I change this during the program ?

I don't think so.  It's not a good idea anyway, since you will be fatally
hurting GCC's optimizer.

> Using 3 register variables already helped a lot. (I usually don't
> use register variables , maybe I'll use more in future)

The compiler will put variables in registers if you use -O2.

> Usually  GCC/djgpp 's code is about 30% slower than e.g.
> code from the Intel compiler.

I think this only happens on a K6, which isn't supported as well as ia32
CPUs.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019