|
From: Paul M. <pa...@sa...> - 2004-09-02 12:23:25
|
Julian Seward writes: > > > If the machine contains a scalar 'min' insn, then we can do this cheaply > > > for any N. > > > > Yes. Is such an instruction common? > > I don't think so, at least not in scalar pipelines (SIMD ones maybe). > PaulM, what's the deal on ppc? There is no single instruction, but I believe it can be done in a few integer instructions without branches using some tricks with the carry bit (I'm sure x86 could do something similar). There are altivec instructions for signed, unsigned and floating point min and max. Paul. |