1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2026-04-20 01:16:36 +00:00

Fix SEL and SUBI

This commit is contained in:
David Schmenk
2018-03-22 12:23:25 -07:00
parent 81574a8a62
commit cdb0dac92f
8 changed files with 1112 additions and 936 deletions
+3
View File
@@ -51,6 +51,9 @@ import cmdsys
word sysread
word syswrite
byte syserr
byte jitcount
byte jitsize
word jitwarmup
byte refcons // Apple /// specific
byte devcons // Apple /// specific
byte cmdparser
+1051 -907
View File
File diff suppressed because it is too large Load Diff
+32 -20
View File
@@ -1,38 +1,50 @@
//
// PLASMA JIT bytecode compiler
// PLASMA JIT bytecode compiler tuner
//
include "inc/cmdsys.plh"
include "inc/args.plh"
const jitcount = syserr+1
const jitsize = jitcount+1
const jitwarmup = jitsize+1
word arg
var arg, val
def atoi(strptr)
word num
num = 0
var num, len
if ^strptr < '0' or ^strptr > '9'
repeat
num = num * 10 + ^strptr - '0'
strptr++
until ^strptr < '0' or ^strptr > '9'
fin
num = 0
len = ^strptr
strptr++
while len and ^strptr >= '0' and ^strptr <= '9'
num = num * 10 + ^strptr - '0'
strptr++
len--
loop
return num
end
arg = argNext(argFirst)
if ^arg
cmdsys.jitcount = atoi(arg)
arg = argNext(arg)
if ^arg
cmdsys:warmup = atoi(arg)
if arg->1 >= '0' and arg->1 <= '9'
cmdsys:jitwarmup = atoi(arg)
arg = argNext(arg)
if ^arg
cmdsys.jitsize = atoi(arg)
val = atoi(arg)
if val > 255
val = 255
fin
cmdsys.jitcount = val
arg = argNext(arg)
if ^arg
val = atoi(arg)
if val > 255
val = 255
fin
cmdsys.jitsize = val
fin
fin
else
puts("Usage: JITUNE WARMUP [CALLCOUNT [MAXSIZE]]\n")
fin
else
puts("Usage: JITUNE CALLCOUNT [WARMUP [MAXSIZE]]\n")
fin
puts("JIT Warm Up: "); puti(cmdsys:jitwarmup); putln
puts("JIT Call Count: "); puti(cmdsys.jitcount); putln
puts("JIT Max Size: "); puti(cmdsys.jitsize); putln
done
+6 -1
View File
@@ -14,6 +14,7 @@ PLVMZP_C64 = vmsrc/c64/plvmzp.inc
PLVMC64 = rel/c64/PLASMA
ED = rel/ED\#FE1000
JIT = rel/apple/JIT\#FE1000
JITUNE = rel/apple/JITUNE\#FE1000
SOS = rel/apple/SOS\#FE1000
ROD = rel/ROD\#FE1000
SIEVE = rel/SIEVE\#FE1000
@@ -79,7 +80,7 @@ TXTTYPE = .TXT
#SYSTYPE = \#FF2000
#TXTTYPE = \#040000
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVMJIT) $(PLVM802) $(PLVM03) $(CMD) $(CMDJIT) $(JIT) $(JITUNE) $(SOSCMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
-rm vmsrc/plvmzp.inc
c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64)
@@ -369,4 +370,8 @@ $(JIT): libsrc/apple/jit.pla $(PLVMJIT) $(PLASM)
./$(PLASM) -AMO < libsrc/apple/jit.pla > libsrc/apple/jit.a
acme --setpc 4094 -o $(JIT) libsrc/apple/jit.a
$(JITUNE): libsrc/apple/jitune.pla $(PLVMJIT) $(PLASM)
./$(PLASM) -AMO < libsrc/apple/jitune.pla > libsrc/apple/jitune.a
acme --setpc 4094 -o $(JITUNE) libsrc/apple/jitune.a
+1
View File
@@ -33,6 +33,7 @@ cp rel/apple/UTHERNET2#FE1000 prodos/sys/UTHERNET2.REL
cp rel/apple/SOS#FE1000 prodos/sys/SOS.REL
cp rel/apple/GRAFIX#FE1000 prodos/sys/GRAFIX.REL
cp rel/apple/JIT#FE1000 prodos/sys/JIT.REL
cp rel/apple/JITUNE#FE1000 prodos/sys/JITUNE.REL
cp ../sysfiles/FP6502.CODE#060000 prodos/sys/FP6502.CODE.BIN
cp ../sysfiles/ELEMS.CODE#060000 prodos/sys/ELEMS.CODE.BIN
+8 -3
View File
@@ -43,6 +43,9 @@ word syspath
word syscmdln
word = @execmod, @open, @close, @read, @write
byte perr
byte jitcount = $10
byte jitsize = $FF
word jitwarmup = $0100
//
// Working input buffer overlayed with strings table
//
@@ -917,9 +920,10 @@ def availheap()#1
return @fp - heap
end
def allocheap(size)#1
word addr
addr = heap
heap = heap + size
word oldheap, addr
oldheap = heap
addr = heap
heap = heap + size
if systemflags & reshgr1
if uword_islt(addr, $4000) and uword_isgt(heap, $2000)
addr = $4000
@@ -933,6 +937,7 @@ def allocheap(size)#1
fin
fin
if uword_isge(heap, @addr)
heap = oldheap
return 0
fin
return addr
+7 -5
View File
@@ -60,9 +60,9 @@ word syspath
word syscmdln
word = @execmod, @open, @close, @read, @write
byte perr
byte jitcount = $10
byte jitcount = $01
byte jitsize = $FF
word jitwarmup = $0100
word jitwarmup = $0000
//
// Working input buffer overlayed with strings table
//
@@ -941,9 +941,10 @@ def availheap()#1
return @fp - heap
end
def allocheap(size)#1
word addr
addr = heap
heap = heap + size
word oldheap, addr
oldheap = heap
addr = heap
heap = heap + size
if systemflags & reshgr1
if uword_islt(addr, $4000) and uword_isgt(heap, $2000)
addr = $4000
@@ -957,6 +958,7 @@ def allocheap(size)#1
fin
fin
if uword_isge(heap, @addr)
heap = oldheap
return 0
fin
return addr
+4
View File
@@ -34,6 +34,9 @@ word syspath
word cmdlnptr
word = @execmod, @open, @close, @read, @write
byte perr
byte jitcount = $10
byte jitsize = $FF
word jitwarmup = $0100
byte refcons = 0
byte devcons = 0
word cmdparser
@@ -940,6 +943,7 @@ def allocheap(size)#1
addr = heap
heap = heap + size
if uword_isge(heap, @addr)
heap = addr
return 0
fin
return addr