From: Jos v.d.V. <jo...@us...> - 2013-05-15 12:00:34
|
Update of /cvsroot/win32forth/win32forth/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8034 Modified Files: FLOAT.F Log Message: Optimized dofvalue! and dofvalue+! Not clear why I can't use cfa-code Index: FLOAT.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/FLOAT.F,v retrieving revision 1.58 retrieving revision 1.59 diff -C2 -d -r1.58 -r1.59 *** FLOAT.F 22 Apr 2013 19:53:53 -0000 1.58 --- FLOAT.F 15 May 2013 12:00:31 -0000 1.59 *************** *** 427,432 **** internal ! cfa-func dofvalue! 2 cells - @ f! ; \ to be optimised ! cfa-func dofvalue+! 3 cells - @ f+! ; \ to be optimised external --- 427,451 ---- internal ! code (dofvalue! ( adr -- ) ( fs: r -- ) ! mov ebx, -8 [ebx] [edi] ! fstack-check_1 ! >FPU \ to st(0) ! fstp FSIZE DATASTACK_MEMORY ! pop ebx ! float; ! ! ! code (dofvalue+! ( adr -- ) ( fs: r -- ) ! mov ebx, -12 [ebx] [edi] ! fstack-check_1 ! >FPU ! fld FSIZE DATASTACK_MEMORY ! faddp st(1), st ! fstp fsize datastack_memory ! pop tos ! float; ! ! cfa-func dofvalue! (dofvalue! ; ! cfa-func dofvalue+! (dofvalue+! ; external *************** *** 442,450 **** : FVALUE ( compiling "name" -- ; fs: r -- ; run-time FS: -- r ) \ W32F Floating ext \ *G Define a floating point value initialised from the FP stack. - \ create f, - \ ;code - \ fld fsize 4 [eax] - \ FPU> - \ float; create here 0 , dofvalue! , dofvalue+! , here swap ! f, ;code --- 461,464 ---- *************** *** 454,487 **** float; - \ in-previous - \ - \ code _fto ( FS: n - ; 'fvalue - ) - \ fstack-check_1 - \ >FPU - \ add ebx, # cell \ >body - \ fstp FSIZE DATASTACK_MEMORY - \ pop ebx - \ float; - \ - \ in-system - \ : FTO \ W32F Floating extra synonym fto to \ W32F Floating extra \ *G \b Interpretation: ( -<fvalue>- -- fs: r -- ) \n \ ** Compilation: ( -<fvalue>- -- Run-time: FS: r -- ) \d ! \ *P Store r into -<fvalue>-. If -<fvalue>- is not defined with fvalue then memory may ! \ ** be corrupted; no checks are made so the user should take care. FTO should not be ! \ ** POSTPONEd. ! \ state @ ! \ if postpone ['] postpone _fto ! \ else ' _fto ! \ then ; IMMEDIATE synonym +fto +to \ W32F Floating extra \ *G \b Interpretation: ( -<fvalue>- -- fs: r -- ) \n \ ** Compilation: ( -<fvalue>- -- Run-time: FS: r -- ) \d ! \ *P Add r into -<fvalue>-. If -<fvalue>- is not defined with fvalue then memory may ! \ ** be corrupted; no checks are made so the user should take care. +FTO should not be ! \ ** POSTPONEd. --- 468,481 ---- float; synonym fto to \ W32F Floating extra \ *G \b Interpretation: ( -<fvalue>- -- fs: r -- ) \n \ ** Compilation: ( -<fvalue>- -- Run-time: FS: r -- ) \d ! \ *P Store r into -<fvalue>-. synonym +fto +to \ W32F Floating extra \ *G \b Interpretation: ( -<fvalue>- -- fs: r -- ) \n \ ** Compilation: ( -<fvalue>- -- Run-time: FS: r -- ) \d ! \ *P Add r into -<fvalue>-. |