Author: wmb Date: Fri Jun 29 23:09:12 2012 New Revision: 3024 URL: http://tracker.coreboot.org/trac/openfirmware/changeset/3024
Log: Moved the definition of "du*" into the kernel.
Modified: cpu/x86/acpitimer.fth forth/kernel/double.fth ofw/disklabel/gpttools.fth
Modified: cpu/x86/acpitimer.fth ============================================================================== --- cpu/x86/acpitimer.fth Fri Jun 29 23:04:07 2012 (r3023) +++ cpu/x86/acpitimer.fth Fri Jun 29 23:09:12 2012 (r3024) @@ -55,13 +55,8 @@ 1+ dup to timer-high ( timer.low timer.high' ) then ( timer.low timer.high ) ; -: du* ( ud.lo ud.hi u -- res.lo res.mid res.hi ) \ Ignores overflow to third cell - tuck um* 2>r ( ud.lo u r: res.mid0 res.hi0 ) - um* ( res.lo res.mid1 r: res.mid0 res.hi0 ) - 0 2r> d+ ( res.lo res.mid res.hi ) -; : acpi-ticks>usecs ( d.ticks -- usec ) - d# 50 du* drop ( d.product ) \ The scale factor is 1000/3580 == 50/179 + d# 50 du* ( d.product ) \ The scale factor is 1000/3580 == 50/179 d# 179 um/mod nip ( usecs ) ;
Modified: forth/kernel/double.fth ============================================================================== --- forth/kernel/double.fth Fri Jun 29 23:04:07 2012 (r3023) +++ forth/kernel/double.fth Fri Jun 29 23:09:12 2012 (r3024) @@ -65,6 +65,15 @@ -rot >>a or ( low2 r: high2 ) r> ( d2 ) ; +: du* ( d1 u -- d2 ) \ Double result + tuck u* >r ( d1.lo u r: d2.hi ) + um* r> + ( d2 ) +; +: du*t ( ud.lo ud.hi u -- res.lo res.mid res.hi ) \ Triple result + tuck um* 2>r ( ud.lo u r: res.mid0 res.hi0 ) + um* ( res.lo res.mid1 r: res.mid0 res.hi0 ) + 0 2r> d+ ( res.lo res.mid res.hi ) +;
\ LICENSE_BEGIN \ Copyright (c) 2006 FirmWorks
Modified: ofw/disklabel/gpttools.fth ============================================================================== --- ofw/disklabel/gpttools.fth Fri Jun 29 23:04:07 2012 (r3023) +++ ofw/disklabel/gpttools.fth Fri Jun 29 23:09:12 2012 (r3024) @@ -8,10 +8,6 @@ 32\ alias x- d- 32\ alias xswap 2swap 32\ : onex 1. ; -: du* ( d1 u -- d2 ) - tuck u* >r ( d1.lo u r: d2.hi ) - um* 0 r> d+ ( d2 ) -; 32\ : xu*d ( x u -- d ) du* ; 64\ alias xu*d um*
openfirmware@openfirmware.info