As reported by Amadeusz Sławiński using a real Mac, if anything is divided by zero then we should return zero:
0 > 2 0 / ok 1 > u. 0 ok
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- openbios-devel/arch/ppc/ppc.fs | 7 +++++++ 1 file changed, 7 insertions(+)
diff --git a/openbios-devel/arch/ppc/ppc.fs b/openbios-devel/arch/ppc/ppc.fs index 6995ba9..212894d 100644 --- a/openbios-devel/arch/ppc/ppc.fs +++ b/openbios-devel/arch/ppc/ppc.fs @@ -53,5 +53,12 @@ \ other \ -------------------------------------------------------------------------
+\ Override divide by zero handling +\ Tests indicate that Apple's OF implementation returns a single value of 0 + +: (ppc-div-by-zero-handler) 3drop 0 0 0 ; + +['] (ppc-div-by-zero-handler) to (div-by-zero-handler) + \ Set by BootX when booting Mac OS X defer spin