delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/11/15:17:14

Date: Tue, 11 Nov 1997 12:16:35 -0800 (PST)
Message-Id: <199711112016.MAA18274@adit.ap.net>
Mime-Version: 1.0
To: Jan Hubicka <hubicka AT atrey DOT karlin DOT mff DOT cuni DOT cz>, djgpp AT delorie DOT com
From: Nate Eldredge <eldredge AT ap DOT net>
Subject: Re: Unoptimal implementation of pc.h

At 05:23  11/11/1997 +0100, Jan Hubicka wrote:
>Hi
>In file inlines/pc.h in those outport* inport* functions are port always
threaded as "d" (edx)
>but you should also use an constant port "N"
>so I think using "Nd" instead of "d" should save few instrucions and
register or not?
No. The "N" constraint is only intended for the compiler. It doesn't make
sense to use it for inline asm, since the compiler doesn't know
ahead-of-time what port will be written to. Its only choice is to load the
port number into the dx register.
(Also, the constant-port form of `in'/`out' only works for port numbers up
to 0xFF, which is pretty useless.)

Nate Eldredge
eldredge AT ap DOT net



- Raw text -


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