www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/03/23:42:08

Date: Fri, 3 May 1996 20:08:14 +0800 (GMT+0800)
From: Orlando Andico <orly AT abigail DOT eee DOT upd DOT edu DOT ph>
To: Martynas Kunigelis <martynas DOT kunigelis AT vm DOT ktu DOT lt>
cc: djgpp AT delorie DOT com
Subject: Re: register calling convention
In-Reply-To: <199605031526.LAA01425@mv.mv.com>
Message-ID: <Pine.LNX.3.91.960503200621.4026A-100000@abigail.eee.upd.edu.ph>
MIME-Version: 1.0

I got this mail from someone about Pentium optimizations (the GCC is on 
sunsite, it's an *alpha* I think, but certain brave people are running 
Linux kernels with it).

The thing is, the x86 has so few registers that perhaps only one or two 
actually get used. The Pentium-optimizing GCC is supposed to give 
something like a 30% speed boost over 486-optimized code on a Pentium.

I think that would be a more worthwhile thing to get into...

On Fri, 3 May 1996, Martynas Kunigelis wrote:

> 
> I would like to ask somebody with knowledge on this: does register calling
> convention really *improve* the code speed??? I mean I spent a lot of time
> trying to imlement it in DJGPP. I would dare to update the assembly parts
> of DJGPP libc if we come to a conclusion that it is worth it.
> 
> One more thing: you must use __attribute__ ((cdecl)) to make sure your
> function gets called like a standard C declaration (i.e. parms on stack).
> Attribute `stdcall' means something completely different, check the docs.
> Another rhing is that GCC currently has a bug, which doesn't let you assign
> more than one attribute to a function. If you do, only the last one is taken
> into account. I think for short simple functions __attribute__ ((regparm(3),
> stdcall)) would be the best, but the bug... Actually I've implemented
> attribute (fastcall), but that neads a patch to GCC sources.
> OK, I hope to hear opinions if regparm convention is really worth implementing
> it.... x86 really has so few registers.
> 
> Martynas
> 

- Raw text -


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