[OpenBIOS] testing Max OS X boot on latest trunk (revision 1080)

Programmingkid programmingkidx at gmail.com
Mon Dec 24 21:48:38 CET 2012


On Dec 24, 2012, at 6:29 AM, Mark Cave-Ayland wrote:

> On 23/12/12 04:53, Programmingkid wrote:
> 
>>> That would be incorrect, by all standards. Indeed, Solaris uses divide by zero as a fatal error indicator during the boot process, knowing it will trap.
>> 
>> But this isn't Solaris we are working with, this is Apple software. Division by zero equals zero.
> 
> As Tarl points out, division by zero is really undefined. Hence we need to make this behaviour customisable on a per-architecture basis so that we can provide the workaround just for PPC.
> 

We could add an if condition to the mudivmod() function so that it returns zero if the denominator is zero and the architecture is PowerPC.


More information about the OpenBIOS mailing list