From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 29599 invoked from network); 29 Jun 1998 17:28:55 -0000 Received: from vb.franken.de (193.174.2.34) by mail2.redhat.com with SMTP; 29 Jun 1998 17:28:55 -0000 Received: from localhost (volker@localhost) by vb.franken.de (8.8.4/8.8.4) with SMTP id BAA19858 for ; Mon, 29 Jun 1998 01:01:58 +0200 Date: Mon, 29 Jun 1998 01:01:57 +0200 (CEST) From: Volker Barthelmann To: axp-list@redhat.com Subject: Re: Performance measurements In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sun, 28 Jun 1998, Jeff Sturm wrote: > On Sat, 27 Jun 1998, Volker Barthelmann wrote: > > On Wed, 24 Jun 1998, Christopher C Chimelis wrote: > > > > > > Yeah, runtime performance is killed by -mieee. My only guess would be to > > > implement a kernel-level handler for this (is this covered in the new math > > > code in later 2.1 kernels?). > > > > This should basically be a compiler-problem. AFAIK gcc currently just > > inserts trap-barriers directly after every instruction that might cause an > > exception therefore stalling the pipelines. > > > > By trying to avoid reusing of the registers involved for some time and > > moving the trap-barrier or eliminating it, the speed-penalty could > > probably be reduced for the most part. > > >From what I understand the real problem is parallel instruction issue, > not register usage. The kernel cannot tell which instruction caused a > trap if -mieee is not used. Alpha offers several versions of fp-instructions. When you want full IEEE-compliance you have to choose the ones that trap on certain situations, so that the trap-handler can emulate it in software. If you compile with gcc without -mieee it simply uses instructions that don't trap, AFAIK. But even if you use the ones that trap you have the problem of imprecise exceptions. The exception is not caused immediately but at some later stage in the pipeline. Now if an instruction after the one causing an exception modifies registers used by that one before the trap is effectively executed, the handler cannot correctly emulate the instruction. Therefore gcc inserts trap-barriers immediately after every instruction that might cause a trap. This barrier ensures that no further instructions are executed before possible traps are executed, therefore stalling the pipeline. If you're not reusing registers of such an instructions you could omit the trap-barrier and decrease the penalty. > So -mieee must reduce floating-point to a > single CPU pipeline, there's the performance penalty. It's not that simple. > So on Alpha we must live with not-quite-IEEE arithmetic at very fast > speeds, or true IEEE at somewhat slower speeds. Yes. The question is how much slower. Volker