delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/12/30/07:17:12

Message-ID: <368A194E.381C4B3@gmx.de>
Date: Wed, 30 Dec 1998 13:15:10 +0100
From: Christian Hofrichter <ChristianHofrichter AT gmx DOT de>
X-Mailer: Mozilla 4.5 [de]C-CCK-MCD QXW03201 (Win95; I)
X-Accept-Language: de,en
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: register-arithmetic
Reply-To: djgpp AT delorie DOT com

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.

- Raw text -


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