1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-07-22 11:29:18 +00:00

Fix is_hw test for 16 bit JIT

This commit is contained in:
Dave Schmenk 2019-12-06 18:14:08 -08:00
parent 7f6f9e7bbd
commit 1dc0d252f8
4 changed files with 6 additions and 12 deletions

View File

@ -50,7 +50,7 @@ end
// Identify hardware addresses for certain byte sized access operations
//
def is_hwaddr(addr)
return addr >= $C000 and addr < $C100
return isuge(addr, $C000) and isult(addr, $C100)
end
include "libsrc/jit16core.pla"
//

View File

@ -11,6 +11,7 @@ def compiler(defptr)#0
byte opcode, j, A_IS_TOS, X_IS_IFP
//puts("JIT compiler invoked for :$"); puth(defptr=>bytecodeaddr); putln
defptr=>interpaddr = indirectentry // assume compile will fail
addrxlate = heapmark // heapalloc(512 + defptr->bytecodesize)
//if not addrxlate
if isult(heapavail, 512 + defptr->bytecodesize) // 256 * sizeof(word) address xlate
@ -18,7 +19,6 @@ def compiler(defptr)#0
// Not enough heap available
//
//puts("Not enough free heap\n")
defptr=>interpaddr = indirectentry
return
fin
//
@ -159,7 +159,6 @@ def compiler(defptr)#0
codeptr->3 = $C0 // NATV CODE
codeptr = codeptr + 4
i = 0
fin
while isule(codeptr, codemax)
//putc('$'); puth(codeptr); putc(':')
@ -1319,10 +1318,7 @@ def compiler(defptr)#0
fin
loop
//
// If we got here. we ran out of code buffer space. Overwrite interpreter
// entrypoint with standard bytecode interpreter
//
defptr=>interpaddr = indirectentry
// If we got here we ran out of code buffer space.
//
// Free working bufffers
//

View File

@ -29,6 +29,7 @@ def compiler(defptr)#0
byte opcode, j, A_IS_TOSL
//puts("JIT compiler invoked for :$"); puth(defptr=>bytecodeaddr); putln
defptr=>interpaddr = indirectentry // assume compile will fail
addrxlate = heapmark // heapalloc(512 + defptr->bytecodesize)
//if not addrxlate
if isult(heapavail, 512 + defptr->bytecodesize) // 256 * sizeof(word) address xlate
@ -36,7 +37,6 @@ def compiler(defptr)#0
// Not enough heap available
//
//puts("Not enough free heap\n")
defptr=>interpaddr = indirectentry
return
fin
//
@ -1545,10 +1545,7 @@ def compiler(defptr)#0
fin
loop
//
// If we got here. we ran out of code buffer space. Overwrite interpreter
// entrypoint with standard bytecode interpreter
//
defptr=>interpaddr = indirectentry
// If we got here we ran out of code buffer space.
//
// Free working bufffers
//

View File

@ -31,3 +31,4 @@ echo "BLD/INC/TESTLIB.PLH"; atftp $1 --put -l inc/testlib.plh -r $2/BLD/INC/TES
echo "BLD/MOUSETEST.PLA"; atftp $1 --put -l samplesrc/mousetest.pla -r $2/BLD/MOUSETEST.PLA#040000
echo "BLD/HTTPD.PLA"; atftp $1 --put -l samplesrc/httpd.pla -r $2/BLD/HTTPD.PLA#040000
echo "BLD/LZ4CAT.PLA"; atftp $1 --put -l samplesrc/lz4cat.pla -r $2/BLD/LZ4CAT.PLA#040000
echo "BLD/ROD.PLA"; atftp $1 --put -l samplesrc/rod.pla -r $2/BLD/ROD.PLA#040000