Thanks for the info, Ethan and Andreas.Well, that's what FPUs did before.  
There's little use for denorms if you set DAZ and FTZ to 1.  Then it's like 
denorms never existed.I can't believe it would take much additional real estate 
on the chip to just make denorms work like any other float in the same 
instruction cycle.  Either way, the full mantissa *with* the hidden 1 (or 
without the hidden 1 for denorms) has to go into a wide register with a barrel 
shifter.  It should not require any additional instruction clocks.I think 
denorms are a good idea. They should be handled routinely by 
now.L8r,robertPowered by Cricket Wireless------ Original message------From: 
Ethan FennDate: Mon, Mar 27, 2023 10:02 AMTo: [email protected];Cc: 
Subject:Re: Are there now 64-bit processors that deal with denorms routinely 
with no exception or interrupt?My understanding is that on any reasonably 
modern Intel/AMD machines, you just have to make sure that the Flush To Zero 
(FTZ) and Denormals A
 re Zero (DAZ) hardware flags are set when your DSP code runs and there will be 
no penalty. If you're building a standalone application, these are usually set 
by default. If you're building some kind of plugin or library, I think it's 
good practice to put in a couple lines of code at your entry point to make sure 
they're set before doing any DSP.-EthanOn Mon, Mar 27, 2023 at 7:41 AM Andreas 
Gustafsson <[email protected]> wrote:robert bristow-johnson asked:
> If there are processors with FPUs that don't deal with denorms and
> cause an exception, I would be interested in knowing who the black
> sheep and the white sheep are.

Is your concern that the exception or interrupt will cause the program
to abort, or just that it will be slow?  Denormals can have a performance
penalty even if no interrupt or exception is involved, for example
when they are handled in microcode.

On x86_64, denormals typically do not cause floating point exceptions
(unless you specifically ask for it by clearing the DM bit in MXCSR),
but they can nonetheless have a significant performance penalty.

OTOH, the Apple M1 ARM processor appears to deal with denormals
without a performance penalty.

> I know that 25 years ago, exceptions caused by denorms (and maybe
> NaNs) were a headache for some audio DSP coders.  Are denorms still
> a problem where you have to force them to flush-to-zero so to not
> trip an exception?

At least on x86_64, they are still a performance problem if you have
any exponential decays that can reach the denormal range.
-- 
Andreas Gustafsson, [email protected]

Reply via email to