(asma) Remove LIT merging optimisation.

This commit is contained in:
Andrew Alderwick 2022-10-19 12:22:35 +01:00
parent ca6d755bd6
commit 1064d88b33
1 changed files with 5 additions and 32 deletions

View File

@ -225,7 +225,6 @@
;asma-read-buffer DUP2 ;asma-read-buffer/end ROT2 SUB2 ( func* line^ filename* buf* size^ )
ROT2 ( func* line^ buf* size^ filename* )
,file-read-chunks JSR
;asma-flush-lit JSR2
asma-IF-ERROR ,&error JCN
@ -351,7 +350,7 @@
@asma [
&pass $1 &state $1 &line $2 &lines $2 &break $1 &eof $1
&comment-level $1
&token $2 &orig-token $2 &lit $1 &lit-present $1
&token $2 &orig-token $2
&addr $2 &written-addr $2 &flush-fn $2
&src-filename $2 &dest-filename $2
&error $2 &log-level $1
@ -515,15 +514,8 @@
JMP2r
@asma-write-lit ( byte -- )
;asma/lit LDA2 ,&present JCN
POP #01 ;asma/lit STA2
#0002 ,asma-advance-addr JMP ( tail call )
&present
#fffe ,asma-advance-addr JSR
LIT LIT2 ,asma-write-byte/raw JSR
,asma-write-byte/raw JSR
,asma-write-byte/raw JSR
#0000 ;asma/lit STA2
LIT LIT ,asma-write-byte JSR
,asma-write-byte JSR
JMP2r
@asma-advance-addr ( delta* -- )
@ -532,24 +524,12 @@
SWP2 STA2
JMP2r
@asma-flush-lit ( -- )
;asma/lit LDA2 ,&present JCN
POP JMP2r
&present
#fffe ,asma-advance-addr JSR
LIT LIT ,asma-write-byte/raw JSR
,asma-write-byte/raw JSR
#0000 ;asma/lit STA2
JMP2r
@asma-write-short ( short -- )
SWP
,asma-write-byte JSR
( fall through )
@asma-write-byte ( byte -- )
,asma-flush-lit JSR
&raw
;asma/addr LDA2 ;asma/written-addr LDA2
LTH2k ,&rewound JCN
&loop
@ -667,7 +647,6 @@
JMP2r
@asma-label-define
;asma-flush-lit JSR2
;asma-trees/labels ,asma-label-helper JSR
,&already-existed JCN
@ -678,7 +657,6 @@
JMP2r
@asma-sublabel-define
;asma-flush-lit JSR2
;asma-trees/scope LDA2 ,asma-label-helper JSR
POP POP2
JMP2r
@ -708,15 +686,10 @@
#00 JMP2r
@asma-pad-absolute
;asma-flush-lit JSR2
#0000 ;asma/addr STA2
,asma-pad-helper JMP
@asma-pad-relative
;asma-flush-lit JSR2
( fall through )
@asma-pad-helper ( -- )
@asma-pad-relative
#00 ;asma-parse-hex-string JSR2
,&valid JCN
@ -767,7 +740,7 @@
@asma-literal-rel-addr
,asma-addr-helper JSR
;asma/addr LDA2 SUB2
#0003 ;asma/lit-present LDA SUB SUB2
#0003 SUB2
DUP2 #0080 LTH2 STH
DUP2 #ff7f GTH2 STHr ORA ,&in-bounds JCN