mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-25 20:32:25 +00:00
Added support for @nooptimize ASM tag. #599
This commit is contained in:
parent
bda0f28414
commit
7a8a42bb03
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 15355793f5 153557b229
|
||||
//KICKC FRAGMENT CACHE 13789539dd 13789557f9
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
|
2502
src/main/fragment/cache/fragment-cache-mega45gs02.asm
vendored
2502
src/main/fragment/cache/fragment-cache-mega45gs02.asm
vendored
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 15355793f5 153557b229
|
||||
//KICKC FRAGMENT CACHE 13789539dd 13789557f9
|
||||
//FRAGMENT vbuz1=vbuc1
|
||||
lda #{c1}
|
||||
sta {z1}
|
||||
|
1704
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
1704
src/main/fragment/cache/fragment-cache-mos6502x.asm
vendored
File diff suppressed because it is too large
Load Diff
2164
src/main/fragment/cache/fragment-cache-rom6502x.asm
vendored
2164
src/main/fragment/cache/fragment-cache-rom6502x.asm
vendored
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@
|
||||
//KICKC FRAGMENT CACHE 15355793f5 153557b229
|
||||
//KICKC FRAGMENT CACHE 13789539dd 13789557f9
|
||||
//FRAGMENT vwuz1=vwuc1
|
||||
lda #<{c1}
|
||||
sta {z1}
|
||||
|
@ -1,4 +1,4 @@
|
||||
rega: @clob_a lda #0 @clob_a
|
||||
regx: @clob_x ldx #0 @clob_x
|
||||
regy: @clob_y ldy #0 @clob_y
|
||||
rega: @clob_a @nooptimize lda #0 @clob_a @nooptimize
|
||||
regx: @clob_x @nooptimize ldx #0 @clob_x @nooptimize
|
||||
regy: @clob_y @nooptimize ldy #0 @clob_y @nooptimize
|
||||
rti
|
@ -4,9 +4,6 @@ import dk.camelot64.cpufamily6502.CpuAddressingMode;
|
||||
import dk.camelot64.cpufamily6502.CpuOpcode;
|
||||
import dk.camelot64.kickc.model.InternalError;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/** A specific assembler instruction line (opcode, addressing mode and specific parameter value) */
|
||||
public class AsmInstruction extends AsmLine {
|
||||
|
||||
@ -19,9 +16,6 @@ public class AsmInstruction extends AsmLine {
|
||||
/** The second ASM opcode parameter. Null if not used. Only used for addressing mode Zeropage Test Relative {@link CpuAddressingMode#REZ} - eg. BBR0 $12,label */
|
||||
private String operand2;
|
||||
|
||||
/** If true the instruction will not be optimized away. */
|
||||
private boolean dontOptimize;
|
||||
|
||||
public AsmInstruction(CpuOpcode cpuOpcode, String operand1, String operand2) {
|
||||
this.cpuOpcode = cpuOpcode;
|
||||
this.operand1 = operand1;
|
||||
@ -72,14 +66,6 @@ public class AsmInstruction extends AsmLine {
|
||||
return getAsm();
|
||||
}
|
||||
|
||||
public boolean isDontOptimize() {
|
||||
return dontOptimize;
|
||||
}
|
||||
|
||||
public void setDontOptimize(boolean dontOptimize) {
|
||||
this.dontOptimize = dontOptimize;
|
||||
}
|
||||
|
||||
/***
|
||||
* Get the operand value that represents a jump target (if the opcode is a jump as defined by {@link CpuOpcode#isJump()}
|
||||
* @return The jump target operand
|
||||
|
@ -5,8 +5,6 @@ public class AsmLabel extends AsmLine {
|
||||
|
||||
private String label;
|
||||
|
||||
private boolean dontOptimize;
|
||||
|
||||
public AsmLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
@ -34,14 +32,6 @@ public class AsmLabel extends AsmLine {
|
||||
return label + ":";
|
||||
}
|
||||
|
||||
public boolean isDontOptimize() {
|
||||
return dontOptimize;
|
||||
}
|
||||
|
||||
public void setDontOptimize(boolean dontOptimize) {
|
||||
this.dontOptimize = dontOptimize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getAsm();
|
||||
|
@ -36,4 +36,11 @@ public abstract class AsmLine {
|
||||
return tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* Has the ASM line been marked as <i>don't optimize</i>?
|
||||
* @return true if the ASM should not be optimized
|
||||
*/
|
||||
public boolean isNoOptimize() {
|
||||
return getTags().has("nooptimize");
|
||||
}
|
||||
}
|
||||
|
@ -14,8 +14,10 @@ import dk.camelot64.kickc.model.types.SymbolType;
|
||||
import dk.camelot64.kickc.model.values.*;
|
||||
import dk.camelot64.kickc.parser.KickCParser;
|
||||
import dk.camelot64.kickc.parser.KickCParserBaseVisitor;
|
||||
import org.antlr.v4.runtime.tree.TerminalNode;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/** ASM Code Fragment with register/variable bindings that can be used for generating ASM code for a specific statement . */
|
||||
@ -198,26 +200,24 @@ public class AsmFragmentInstance {
|
||||
this.visit(context);
|
||||
}
|
||||
|
||||
private static AsmLine addTags(AsmLine asmLine, List<TerminalNode> asmTags) {
|
||||
if(asmTags != null)
|
||||
for(TerminalNode asmTag : asmTags) {
|
||||
final String tagName = asmTag.getText().substring(1);
|
||||
asmLine.getTags().add(tagName);
|
||||
}
|
||||
return asmLine;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object visitAsmLabelName(KickCParser.AsmLabelNameContext ctx) {
|
||||
final AsmLabel labelLine = new AsmLabel(ctx.ASM_NAME().getText());
|
||||
if(ctx.ASM_TAG()!=null) {
|
||||
final String tagName = ctx.ASM_TAG().getText().substring(1);
|
||||
labelLine.getTags().add(tagName);
|
||||
}
|
||||
asmProgram.addLine(labelLine);
|
||||
asmProgram.addLine(addTags(new AsmLabel(ctx.ASM_NAME().getText()), ctx.ASM_TAG()));
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object visitAsmLabelMulti(KickCParser.AsmLabelMultiContext ctx) {
|
||||
String label = ctx.ASM_MULTI_NAME().getText();
|
||||
final AsmLabel labelLine = new AsmLabel(label);
|
||||
if(ctx.ASM_TAG()!=null) {
|
||||
final String tagName = ctx.ASM_TAG().getText().substring(1);
|
||||
labelLine.getTags().add(tagName);
|
||||
}
|
||||
asmProgram.addLine(labelLine);
|
||||
asmProgram.addLine(addTags(new AsmLabel(ctx.ASM_MULTI_NAME().getText()), ctx.ASM_TAG()));
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -227,7 +227,7 @@ public class AsmFragmentInstance {
|
||||
for(int i = 1; i < ctx.getChildCount(); i = i + 2) {
|
||||
values.add(ctx.getChild(i).getText());
|
||||
}
|
||||
asmProgram.addLine(new AsmDataNumeric(null, AsmDataNumeric.Type.BYTE, values));
|
||||
asmProgram.addLine(addTags(new AsmDataNumeric(null, AsmDataNumeric.Type.BYTE, values), ctx.ASM_TAG()));
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -240,12 +240,8 @@ public class AsmFragmentInstance {
|
||||
} else {
|
||||
instruction = (AsmInstruction) this.visit(paramModeCtx);
|
||||
}
|
||||
if(ctx.ASM_TAG()!=null) {
|
||||
final String tagName = ctx.ASM_TAG().getText().substring(1);
|
||||
instruction.getTags().add(tagName);
|
||||
}
|
||||
if(instruction != null) {
|
||||
asmProgram.addLine(instruction);
|
||||
asmProgram.addLine(addTags(instruction, ctx.ASM_TAG()));
|
||||
} else {
|
||||
throw new RuntimeException("Error parsing ASM fragment line " + name + ".asm\n - Line: " + ctx.getText());
|
||||
}
|
||||
|
@ -279,16 +279,16 @@ asmLine
|
||||
;
|
||||
|
||||
asmLabel
|
||||
: ASM_NAME ASM_COLON ASM_TAG? #asmLabelName
|
||||
| ASM_MULTI_NAME ASM_COLON ASM_TAG? #asmLabelMulti
|
||||
: ASM_NAME ASM_COLON ASM_TAG* #asmLabelName
|
||||
| ASM_MULTI_NAME ASM_COLON ASM_TAG* #asmLabelMulti
|
||||
;
|
||||
|
||||
asmInstruction
|
||||
: ASM_MNEMONIC (asmParamMode)? ASM_TAG?
|
||||
: ASM_MNEMONIC (asmParamMode)? ASM_TAG*
|
||||
;
|
||||
|
||||
asmBytes
|
||||
: ASM_BYTE asmExpr ( ASM_COMMA asmExpr)* ASM_TAG?
|
||||
: ASM_BYTE asmExpr ( ASM_COMMA asmExpr)* ASM_TAG*
|
||||
;
|
||||
|
||||
asmParamMode
|
||||
|
File diff suppressed because one or more lines are too long
@ -6119,7 +6119,10 @@ public class KickCParser extends Parser {
|
||||
public static class AsmLabelNameContext extends AsmLabelContext {
|
||||
public TerminalNode ASM_NAME() { return getToken(KickCParser.ASM_NAME, 0); }
|
||||
public TerminalNode ASM_COLON() { return getToken(KickCParser.ASM_COLON, 0); }
|
||||
public TerminalNode ASM_TAG() { return getToken(KickCParser.ASM_TAG, 0); }
|
||||
public List<TerminalNode> ASM_TAG() { return getTokens(KickCParser.ASM_TAG); }
|
||||
public TerminalNode ASM_TAG(int i) {
|
||||
return getToken(KickCParser.ASM_TAG, i);
|
||||
}
|
||||
public AsmLabelNameContext(AsmLabelContext ctx) { copyFrom(ctx); }
|
||||
@Override
|
||||
public void enterRule(ParseTreeListener listener) {
|
||||
@ -6138,7 +6141,10 @@ public class KickCParser extends Parser {
|
||||
public static class AsmLabelMultiContext extends AsmLabelContext {
|
||||
public TerminalNode ASM_MULTI_NAME() { return getToken(KickCParser.ASM_MULTI_NAME, 0); }
|
||||
public TerminalNode ASM_COLON() { return getToken(KickCParser.ASM_COLON, 0); }
|
||||
public TerminalNode ASM_TAG() { return getToken(KickCParser.ASM_TAG, 0); }
|
||||
public List<TerminalNode> ASM_TAG() { return getTokens(KickCParser.ASM_TAG); }
|
||||
public TerminalNode ASM_TAG(int i) {
|
||||
return getToken(KickCParser.ASM_TAG, i);
|
||||
}
|
||||
public AsmLabelMultiContext(AsmLabelContext ctx) { copyFrom(ctx); }
|
||||
@Override
|
||||
public void enterRule(ParseTreeListener listener) {
|
||||
@ -6160,7 +6166,7 @@ public class KickCParser extends Parser {
|
||||
enterRule(_localctx, 84, RULE_asmLabel);
|
||||
int _la;
|
||||
try {
|
||||
setState(761);
|
||||
setState(767);
|
||||
_errHandler.sync(this);
|
||||
switch (_input.LA(1)) {
|
||||
case ASM_NAME:
|
||||
@ -6171,36 +6177,44 @@ public class KickCParser extends Parser {
|
||||
match(ASM_NAME);
|
||||
setState(752);
|
||||
match(ASM_COLON);
|
||||
setState(754);
|
||||
setState(756);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
if (_la==ASM_TAG) {
|
||||
while (_la==ASM_TAG) {
|
||||
{
|
||||
{
|
||||
setState(753);
|
||||
match(ASM_TAG);
|
||||
}
|
||||
}
|
||||
|
||||
setState(758);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ASM_MULTI_NAME:
|
||||
_localctx = new AsmLabelMultiContext(_localctx);
|
||||
enterOuterAlt(_localctx, 2);
|
||||
{
|
||||
setState(756);
|
||||
match(ASM_MULTI_NAME);
|
||||
setState(757);
|
||||
match(ASM_COLON);
|
||||
setState(759);
|
||||
match(ASM_MULTI_NAME);
|
||||
setState(760);
|
||||
match(ASM_COLON);
|
||||
setState(764);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
if (_la==ASM_TAG) {
|
||||
while (_la==ASM_TAG) {
|
||||
{
|
||||
setState(758);
|
||||
{
|
||||
setState(761);
|
||||
match(ASM_TAG);
|
||||
}
|
||||
}
|
||||
|
||||
setState(766);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@ -6223,7 +6237,10 @@ public class KickCParser extends Parser {
|
||||
public AsmParamModeContext asmParamMode() {
|
||||
return getRuleContext(AsmParamModeContext.class,0);
|
||||
}
|
||||
public TerminalNode ASM_TAG() { return getToken(KickCParser.ASM_TAG, 0); }
|
||||
public List<TerminalNode> ASM_TAG() { return getTokens(KickCParser.ASM_TAG); }
|
||||
public TerminalNode ASM_TAG(int i) {
|
||||
return getToken(KickCParser.ASM_TAG, i);
|
||||
}
|
||||
public AsmInstructionContext(ParserRuleContext parent, int invokingState) {
|
||||
super(parent, invokingState);
|
||||
}
|
||||
@ -6250,28 +6267,32 @@ public class KickCParser extends Parser {
|
||||
try {
|
||||
enterOuterAlt(_localctx, 1);
|
||||
{
|
||||
setState(763);
|
||||
setState(769);
|
||||
match(ASM_MNEMONIC);
|
||||
setState(765);
|
||||
setState(771);
|
||||
_errHandler.sync(this);
|
||||
switch ( getInterpreter().adaptivePredict(_input,82,_ctx) ) {
|
||||
case 1:
|
||||
{
|
||||
setState(764);
|
||||
setState(770);
|
||||
asmParamMode();
|
||||
}
|
||||
break;
|
||||
}
|
||||
setState(768);
|
||||
setState(776);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
if (_la==ASM_TAG) {
|
||||
while (_la==ASM_TAG) {
|
||||
{
|
||||
setState(767);
|
||||
{
|
||||
setState(773);
|
||||
match(ASM_TAG);
|
||||
}
|
||||
}
|
||||
|
||||
setState(778);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
@ -6297,7 +6318,10 @@ public class KickCParser extends Parser {
|
||||
public TerminalNode ASM_COMMA(int i) {
|
||||
return getToken(KickCParser.ASM_COMMA, i);
|
||||
}
|
||||
public TerminalNode ASM_TAG() { return getToken(KickCParser.ASM_TAG, 0); }
|
||||
public List<TerminalNode> ASM_TAG() { return getTokens(KickCParser.ASM_TAG); }
|
||||
public TerminalNode ASM_TAG(int i) {
|
||||
return getToken(KickCParser.ASM_TAG, i);
|
||||
}
|
||||
public AsmBytesContext(ParserRuleContext parent, int invokingState) {
|
||||
super(parent, invokingState);
|
||||
}
|
||||
@ -6324,36 +6348,40 @@ public class KickCParser extends Parser {
|
||||
try {
|
||||
enterOuterAlt(_localctx, 1);
|
||||
{
|
||||
setState(770);
|
||||
setState(779);
|
||||
match(ASM_BYTE);
|
||||
setState(771);
|
||||
setState(780);
|
||||
asmExpr(0);
|
||||
setState(776);
|
||||
setState(785);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
while (_la==ASM_COMMA) {
|
||||
{
|
||||
{
|
||||
setState(772);
|
||||
setState(781);
|
||||
match(ASM_COMMA);
|
||||
setState(773);
|
||||
setState(782);
|
||||
asmExpr(0);
|
||||
}
|
||||
}
|
||||
setState(778);
|
||||
setState(787);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
}
|
||||
setState(780);
|
||||
setState(791);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
if (_la==ASM_TAG) {
|
||||
while (_la==ASM_TAG) {
|
||||
{
|
||||
setState(779);
|
||||
{
|
||||
setState(788);
|
||||
match(ASM_TAG);
|
||||
}
|
||||
}
|
||||
|
||||
setState(793);
|
||||
_errHandler.sync(this);
|
||||
_la = _input.LA(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (RecognitionException re) {
|
||||
@ -6597,14 +6625,14 @@ public class KickCParser extends Parser {
|
||||
AsmParamModeContext _localctx = new AsmParamModeContext(_ctx, getState());
|
||||
enterRule(_localctx, 90, RULE_asmParamMode);
|
||||
try {
|
||||
setState(827);
|
||||
setState(839);
|
||||
_errHandler.sync(this);
|
||||
switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) {
|
||||
case 1:
|
||||
_localctx = new AsmModeAbsContext(_localctx);
|
||||
enterOuterAlt(_localctx, 1);
|
||||
{
|
||||
setState(782);
|
||||
setState(794);
|
||||
asmExpr(0);
|
||||
}
|
||||
break;
|
||||
@ -6612,9 +6640,9 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeImmContext(_localctx);
|
||||
enterOuterAlt(_localctx, 2);
|
||||
{
|
||||
setState(783);
|
||||
setState(795);
|
||||
match(ASM_IMM);
|
||||
setState(784);
|
||||
setState(796);
|
||||
asmExpr(0);
|
||||
}
|
||||
break;
|
||||
@ -6622,11 +6650,11 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeAbsXYContext(_localctx);
|
||||
enterOuterAlt(_localctx, 3);
|
||||
{
|
||||
setState(785);
|
||||
setState(797);
|
||||
asmExpr(0);
|
||||
setState(786);
|
||||
setState(798);
|
||||
match(ASM_COMMA);
|
||||
setState(787);
|
||||
setState(799);
|
||||
asmExpr(0);
|
||||
}
|
||||
break;
|
||||
@ -6634,15 +6662,15 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeIndIdxXYContext(_localctx);
|
||||
enterOuterAlt(_localctx, 4);
|
||||
{
|
||||
setState(789);
|
||||
setState(801);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(790);
|
||||
setState(802);
|
||||
asmExpr(0);
|
||||
setState(791);
|
||||
setState(803);
|
||||
match(ASM_PAR_END);
|
||||
setState(792);
|
||||
setState(804);
|
||||
match(ASM_COMMA);
|
||||
setState(793);
|
||||
setState(805);
|
||||
match(ASM_NAME);
|
||||
}
|
||||
break;
|
||||
@ -6650,19 +6678,19 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeIndLongIdxXYContext(_localctx);
|
||||
enterOuterAlt(_localctx, 5);
|
||||
{
|
||||
setState(795);
|
||||
setState(807);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(796);
|
||||
setState(808);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(797);
|
||||
setState(809);
|
||||
asmExpr(0);
|
||||
setState(798);
|
||||
setState(810);
|
||||
match(ASM_PAR_END);
|
||||
setState(799);
|
||||
setState(811);
|
||||
match(ASM_PAR_END);
|
||||
setState(800);
|
||||
setState(812);
|
||||
match(ASM_COMMA);
|
||||
setState(801);
|
||||
setState(813);
|
||||
match(ASM_NAME);
|
||||
}
|
||||
break;
|
||||
@ -6670,19 +6698,19 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeSPIndIdxContext(_localctx);
|
||||
enterOuterAlt(_localctx, 6);
|
||||
{
|
||||
setState(803);
|
||||
setState(815);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(804);
|
||||
setState(816);
|
||||
asmExpr(0);
|
||||
setState(805);
|
||||
setState(817);
|
||||
match(ASM_COMMA);
|
||||
setState(806);
|
||||
setState(818);
|
||||
match(ASM_NAME);
|
||||
setState(807);
|
||||
setState(819);
|
||||
match(ASM_PAR_END);
|
||||
setState(808);
|
||||
setState(820);
|
||||
match(ASM_COMMA);
|
||||
setState(809);
|
||||
setState(821);
|
||||
match(ASM_NAME);
|
||||
}
|
||||
break;
|
||||
@ -6690,15 +6718,15 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeIdxIndXYContext(_localctx);
|
||||
enterOuterAlt(_localctx, 7);
|
||||
{
|
||||
setState(811);
|
||||
setState(823);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(812);
|
||||
setState(824);
|
||||
asmExpr(0);
|
||||
setState(813);
|
||||
setState(825);
|
||||
match(ASM_COMMA);
|
||||
setState(814);
|
||||
setState(826);
|
||||
match(ASM_NAME);
|
||||
setState(815);
|
||||
setState(827);
|
||||
match(ASM_PAR_END);
|
||||
}
|
||||
break;
|
||||
@ -6706,11 +6734,11 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeIndContext(_localctx);
|
||||
enterOuterAlt(_localctx, 8);
|
||||
{
|
||||
setState(817);
|
||||
setState(829);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(818);
|
||||
setState(830);
|
||||
asmExpr(0);
|
||||
setState(819);
|
||||
setState(831);
|
||||
match(ASM_PAR_END);
|
||||
}
|
||||
break;
|
||||
@ -6718,15 +6746,15 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmModeIndLongContext(_localctx);
|
||||
enterOuterAlt(_localctx, 9);
|
||||
{
|
||||
setState(821);
|
||||
setState(833);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(822);
|
||||
setState(834);
|
||||
match(ASM_PAR_BEGIN);
|
||||
setState(823);
|
||||
setState(835);
|
||||
asmExpr(0);
|
||||
setState(824);
|
||||
setState(836);
|
||||
match(ASM_PAR_END);
|
||||
setState(825);
|
||||
setState(837);
|
||||
match(ASM_PAR_END);
|
||||
}
|
||||
break;
|
||||
@ -6931,7 +6959,7 @@ public class KickCParser extends Parser {
|
||||
int _alt;
|
||||
enterOuterAlt(_localctx, 1);
|
||||
{
|
||||
setState(843);
|
||||
setState(855);
|
||||
_errHandler.sync(this);
|
||||
switch (_input.LA(1)) {
|
||||
case ASM_BRACKET_BEGIN:
|
||||
@ -6940,11 +6968,11 @@ public class KickCParser extends Parser {
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
|
||||
setState(830);
|
||||
setState(842);
|
||||
match(ASM_BRACKET_BEGIN);
|
||||
setState(831);
|
||||
setState(843);
|
||||
asmExpr(0);
|
||||
setState(832);
|
||||
setState(844);
|
||||
match(ASM_BRACKET_END);
|
||||
}
|
||||
break;
|
||||
@ -6956,7 +6984,7 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmExprUnaryContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(834);
|
||||
setState(846);
|
||||
_la = _input.LA(1);
|
||||
if ( !(((((_la - 125)) & ~0x3f) == 0 && ((1L << (_la - 125)) & ((1L << (ASM_PLUS - 125)) | (1L << (ASM_MINUS - 125)) | (1L << (ASM_LESS_THAN - 125)) | (1L << (ASM_GREATER_THAN - 125)))) != 0)) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
@ -6966,7 +6994,7 @@ public class KickCParser extends Parser {
|
||||
_errHandler.reportMatch(this);
|
||||
consume();
|
||||
}
|
||||
setState(835);
|
||||
setState(847);
|
||||
asmExpr(8);
|
||||
}
|
||||
break;
|
||||
@ -6975,7 +7003,7 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmExprLabelContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(836);
|
||||
setState(848);
|
||||
match(ASM_NAME);
|
||||
}
|
||||
break;
|
||||
@ -6984,7 +7012,7 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmExprLabelRelContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(837);
|
||||
setState(849);
|
||||
match(ASM_MULTI_REL);
|
||||
}
|
||||
break;
|
||||
@ -6993,11 +7021,11 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmExprReplaceContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(838);
|
||||
setState(850);
|
||||
match(ASM_CURLY_BEGIN);
|
||||
setState(839);
|
||||
setState(851);
|
||||
match(ASM_NAME);
|
||||
setState(840);
|
||||
setState(852);
|
||||
match(ASM_CURLY_END);
|
||||
}
|
||||
break;
|
||||
@ -7006,7 +7034,7 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmExprIntContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(841);
|
||||
setState(853);
|
||||
match(ASM_NUMBER);
|
||||
}
|
||||
break;
|
||||
@ -7015,7 +7043,7 @@ public class KickCParser extends Parser {
|
||||
_localctx = new AsmExprCharContext(_localctx);
|
||||
_ctx = _localctx;
|
||||
_prevctx = _localctx;
|
||||
setState(842);
|
||||
setState(854);
|
||||
match(ASM_CHAR);
|
||||
}
|
||||
break;
|
||||
@ -7023,7 +7051,7 @@ public class KickCParser extends Parser {
|
||||
throw new NoViableAltException(this);
|
||||
}
|
||||
_ctx.stop = _input.LT(-1);
|
||||
setState(859);
|
||||
setState(871);
|
||||
_errHandler.sync(this);
|
||||
_alt = getInterpreter().adaptivePredict(_input,89,_ctx);
|
||||
while ( _alt!=2 && _alt!=org.antlr.v4.runtime.atn.ATN.INVALID_ALT_NUMBER ) {
|
||||
@ -7031,20 +7059,20 @@ public class KickCParser extends Parser {
|
||||
if ( _parseListeners!=null ) triggerExitRuleEvent();
|
||||
_prevctx = _localctx;
|
||||
{
|
||||
setState(857);
|
||||
setState(869);
|
||||
_errHandler.sync(this);
|
||||
switch ( getInterpreter().adaptivePredict(_input,88,_ctx) ) {
|
||||
case 1:
|
||||
{
|
||||
_localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState));
|
||||
pushNewRecursionContext(_localctx, _startState, RULE_asmExpr);
|
||||
setState(845);
|
||||
setState(857);
|
||||
if (!(precpred(_ctx, 10))) throw new FailedPredicateException(this, "precpred(_ctx, 10)");
|
||||
{
|
||||
setState(846);
|
||||
setState(858);
|
||||
match(ASM_DOT);
|
||||
}
|
||||
setState(847);
|
||||
setState(859);
|
||||
asmExpr(11);
|
||||
}
|
||||
break;
|
||||
@ -7052,9 +7080,9 @@ public class KickCParser extends Parser {
|
||||
{
|
||||
_localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState));
|
||||
pushNewRecursionContext(_localctx, _startState, RULE_asmExpr);
|
||||
setState(848);
|
||||
setState(860);
|
||||
if (!(precpred(_ctx, 9))) throw new FailedPredicateException(this, "precpred(_ctx, 9)");
|
||||
setState(849);
|
||||
setState(861);
|
||||
_la = _input.LA(1);
|
||||
if ( !(_la==ASM_SHIFT_LEFT || _la==ASM_SHIFT_RIGHT) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
@ -7064,7 +7092,7 @@ public class KickCParser extends Parser {
|
||||
_errHandler.reportMatch(this);
|
||||
consume();
|
||||
}
|
||||
setState(850);
|
||||
setState(862);
|
||||
asmExpr(10);
|
||||
}
|
||||
break;
|
||||
@ -7072,9 +7100,9 @@ public class KickCParser extends Parser {
|
||||
{
|
||||
_localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState));
|
||||
pushNewRecursionContext(_localctx, _startState, RULE_asmExpr);
|
||||
setState(851);
|
||||
setState(863);
|
||||
if (!(precpred(_ctx, 7))) throw new FailedPredicateException(this, "precpred(_ctx, 7)");
|
||||
setState(852);
|
||||
setState(864);
|
||||
_la = _input.LA(1);
|
||||
if ( !(_la==ASM_MULTIPLY || _la==ASM_DIVIDE) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
@ -7084,7 +7112,7 @@ public class KickCParser extends Parser {
|
||||
_errHandler.reportMatch(this);
|
||||
consume();
|
||||
}
|
||||
setState(853);
|
||||
setState(865);
|
||||
asmExpr(8);
|
||||
}
|
||||
break;
|
||||
@ -7092,9 +7120,9 @@ public class KickCParser extends Parser {
|
||||
{
|
||||
_localctx = new AsmExprBinaryContext(new AsmExprContext(_parentctx, _parentState));
|
||||
pushNewRecursionContext(_localctx, _startState, RULE_asmExpr);
|
||||
setState(854);
|
||||
setState(866);
|
||||
if (!(precpred(_ctx, 6))) throw new FailedPredicateException(this, "precpred(_ctx, 6)");
|
||||
setState(855);
|
||||
setState(867);
|
||||
_la = _input.LA(1);
|
||||
if ( !(_la==ASM_PLUS || _la==ASM_MINUS) ) {
|
||||
_errHandler.recoverInline(this);
|
||||
@ -7104,14 +7132,14 @@ public class KickCParser extends Parser {
|
||||
_errHandler.reportMatch(this);
|
||||
consume();
|
||||
}
|
||||
setState(856);
|
||||
setState(868);
|
||||
asmExpr(7);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
setState(861);
|
||||
setState(873);
|
||||
_errHandler.sync(this);
|
||||
_alt = getInterpreter().adaptivePredict(_input,89,_ctx);
|
||||
}
|
||||
@ -7240,7 +7268,7 @@ public class KickCParser extends Parser {
|
||||
}
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u009c\u0361\4\2\t"+
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\u009c\u036d\4\2\t"+
|
||||
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
|
||||
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
|
||||
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
|
||||
@ -7295,61 +7323,62 @@ public class KickCParser extends Parser {
|
||||
"\u02bd\n%\f%\16%\u02c0\13%\3&\3&\3&\7&\u02c5\n&\f&\16&\u02c8\13&\3\'\3"+
|
||||
"\'\5\'\u02cc\n\'\3\'\3\'\3(\3(\3(\3(\7(\u02d4\n(\f(\16(\u02d7\13(\3(\3"+
|
||||
"(\3)\3)\3)\3)\3)\3)\3)\3)\3)\3)\5)\u02e5\n)\3*\7*\u02e8\n*\f*\16*\u02eb"+
|
||||
"\13*\3+\3+\3+\5+\u02f0\n+\3,\3,\3,\5,\u02f5\n,\3,\3,\3,\5,\u02fa\n,\5"+
|
||||
",\u02fc\n,\3-\3-\5-\u0300\n-\3-\5-\u0303\n-\3.\3.\3.\3.\7.\u0309\n.\f"+
|
||||
".\16.\u030c\13.\3.\5.\u030f\n.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/"+
|
||||
"\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/"+
|
||||
"\3/\3/\3/\3/\3/\3/\3/\3/\3/\5/\u033e\n/\3\60\3\60\3\60\3\60\3\60\3\60"+
|
||||
"\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\5\60\u034e\n\60\3\60\3\60\3\60"+
|
||||
"\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\7\60\u035c\n\60\f\60\16"+
|
||||
"\60\u035f\13\60\3\60\2\t\f\30\32&FH^\61\2\4\6\b\n\f\16\20\22\24\26\30"+
|
||||
"\32\34\36 \"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^\2\r\3\2\27\30\5\2"+
|
||||
"\22\23\31\32RR\4\2!!$$\3\2\35\36\3\2\24\26\3\2\22\23\3\2\37$\3\2\177\u0082"+
|
||||
"\3\2}~\3\2\u0083\u0084\3\2\177\u0080\2\u03e2\2`\3\2\2\2\4c\3\2\2\2\6i"+
|
||||
"\3\2\2\2\bz\3\2\2\2\n|\3\2\2\2\f\177\3\2\2\2\16\u0096\3\2\2\2\20\u00bb"+
|
||||
"\3\2\2\2\22\u00c0\3\2\2\2\24\u00ca\3\2\2\2\26\u00d1\3\2\2\2\30\u00d7\3"+
|
||||
"\2\2\2\32\u00f6\3\2\2\2\34\u0106\3\2\2\2\36\u0109\3\2\2\2 \u0115\3\2\2"+
|
||||
"\2\"\u0118\3\2\2\2$\u011b\3\2\2\2&\u0123\3\2\2\2(\u012e\3\2\2\2*\u0133"+
|
||||
"\3\2\2\2,\u0144\3\2\2\2.\u014a\3\2\2\2\60\u015d\3\2\2\2\62\u015f\3\2\2"+
|
||||
"\2\64\u0173\3\2\2\2\66\u01a2\3\2\2\28\u01a5\3\2\2\2:\u01fe\3\2\2\2<\u0201"+
|
||||
"\3\2\2\2>\u020c\3\2\2\2@\u022a\3\2\2\2B\u0230\3\2\2\2D\u0232\3\2\2\2F"+
|
||||
"\u0234\3\2\2\2H\u0280\3\2\2\2J\u02c1\3\2\2\2L\u02c9\3\2\2\2N\u02cf\3\2"+
|
||||
"\2\2P\u02e4\3\2\2\2R\u02e9\3\2\2\2T\u02ef\3\2\2\2V\u02fb\3\2\2\2X\u02fd"+
|
||||
"\3\2\2\2Z\u0304\3\2\2\2\\\u033d\3\2\2\2^\u034d\3\2\2\2`a\5\6\4\2ab\7\2"+
|
||||
"\2\3b\3\3\2\2\2cd\5R*\2de\7\2\2\3e\5\3\2\2\2fh\5\b\5\2gf\3\2\2\2hk\3\2"+
|
||||
"\2\2ig\3\2\2\2ij\3\2\2\2j\7\3\2\2\2ki\3\2\2\2lm\5\n\6\2mn\7\n\2\2n{\3"+
|
||||
"\2\2\2op\5\36\20\2pq\7\n\2\2q{\3\2\2\2rs\5$\23\2st\7\n\2\2t{\3\2\2\2u"+
|
||||
"{\5*\26\2v{\5\62\32\2wx\5\16\b\2xy\7\n\2\2y{\3\2\2\2zl\3\2\2\2zo\3\2\2"+
|
||||
"\2zr\3\2\2\2zu\3\2\2\2zv\3\2\2\2zw\3\2\2\2{\t\3\2\2\2|}\5\22\n\2}~\5\f"+
|
||||
"\7\2~\13\3\2\2\2\177\u0083\b\7\1\2\u0080\u0082\5\24\13\2\u0081\u0080\3"+
|
||||
"\2\2\2\u0082\u0085\3\2\2\2\u0083\u0081\3\2\2\2\u0083\u0084\3\2\2\2\u0084"+
|
||||
"\u0086\3\2\2\2\u0085\u0083\3\2\2\2\u0086\u0087\5\20\t\2\u0087\u0093\3"+
|
||||
"\2\2\2\u0088\u0089\f\3\2\2\u0089\u008d\7\f\2\2\u008a\u008c\5\24\13\2\u008b"+
|
||||
"\u008a\3\2\2\2\u008c\u008f\3\2\2\2\u008d\u008b\3\2\2\2\u008d\u008e\3\2"+
|
||||
"\2\2\u008e\u0090\3\2\2\2\u008f\u008d\3\2\2\2\u0090\u0092\5\20\t\2\u0091"+
|
||||
"\u0088\3\2\2\2\u0092\u0095\3\2\2\2\u0093\u0091\3\2\2\2\u0093\u0094\3\2"+
|
||||
"\2\2\u0094\r\3\2\2\2\u0095\u0093\3\2\2\2\u0096\u0097\7)\2\2\u0097\u009b"+
|
||||
"\5\22\n\2\u0098\u009a\5\24\13\2\u0099\u0098\3\2\2\2\u009a\u009d\3\2\2"+
|
||||
"\2\u009b\u0099\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009e\3\2\2\2\u009d\u009b"+
|
||||
"\3\2\2\2\u009e\u00a2\7m\2\2\u009f\u00a1\5\26\f\2\u00a0\u009f\3\2\2\2\u00a1"+
|
||||
"\u00a4\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00a5\3\2"+
|
||||
"\2\2\u00a4\u00a2\3\2\2\2\u00a5\u00a6\b\b\1\2\u00a6\17\3\2\2\2\u00a7\u00ab"+
|
||||
"\7m\2\2\u00a8\u00aa\5\26\f\2\u00a9\u00a8\3\2\2\2\u00aa\u00ad\3\2\2\2\u00ab"+
|
||||
"\u00a9\3\2\2\2\u00ab\u00ac\3\2\2\2\u00ac\u00b0\3\2\2\2\u00ad\u00ab\3\2"+
|
||||
"\2\2\u00ae\u00af\7\'\2\2\u00af\u00b1\5H%\2\u00b0\u00ae\3\2\2\2\u00b0\u00b1"+
|
||||
"\3\2\2\2\u00b1\u00bc\3\2\2\2\u00b2\u00b6\7m\2\2\u00b3\u00b5\5\26\f\2\u00b4"+
|
||||
"\u00b3\3\2\2\2\u00b5\u00b8\3\2\2\2\u00b6\u00b4\3\2\2\2\u00b6\u00b7\3\2"+
|
||||
"\2\2\u00b7\u00b9\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b9\u00ba\7\'\2\2\u00ba"+
|
||||
"\u00bc\5L\'\2\u00bb\u00a7\3\2\2\2\u00bb\u00b2\3\2\2\2\u00bc\21\3\2\2\2"+
|
||||
"\u00bd\u00bf\5\66\34\2\u00be\u00bd\3\2\2\2\u00bf\u00c2\3\2\2\2\u00c0\u00be"+
|
||||
"\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\u00c3\3\2\2\2\u00c2\u00c0\3\2\2\2\u00c3"+
|
||||
"\u00c7\5\32\16\2\u00c4\u00c6\5\66\34\2\u00c5\u00c4\3\2\2\2\u00c6\u00c9"+
|
||||
"\3\2\2\2\u00c7\u00c5\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\23\3\2\2\2\u00c9"+
|
||||
"\u00c7\3\2\2\2\u00ca\u00ce\7\24\2\2\u00cb\u00cd\5\66\34\2\u00cc\u00cb"+
|
||||
"\3\2\2\2\u00cd\u00d0\3\2\2\2\u00ce\u00cc\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cf"+
|
||||
"\25\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d1\u00d3\7\6\2\2\u00d2\u00d4\5H%\2"+
|
||||
"\u00d3\u00d2\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4\u00d5\3\2\2\2\u00d5\u00d6"+
|
||||
"\7\7\2\2\u00d6\27\3\2\2\2\u00d7\u00d8\b\r\1\2\u00d8\u00d9\5\32\16\2\u00d9"+
|
||||
"\13*\3+\3+\3+\5+\u02f0\n+\3,\3,\3,\7,\u02f5\n,\f,\16,\u02f8\13,\3,\3,"+
|
||||
"\3,\7,\u02fd\n,\f,\16,\u0300\13,\5,\u0302\n,\3-\3-\5-\u0306\n-\3-\7-\u0309"+
|
||||
"\n-\f-\16-\u030c\13-\3.\3.\3.\3.\7.\u0312\n.\f.\16.\u0315\13.\3.\7.\u0318"+
|
||||
"\n.\f.\16.\u031b\13.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+
|
||||
"/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3"+
|
||||
"/\3/\3/\3/\3/\3/\5/\u034a\n/\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3"+
|
||||
"\60\3\60\3\60\3\60\3\60\3\60\5\60\u035a\n\60\3\60\3\60\3\60\3\60\3\60"+
|
||||
"\3\60\3\60\3\60\3\60\3\60\3\60\3\60\7\60\u0368\n\60\f\60\16\60\u036b\13"+
|
||||
"\60\3\60\2\t\f\30\32&FH^\61\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \""+
|
||||
"$&(*,.\60\62\64\668:<>@BDFHJLNPRTVXZ\\^\2\r\3\2\27\30\5\2\22\23\31\32"+
|
||||
"RR\4\2!!$$\3\2\35\36\3\2\24\26\3\2\22\23\3\2\37$\3\2\177\u0082\3\2}~\3"+
|
||||
"\2\u0083\u0084\3\2\177\u0080\2\u03ee\2`\3\2\2\2\4c\3\2\2\2\6i\3\2\2\2"+
|
||||
"\bz\3\2\2\2\n|\3\2\2\2\f\177\3\2\2\2\16\u0096\3\2\2\2\20\u00bb\3\2\2\2"+
|
||||
"\22\u00c0\3\2\2\2\24\u00ca\3\2\2\2\26\u00d1\3\2\2\2\30\u00d7\3\2\2\2\32"+
|
||||
"\u00f6\3\2\2\2\34\u0106\3\2\2\2\36\u0109\3\2\2\2 \u0115\3\2\2\2\"\u0118"+
|
||||
"\3\2\2\2$\u011b\3\2\2\2&\u0123\3\2\2\2(\u012e\3\2\2\2*\u0133\3\2\2\2,"+
|
||||
"\u0144\3\2\2\2.\u014a\3\2\2\2\60\u015d\3\2\2\2\62\u015f\3\2\2\2\64\u0173"+
|
||||
"\3\2\2\2\66\u01a2\3\2\2\28\u01a5\3\2\2\2:\u01fe\3\2\2\2<\u0201\3\2\2\2"+
|
||||
">\u020c\3\2\2\2@\u022a\3\2\2\2B\u0230\3\2\2\2D\u0232\3\2\2\2F\u0234\3"+
|
||||
"\2\2\2H\u0280\3\2\2\2J\u02c1\3\2\2\2L\u02c9\3\2\2\2N\u02cf\3\2\2\2P\u02e4"+
|
||||
"\3\2\2\2R\u02e9\3\2\2\2T\u02ef\3\2\2\2V\u0301\3\2\2\2X\u0303\3\2\2\2Z"+
|
||||
"\u030d\3\2\2\2\\\u0349\3\2\2\2^\u0359\3\2\2\2`a\5\6\4\2ab\7\2\2\3b\3\3"+
|
||||
"\2\2\2cd\5R*\2de\7\2\2\3e\5\3\2\2\2fh\5\b\5\2gf\3\2\2\2hk\3\2\2\2ig\3"+
|
||||
"\2\2\2ij\3\2\2\2j\7\3\2\2\2ki\3\2\2\2lm\5\n\6\2mn\7\n\2\2n{\3\2\2\2op"+
|
||||
"\5\36\20\2pq\7\n\2\2q{\3\2\2\2rs\5$\23\2st\7\n\2\2t{\3\2\2\2u{\5*\26\2"+
|
||||
"v{\5\62\32\2wx\5\16\b\2xy\7\n\2\2y{\3\2\2\2zl\3\2\2\2zo\3\2\2\2zr\3\2"+
|
||||
"\2\2zu\3\2\2\2zv\3\2\2\2zw\3\2\2\2{\t\3\2\2\2|}\5\22\n\2}~\5\f\7\2~\13"+
|
||||
"\3\2\2\2\177\u0083\b\7\1\2\u0080\u0082\5\24\13\2\u0081\u0080\3\2\2\2\u0082"+
|
||||
"\u0085\3\2\2\2\u0083\u0081\3\2\2\2\u0083\u0084\3\2\2\2\u0084\u0086\3\2"+
|
||||
"\2\2\u0085\u0083\3\2\2\2\u0086\u0087\5\20\t\2\u0087\u0093\3\2\2\2\u0088"+
|
||||
"\u0089\f\3\2\2\u0089\u008d\7\f\2\2\u008a\u008c\5\24\13\2\u008b\u008a\3"+
|
||||
"\2\2\2\u008c\u008f\3\2\2\2\u008d\u008b\3\2\2\2\u008d\u008e\3\2\2\2\u008e"+
|
||||
"\u0090\3\2\2\2\u008f\u008d\3\2\2\2\u0090\u0092\5\20\t\2\u0091\u0088\3"+
|
||||
"\2\2\2\u0092\u0095\3\2\2\2\u0093\u0091\3\2\2\2\u0093\u0094\3\2\2\2\u0094"+
|
||||
"\r\3\2\2\2\u0095\u0093\3\2\2\2\u0096\u0097\7)\2\2\u0097\u009b\5\22\n\2"+
|
||||
"\u0098\u009a\5\24\13\2\u0099\u0098\3\2\2\2\u009a\u009d\3\2\2\2\u009b\u0099"+
|
||||
"\3\2\2\2\u009b\u009c\3\2\2\2\u009c\u009e\3\2\2\2\u009d\u009b\3\2\2\2\u009e"+
|
||||
"\u00a2\7m\2\2\u009f\u00a1\5\26\f\2\u00a0\u009f\3\2\2\2\u00a1\u00a4\3\2"+
|
||||
"\2\2\u00a2\u00a0\3\2\2\2\u00a2\u00a3\3\2\2\2\u00a3\u00a5\3\2\2\2\u00a4"+
|
||||
"\u00a2\3\2\2\2\u00a5\u00a6\b\b\1\2\u00a6\17\3\2\2\2\u00a7\u00ab\7m\2\2"+
|
||||
"\u00a8\u00aa\5\26\f\2\u00a9\u00a8\3\2\2\2\u00aa\u00ad\3\2\2\2\u00ab\u00a9"+
|
||||
"\3\2\2\2\u00ab\u00ac\3\2\2\2\u00ac\u00b0\3\2\2\2\u00ad\u00ab\3\2\2\2\u00ae"+
|
||||
"\u00af\7\'\2\2\u00af\u00b1\5H%\2\u00b0\u00ae\3\2\2\2\u00b0\u00b1\3\2\2"+
|
||||
"\2\u00b1\u00bc\3\2\2\2\u00b2\u00b6\7m\2\2\u00b3\u00b5\5\26\f\2\u00b4\u00b3"+
|
||||
"\3\2\2\2\u00b5\u00b8\3\2\2\2\u00b6\u00b4\3\2\2\2\u00b6\u00b7\3\2\2\2\u00b7"+
|
||||
"\u00b9\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b9\u00ba\7\'\2\2\u00ba\u00bc\5L"+
|
||||
"\'\2\u00bb\u00a7\3\2\2\2\u00bb\u00b2\3\2\2\2\u00bc\21\3\2\2\2\u00bd\u00bf"+
|
||||
"\5\66\34\2\u00be\u00bd\3\2\2\2\u00bf\u00c2\3\2\2\2\u00c0\u00be\3\2\2\2"+
|
||||
"\u00c0\u00c1\3\2\2\2\u00c1\u00c3\3\2\2\2\u00c2\u00c0\3\2\2\2\u00c3\u00c7"+
|
||||
"\5\32\16\2\u00c4\u00c6\5\66\34\2\u00c5\u00c4\3\2\2\2\u00c6\u00c9\3\2\2"+
|
||||
"\2\u00c7\u00c5\3\2\2\2\u00c7\u00c8\3\2\2\2\u00c8\23\3\2\2\2\u00c9\u00c7"+
|
||||
"\3\2\2\2\u00ca\u00ce\7\24\2\2\u00cb\u00cd\5\66\34\2\u00cc\u00cb\3\2\2"+
|
||||
"\2\u00cd\u00d0\3\2\2\2\u00ce\u00cc\3\2\2\2\u00ce\u00cf\3\2\2\2\u00cf\25"+
|
||||
"\3\2\2\2\u00d0\u00ce\3\2\2\2\u00d1\u00d3\7\6\2\2\u00d2\u00d4\5H%\2\u00d3"+
|
||||
"\u00d2\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4\u00d5\3\2\2\2\u00d5\u00d6\7\7"+
|
||||
"\2\2\u00d6\27\3\2\2\2\u00d7\u00d8\b\r\1\2\u00d8\u00d9\5\32\16\2\u00d9"+
|
||||
"\u00e4\3\2\2\2\u00da\u00db\f\4\2\2\u00db\u00e3\7\24\2\2\u00dc\u00dd\f"+
|
||||
"\3\2\2\u00dd\u00df\7\6\2\2\u00de\u00e0\5H%\2\u00df\u00de\3\2\2\2\u00df"+
|
||||
"\u00e0\3\2\2\2\u00e0\u00e1\3\2\2\2\u00e1\u00e3\7\7\2\2\u00e2\u00da\3\2"+
|
||||
@ -7535,52 +7564,56 @@ public class KickCParser extends Parser {
|
||||
"\u02eb\3\2\2\2\u02e9\u02e7\3\2\2\2\u02e9\u02ea\3\2\2\2\u02eaS\3\2\2\2"+
|
||||
"\u02eb\u02e9\3\2\2\2\u02ec\u02f0\5V,\2\u02ed\u02f0\5X-\2\u02ee\u02f0\5"+
|
||||
"Z.\2\u02ef\u02ec\3\2\2\2\u02ef\u02ed\3\2\2\2\u02ef\u02ee\3\2\2\2\u02f0"+
|
||||
"U\3\2\2\2\u02f1\u02f2\7\u0093\2\2\u02f2\u02f4\7v\2\2\u02f3\u02f5\7\u0094"+
|
||||
"\2\2\u02f4\u02f3\3\2\2\2\u02f4\u02f5\3\2\2\2\u02f5\u02fc\3\2\2\2\u02f6"+
|
||||
"\u02f7\7\u0092\2\2\u02f7\u02f9\7v\2\2\u02f8\u02fa\7\u0094\2\2\u02f9\u02f8"+
|
||||
"\3\2\2\2\u02f9\u02fa\3\2\2\2\u02fa\u02fc\3\2\2\2\u02fb\u02f1\3\2\2\2\u02fb"+
|
||||
"\u02f6\3\2\2\2\u02fcW\3\2\2\2\u02fd\u02ff\7t\2\2\u02fe\u0300\5\\/\2\u02ff"+
|
||||
"\u02fe\3\2\2\2\u02ff\u0300\3\2\2\2\u0300\u0302\3\2\2\2\u0301\u0303\7\u0094"+
|
||||
"\2\2\u0302\u0301\3\2\2\2\u0302\u0303\3\2\2\2\u0303Y\3\2\2\2\u0304\u0305"+
|
||||
"\7s\2\2\u0305\u030a\5^\60\2\u0306\u0307\7w\2\2\u0307\u0309\5^\60\2\u0308"+
|
||||
"\u0306\3\2\2\2\u0309\u030c\3\2\2\2\u030a\u0308\3\2\2\2\u030a\u030b\3\2"+
|
||||
"\2\2\u030b\u030e\3\2\2\2\u030c\u030a\3\2\2\2\u030d\u030f\7\u0094\2\2\u030e"+
|
||||
"\u030d\3\2\2\2\u030e\u030f\3\2\2\2\u030f[\3\2\2\2\u0310\u033e\5^\60\2"+
|
||||
"\u0311\u0312\7u\2\2\u0312\u033e\5^\60\2\u0313\u0314\5^\60\2\u0314\u0315"+
|
||||
"\7w\2\2\u0315\u0316\5^\60\2\u0316\u033e\3\2\2\2\u0317\u0318\7x\2\2\u0318"+
|
||||
"\u0319\5^\60\2\u0319\u031a\7y\2\2\u031a\u031b\7w\2\2\u031b\u031c\7\u0093"+
|
||||
"\2\2\u031c\u033e\3\2\2\2\u031d\u031e\7x\2\2\u031e\u031f\7x\2\2\u031f\u0320"+
|
||||
"\5^\60\2\u0320\u0321\7y\2\2\u0321\u0322\7y\2\2\u0322\u0323\7w\2\2\u0323"+
|
||||
"\u0324\7\u0093\2\2\u0324\u033e\3\2\2\2\u0325\u0326\7x\2\2\u0326\u0327"+
|
||||
"\5^\60\2\u0327\u0328\7w\2\2\u0328\u0329\7\u0093\2\2\u0329\u032a\7y\2\2"+
|
||||
"\u032a\u032b\7w\2\2\u032b\u032c\7\u0093\2\2\u032c\u033e\3\2\2\2\u032d"+
|
||||
"\u032e\7x\2\2\u032e\u032f\5^\60\2\u032f\u0330\7w\2\2\u0330\u0331\7\u0093"+
|
||||
"\2\2\u0331\u0332\7y\2\2\u0332\u033e\3\2\2\2\u0333\u0334\7x\2\2\u0334\u0335"+
|
||||
"\5^\60\2\u0335\u0336\7y\2\2\u0336\u033e\3\2\2\2\u0337\u0338\7x\2\2\u0338"+
|
||||
"\u0339\7x\2\2\u0339\u033a\5^\60\2\u033a\u033b\7y\2\2\u033b\u033c\7y\2"+
|
||||
"\2\u033c\u033e\3\2\2\2\u033d\u0310\3\2\2\2\u033d\u0311\3\2\2\2\u033d\u0313"+
|
||||
"\3\2\2\2\u033d\u0317\3\2\2\2\u033d\u031d\3\2\2\2\u033d\u0325\3\2\2\2\u033d"+
|
||||
"\u032d\3\2\2\2\u033d\u0333\3\2\2\2\u033d\u0337\3\2\2\2\u033e]\3\2\2\2"+
|
||||
"\u033f\u0340\b\60\1\2\u0340\u0341\7z\2\2\u0341\u0342\5^\60\2\u0342\u0343"+
|
||||
"\7{\2\2\u0343\u034e\3\2\2\2\u0344\u0345\t\t\2\2\u0345\u034e\5^\60\n\u0346"+
|
||||
"\u034e\7\u0093\2\2\u0347\u034e\7\u0091\2\2\u0348\u0349\7\u0085\2\2\u0349"+
|
||||
"\u034a\7\u0093\2\2\u034a\u034e\7\u0086\2\2\u034b\u034e\7\u0087\2\2\u034c"+
|
||||
"\u034e\7\u0090\2\2\u034d\u033f\3\2\2\2\u034d\u0344\3\2\2\2\u034d\u0346"+
|
||||
"\3\2\2\2\u034d\u0347\3\2\2\2\u034d\u0348\3\2\2\2\u034d\u034b\3\2\2\2\u034d"+
|
||||
"\u034c\3\2\2\2\u034e\u035d\3\2\2\2\u034f\u0350\f\f\2\2\u0350\u0351\7|"+
|
||||
"\2\2\u0351\u035c\5^\60\r\u0352\u0353\f\13\2\2\u0353\u0354\t\n\2\2\u0354"+
|
||||
"\u035c\5^\60\f\u0355\u0356\f\t\2\2\u0356\u0357\t\13\2\2\u0357\u035c\5"+
|
||||
"^\60\n\u0358\u0359\f\b\2\2\u0359\u035a\t\f\2\2\u035a\u035c\5^\60\t\u035b"+
|
||||
"\u034f\3\2\2\2\u035b\u0352\3\2\2\2\u035b\u0355\3\2\2\2\u035b\u0358\3\2"+
|
||||
"\2\2\u035c\u035f\3\2\2\2\u035d\u035b\3\2\2\2\u035d\u035e\3\2\2\2\u035e"+
|
||||
"_\3\2\2\2\u035f\u035d\3\2\2\2\\iz\u0083\u008d\u0093\u009b\u00a2\u00ab"+
|
||||
"\u00b0\u00b6\u00bb\u00c0\u00c7\u00ce\u00d3\u00df\u00e2\u00e4\u00ef\u00f6"+
|
||||
"\u00fb\u0101\u0103\u010b\u0111\u011d\u012b\u0131\u0137\u013d\u0142\u0146"+
|
||||
"\u014f\u0156\u015d\u0167\u0173\u017e\u0193\u019c\u01a2\u01a7\u01ae\u01bb"+
|
||||
"\u01c0\u01cc\u01da\u01ed\u01f6\u01fe\u0203\u0208\u020a\u0210\u0215\u0219"+
|
||||
"\u021f\u0222\u022a\u022d\u0230\u023c\u0248\u0250\u0256\u025a\u026f\u0273"+
|
||||
"\u027c\u0280\u02b2\u02bc\u02be\u02c6\u02cb\u02d5\u02e4\u02e9\u02ef\u02f4"+
|
||||
"\u02f9\u02fb\u02ff\u0302\u030a\u030e\u033d\u034d\u035b\u035d";
|
||||
"U\3\2\2\2\u02f1\u02f2\7\u0093\2\2\u02f2\u02f6\7v\2\2\u02f3\u02f5\7\u0094"+
|
||||
"\2\2\u02f4\u02f3\3\2\2\2\u02f5\u02f8\3\2\2\2\u02f6\u02f4\3\2\2\2\u02f6"+
|
||||
"\u02f7\3\2\2\2\u02f7\u0302\3\2\2\2\u02f8\u02f6\3\2\2\2\u02f9\u02fa\7\u0092"+
|
||||
"\2\2\u02fa\u02fe\7v\2\2\u02fb\u02fd\7\u0094\2\2\u02fc\u02fb\3\2\2\2\u02fd"+
|
||||
"\u0300\3\2\2\2\u02fe\u02fc\3\2\2\2\u02fe\u02ff\3\2\2\2\u02ff\u0302\3\2"+
|
||||
"\2\2\u0300\u02fe\3\2\2\2\u0301\u02f1\3\2\2\2\u0301\u02f9\3\2\2\2\u0302"+
|
||||
"W\3\2\2\2\u0303\u0305\7t\2\2\u0304\u0306\5\\/\2\u0305\u0304\3\2\2\2\u0305"+
|
||||
"\u0306\3\2\2\2\u0306\u030a\3\2\2\2\u0307\u0309\7\u0094\2\2\u0308\u0307"+
|
||||
"\3\2\2\2\u0309\u030c\3\2\2\2\u030a\u0308\3\2\2\2\u030a\u030b\3\2\2\2\u030b"+
|
||||
"Y\3\2\2\2\u030c\u030a\3\2\2\2\u030d\u030e\7s\2\2\u030e\u0313\5^\60\2\u030f"+
|
||||
"\u0310\7w\2\2\u0310\u0312\5^\60\2\u0311\u030f\3\2\2\2\u0312\u0315\3\2"+
|
||||
"\2\2\u0313\u0311\3\2\2\2\u0313\u0314\3\2\2\2\u0314\u0319\3\2\2\2\u0315"+
|
||||
"\u0313\3\2\2\2\u0316\u0318\7\u0094\2\2\u0317\u0316\3\2\2\2\u0318\u031b"+
|
||||
"\3\2\2\2\u0319\u0317\3\2\2\2\u0319\u031a\3\2\2\2\u031a[\3\2\2\2\u031b"+
|
||||
"\u0319\3\2\2\2\u031c\u034a\5^\60\2\u031d\u031e\7u\2\2\u031e\u034a\5^\60"+
|
||||
"\2\u031f\u0320\5^\60\2\u0320\u0321\7w\2\2\u0321\u0322\5^\60\2\u0322\u034a"+
|
||||
"\3\2\2\2\u0323\u0324\7x\2\2\u0324\u0325\5^\60\2\u0325\u0326\7y\2\2\u0326"+
|
||||
"\u0327\7w\2\2\u0327\u0328\7\u0093\2\2\u0328\u034a\3\2\2\2\u0329\u032a"+
|
||||
"\7x\2\2\u032a\u032b\7x\2\2\u032b\u032c\5^\60\2\u032c\u032d\7y\2\2\u032d"+
|
||||
"\u032e\7y\2\2\u032e\u032f\7w\2\2\u032f\u0330\7\u0093\2\2\u0330\u034a\3"+
|
||||
"\2\2\2\u0331\u0332\7x\2\2\u0332\u0333\5^\60\2\u0333\u0334\7w\2\2\u0334"+
|
||||
"\u0335\7\u0093\2\2\u0335\u0336\7y\2\2\u0336\u0337\7w\2\2\u0337\u0338\7"+
|
||||
"\u0093\2\2\u0338\u034a\3\2\2\2\u0339\u033a\7x\2\2\u033a\u033b\5^\60\2"+
|
||||
"\u033b\u033c\7w\2\2\u033c\u033d\7\u0093\2\2\u033d\u033e\7y\2\2\u033e\u034a"+
|
||||
"\3\2\2\2\u033f\u0340\7x\2\2\u0340\u0341\5^\60\2\u0341\u0342\7y\2\2\u0342"+
|
||||
"\u034a\3\2\2\2\u0343\u0344\7x\2\2\u0344\u0345\7x\2\2\u0345\u0346\5^\60"+
|
||||
"\2\u0346\u0347\7y\2\2\u0347\u0348\7y\2\2\u0348\u034a\3\2\2\2\u0349\u031c"+
|
||||
"\3\2\2\2\u0349\u031d\3\2\2\2\u0349\u031f\3\2\2\2\u0349\u0323\3\2\2\2\u0349"+
|
||||
"\u0329\3\2\2\2\u0349\u0331\3\2\2\2\u0349\u0339\3\2\2\2\u0349\u033f\3\2"+
|
||||
"\2\2\u0349\u0343\3\2\2\2\u034a]\3\2\2\2\u034b\u034c\b\60\1\2\u034c\u034d"+
|
||||
"\7z\2\2\u034d\u034e\5^\60\2\u034e\u034f\7{\2\2\u034f\u035a\3\2\2\2\u0350"+
|
||||
"\u0351\t\t\2\2\u0351\u035a\5^\60\n\u0352\u035a\7\u0093\2\2\u0353\u035a"+
|
||||
"\7\u0091\2\2\u0354\u0355\7\u0085\2\2\u0355\u0356\7\u0093\2\2\u0356\u035a"+
|
||||
"\7\u0086\2\2\u0357\u035a\7\u0087\2\2\u0358\u035a\7\u0090\2\2\u0359\u034b"+
|
||||
"\3\2\2\2\u0359\u0350\3\2\2\2\u0359\u0352\3\2\2\2\u0359\u0353\3\2\2\2\u0359"+
|
||||
"\u0354\3\2\2\2\u0359\u0357\3\2\2\2\u0359\u0358\3\2\2\2\u035a\u0369\3\2"+
|
||||
"\2\2\u035b\u035c\f\f\2\2\u035c\u035d\7|\2\2\u035d\u0368\5^\60\r\u035e"+
|
||||
"\u035f\f\13\2\2\u035f\u0360\t\n\2\2\u0360\u0368\5^\60\f\u0361\u0362\f"+
|
||||
"\t\2\2\u0362\u0363\t\13\2\2\u0363\u0368\5^\60\n\u0364\u0365\f\b\2\2\u0365"+
|
||||
"\u0366\t\f\2\2\u0366\u0368\5^\60\t\u0367\u035b\3\2\2\2\u0367\u035e\3\2"+
|
||||
"\2\2\u0367\u0361\3\2\2\2\u0367\u0364\3\2\2\2\u0368\u036b\3\2\2\2\u0369"+
|
||||
"\u0367\3\2\2\2\u0369\u036a\3\2\2\2\u036a_\3\2\2\2\u036b\u0369\3\2\2\2"+
|
||||
"\\iz\u0083\u008d\u0093\u009b\u00a2\u00ab\u00b0\u00b6\u00bb\u00c0\u00c7"+
|
||||
"\u00ce\u00d3\u00df\u00e2\u00e4\u00ef\u00f6\u00fb\u0101\u0103\u010b\u0111"+
|
||||
"\u011d\u012b\u0131\u0137\u013d\u0142\u0146\u014f\u0156\u015d\u0167\u0173"+
|
||||
"\u017e\u0193\u019c\u01a2\u01a7\u01ae\u01bb\u01c0\u01cc\u01da\u01ed\u01f6"+
|
||||
"\u01fe\u0203\u0208\u020a\u0210\u0215\u0219\u021f\u0222\u022a\u022d\u0230"+
|
||||
"\u023c\u0248\u0250\u0256\u025a\u026f\u0273\u027c\u0280\u02b2\u02bc\u02be"+
|
||||
"\u02c6\u02cb\u02d5\u02e4\u02e9\u02ef\u02f6\u02fe\u0301\u0305\u030a\u0313"+
|
||||
"\u0319\u0349\u0359\u0367\u0369";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
||||
|
@ -1060,10 +1060,6 @@ public class Pass4CodeGeneration {
|
||||
} catch(AsmFragmentTemplateSynthesizer.UnknownFragmentException e) {
|
||||
throw new CompileError("Interrupt type not supported " + procedure.getInterruptType() + " int " + procedure.toString() + "\n" + e.getMessage());
|
||||
}
|
||||
// Mark labels as don't optimize
|
||||
for(AsmLine asmLine : asm.getCurrentChunk().getLines()) {
|
||||
if(asmLine instanceof AsmLabel) ((AsmLabel) asmLine).setDontOptimize(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void addKickAsm(AsmProgram asm, StatementKickAsm statementKasm) {
|
||||
|
@ -32,7 +32,7 @@ public class Pass5UnnecesaryLoadElimination extends Pass5AsmOptimization {
|
||||
AsmLine line = lineIt.next();
|
||||
if(line instanceof AsmInstruction) {
|
||||
AsmInstruction instruction = (AsmInstruction) line;
|
||||
if(instruction.isDontOptimize()) {
|
||||
if(instruction.isNoOptimize()) {
|
||||
continue;
|
||||
}
|
||||
CpuOpcode cpuOpcode = instruction.getCpuOpcode();
|
||||
|
@ -72,7 +72,7 @@ public class Pass5UnusedLabelElimination extends Pass5AsmOptimization {
|
||||
currentScope = "";
|
||||
} else if(line instanceof AsmLabel) {
|
||||
AsmLabel label = (AsmLabel) line;
|
||||
if(label.isDontOptimize()) {
|
||||
if(label.isNoOptimize()) {
|
||||
continue;
|
||||
}
|
||||
String labelStr = currentScope + "::" + label.getLabel();
|
||||
|
Loading…
Reference in New Issue
Block a user