Re: config option vs. run-time detection (the debate continues ...)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 9 Feb 2001, Jun Sun wrote:

>   a) an explicit config option, CONFIG_HAS_FPU, (which is not associated with
> PrID), plus "#ifdef CONFIG_HAS_FPU ..." code.  Or
> 
>   b) have run-time detection and many "if .. then .." code.
> 
> I listed some pro's and con's for both of them in my first email.  Right now,
> I found myself not having a strong preference but still biased towards config
> option approach ( - as if that really matters. :-0)

 Well, the number of places a run-time condition exist is small and they
are not performance-critical. 

> I actually don't understand your IDT quote.  It requires one to call mfc1 to
> get FCR0.  On many CPUs without a FPU, this will generate an exception.  Are
> you suggesting that we should catch the exception and from that we conclude
> there is no FPU present?

 I don't have an FPU-less system and I can't check such code.  I need to
depend on others (I couldn't test all possible configurations anyway).  If
we have a chance to get an exception we have to catch it, of course
(that's trivial to handle in Linux). 

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux