delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/30/08:36:23

Message-Id: <m0zvLmw-000S2KC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Christian Hofrichter <ChristianHofrichter AT gmx DOT de>, djgpp AT delorie DOT com
Date: Wed, 30 Dec 1998 10:39:14 +0000
MIME-Version: 1.0
Subject: Re: register-arithmetic
In-reply-to: <368A194E.381C4B3@gmx.de>
X-mailer: Pegasus Mail for Windows (v2.54)
Reply-To: djgpp AT delorie DOT com

Christian Hofrichter <ChristianHofrichter AT gmx DOT de> wrote:

> If I tell gcc explicitely what for varibales it shall load in which
> register and do some arithmetic to them, can I be sure that only this
> register is used for that arithemtic or could it be that other
> registerts are temporarly allocated ? The following code should
> illustate that:
> 
> Example :        asm("    ":
>                                     :"a"(x*y+1) );
> 
> 
> So can I be sure that only eax is used for this multiplication and
> addition or could it be that let's say  ebx is allocated to do some
> arithmetic temorarly.

You can't. Is just impossible to make x*y using only one register.

SET 
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
http://www.geocities.com/SiliconValley/Vista/6552/
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org
ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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