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

pc386 on 386sx

>>>>> "erik" == erik ivanenko <erik.ivanenko at utoronto.ca> writes:

erik> " The EM bit determines whether coprocessor functions are to be emulated.  If the
erik> EM bit is set when an ESC instruction is executed, the coprocessor-not-available
erik> exception is generated.  The exception handler then can emulate the coprocessor
erik> instruction. "

I'm lost! 
    1) Does the i386sx have a math coprocessor?
    2) Does the cpuModel.S code correctly determine the cpu type?

erik> The difference between the i386ex and pc386 is that the EM bit never gets set by
erik> the i386ex code.So, the "co-processor not available" exception is not raised on
erik> the fninit in CPU_Initialize.

erik> If the Linux style of initialization will be used,  then the EM bit could be
erik> tested in CPU_Initialize.
erik> But setting the EM bit may not be the best approach.....

You mean you want to use special compiler options...
Ok then probably, in cpuModel.S the setting of the EM bit should be 
confitionned to a new compilation option : "floating point emulation

  /  `                   	Eric Valette
 /--   __  o _.          	Canon CRF - Communication Dept
(___, / (_(_(__         	Rue de la touche lambert
				35517 Cesson-Sevigne  Cedex
Tel: +33 (0)2 99 87 68 91	Fax: +33 (0)2 99 84 11 30
E-mail: valette at crf.canon.fr	http://www.crf.canon.fr