From: Alex M. <ale...@us...> - 2006-10-08 20:39:37
|
Update of /cvsroot/win32forth/win32forth-stc/src/kernel In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv4117 Modified Files: gmeta-compiler.f Log Message: arm: remove inline code generation Index: gmeta-compiler.f =================================================================== RCS file: /cvsroot/win32forth/win32forth-stc/src/kernel/gmeta-compiler.f,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gmeta-compiler.f 6 Oct 2006 15:43:44 -0000 1.5 --- gmeta-compiler.f 8 Oct 2006 20:39:34 -0000 1.6 *************** *** 91,115 **** \ -------------------- Deferred app space words ------------------------ ! $10000 dup malloc to image-codeptr image-codeptr swap $90 fill \ where code is built ! $10000 dup malloc to image-appptr image-appptr swap erase \ where target app is built ! $10000 dup malloc to image-kodeptr image-kodeptr swap $90 fill \ where sys-code is built ! $10000 dup malloc to image-sysptr image-sysptr swap erase \ where target heads are built ! image-origin image-csep + image-codeptr - constant tcode-base \ target data base ! image-origin image-asep + image-appptr - constant tapp-base \ target dictionary base ! image-origin image-ssep + image-sysptr - constant tsys-base \ target header base ! image-origin image-ksep + image-kodeptr - constant tkode-base \ target sys code base ! create tcode-dp image-codeptr , image-codeptr , image-codeptr $10000 + , 0 , ," tcode-dp" \ code ! create tapp-dp image-appptr , image-appptr , image-appptr $10000 + , 0 , ," tapp-dp" \ app ! create tkode-dp image-kodeptr , image-kodeptr , image-kodeptr $10000 + , 0 , ," tkode-dp" \ code ! create tsys-dp image-sysptr , image-sysptr , image-sysptr $10000 + , 0 , ," tsys-dp" \ system : in-sys-t? dp tsys-dp = ; ! : >tapp ( -- ) tapp-dp >dp exit ; \ select app dict, save prev dict ! : >tsys ( -- ) tsys-dp >dp exit ; \ select sys dict, save prev dict ! : >tcode ( -- ) tcode-dp >dp exit ; \ select code dict, save prev dict ! : >tkode ( -- ) tkode-dp >dp exit ; \ select kode dict, save prev dict ' dp> alias tapp> --- 91,115 ---- \ -------------------- Deferred app space words ------------------------ ! $10000 dup malloc to image-codeptr image-codeptr swap $90 fill \ where code is built ! $10000 dup malloc to image-appptr image-appptr swap erase \ where target app is built ! $10000 dup malloc to image-kodeptr image-kodeptr swap $90 fill \ where sys-code is built ! $10000 dup malloc to image-sysptr image-sysptr swap erase \ where target heads are built ! image-origin image-csep + image-codeptr - constant tcode-base \ target data base ! image-origin image-asep + image-appptr - constant tapp-base \ target dictionary base ! image-origin image-ssep + image-sysptr - constant tsys-base \ target header base ! image-origin image-ksep + image-kodeptr - constant tkode-base \ target sys code base ! create tcode-dp image-codeptr , image-codeptr , image-codeptr $10000 + , 0 , ," tcode-dp" \ code ! create tapp-dp image-appptr , image-appptr , image-appptr $10000 + , 0 , ," tapp-dp" \ app ! create tkode-dp image-kodeptr , image-kodeptr , image-kodeptr $10000 + , 0 , ," tkode-dp" \ code ! create tsys-dp image-sysptr , image-sysptr , image-sysptr $10000 + , 0 , ," tsys-dp" \ system : in-sys-t? dp tsys-dp = ; ! : >tapp ( -- ) tapp-dp >dp exit ; \ select app dict, save prev dict ! : >tsys ( -- ) tsys-dp >dp exit ; \ select sys dict, save prev dict ! : >tcode ( -- ) tcode-dp >dp exit ; \ select code dict, save prev dict ! : >tkode ( -- ) tkode-dp >dp exit ; \ select kode dict, save prev dict ' dp> alias tapp> *************** *** 1370,1479 **** .olly - \ temp for debugging - \s - - t: @ ( addr -- n ) - macro[ - mov eax, [eax] - ]macro ; - - t: ! ( n addr -- ) - macro[ - mov ecx, [ebp] - mov [eax], ecx - mov eax, 4 [ebp] - lea ebp, 8 [ebp] - ]macro ; - - t: + ( n m -- l ) - macro[ - add eax, [ebp] - lea ebp, 4 [ebp] - ]macro ; - - t: - ( n m -- l ) - macro[ - neg eax - add eax, [ebp] - lea ebp, 4 [ebp] - ]macro ; - - t: cell+ ( n m -- l ) - macro[ - add eax, # 4 - ]macro ; - - t: cell- ( n m -- l ) - macro[ - sub eax, # 4 - ]macro ; - - t: 0= ( n m -- l ) - macro[ - cmp eax, # 1 - sbb eax, eax - ]macro ; - - t: or ( n m -- l ) - macro[ - or eax, [ebp] - lea ebp, 4 [ebp] - ]macro ; ! t: and ( n m -- l ) ! macro[ ! and eax, [ebp] ! lea ebp, 4 [ebp] ! ]macro ; ! ! t: dup ( n -- n n ) ! macro[ ! mov -4 [ebp], eax ! lea ebp, -4 [ebp] ! ]macro ; ! ! t: swap ( n m -- m n ) ! macro[ ! mov ecx, [ebp] ! mov [ebp], eax ! mov eax, ecx ! ]macro ; ! ! t: over ( n1 n2 -- n1 n2 n1 ) ! macro[ ! mov -4 [ebp], eax ! mov eax, [ebp] ! lea ebp, -4 [ebp] ! ]macro ; ! ! t: 0 ( -- 0 ) ! macro[ ! mov -4 [ebp], eax ! xor eax, eax ! lea ebp, -4 [ebp] ! ]macro ; ! ! t: 1 ( -- 0 ) ! macro[ ! mov -4 [ebp], eax ! xor eax, eax ! inc eax ! lea ebp, -4 [ebp] ! ]macro ; ! ! t: 1- ( n -- n-1 ) ! macro[ ! dec eax ! ]macro ; ! ! t: 1+ ( n -- n-1 ) ! macro[ ! inc eax ! ]macro ; ! ! t: c@ ( n -- n-1 ) ! macro[ ! movzx eax, byte [eax] ! ]macro ; (( --- 1370,1375 ---- .olly ! \s (( |