delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/02/23:39:56

From: Damian Yerrick <MYNAMEISd_yerrick AT hotmail DOT comNO2CANNEDHAM>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: inline trouble
Organization: Pin Eight Software http://pineight.8m.com/
Message-ID: <ac0i9socusbgban0me18vdve24toip4oub@4ax.com>
References: <86i0tf$jnf$1 AT inf6serv DOT rug DOT ac DOT be> <86i2ub$jn8$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <86pm0u$325jc$1 AT fu-berlin DOT de> <879ri7$a04$1 AT nets3 DOT rz DOT RWTH-Aachen DOT DE> <87aqnn$3i1ll$1 AT fu-berlin DOT de>
X-Newsreader: Forte Agent 1.7/32.534
MIME-Version: 1.0
Lines: 32
X-Trace: /bQNubiWoHEytMTagYnAvoi5jDC2nBVlz2txZGBVaDqrL2wpQo1+4mwvvNh8WECcHYAONf7DMIB4!XGqFRIMSGKjmPl/W9QJ8VpF04Tmm5LL7K4yMrgeP8zul5izxIB1dKf3fAmHZnmS43xs4uVNM3Q==
X-Complaints-To: abuse AT gte DOT net
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
NNTP-Posting-Date: Thu, 03 Feb 2000 04:22:29 GMT
Distribution: world
Date: Thu, 03 Feb 2000 04:22:29 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On 3 Feb 2000 02:55:52 GMT, buers AT gmx DOT de (Dieter Buerssner) wrote:

>/* This worked with older gcc versions, and from my understanding
>this was also documented as working */
>type someval;
>asm(
>    /* Use somereg, and modify somereg */
>    : /* output is not interesting in this example */ 
>    : ("somereg"), someval 
>    : (somereg) /* yes, somereg will be modified */
>   );
>
>translate this to
>
>/* This works with gcc 2.95 */
>type someval, tempval;
>tempval = someval;
>asm(
>    /* Use somereg, and modify somereg */
>    : ("=somereg"), "tempval" 
>    : ("0"), "someval"
>    /* no clobbered registers needed here */
>   )

If it's that easy, why hasn't some hacker coded up some
asmclean.c that cleans up inline assembly in a C program?

-- 
Damian Yerrick  http://yerricde.tripod.com/
Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
View full sig: http://www.rose-hulman.edu/~yerricde/sig.html

- Raw text -


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