Added Address Register Indirect with Base Displacement addressing mode.
This commit is contained in:
parent
3f1ef0e55a
commit
a92630e5c7
@ -40,10 +40,11 @@ public class M68kParser implements PsiParser, LightPsiParser {
|
||||
create_token_set_(ADDRESS_REGISTER, DATA_REGISTER, REGISTER, SPECIAL_REGISTER),
|
||||
create_token_set_(ABSOLUTE_ADDRESS_ADDRESSING_MODE, ADDRESSING_MODE, ADDRESS_REGISTER_DIRECT_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_ADDRESSING_MODE,
|
||||
ADDRESS_REGISTER_INDIRECT_POST_INC_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE,
|
||||
ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE, DATA_REGISTER_DIRECT_ADDRESSING_MODE, IMMEDIATE_DATA,
|
||||
MEMORY_INDIRECT_ADDRESSING_MODE, MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE,
|
||||
PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE, PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE,
|
||||
PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE, REGISTER_LIST_ADDRESSING_MODE, SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE),
|
||||
ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE, ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE, DATA_REGISTER_DIRECT_ADDRESSING_MODE,
|
||||
IMMEDIATE_DATA, MEMORY_INDIRECT_ADDRESSING_MODE, MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE,
|
||||
PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE, PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE,
|
||||
PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE, PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE, PROGRAM_COUNTER_MEMORY_INDIRECT_POST_INDEXED_ADDRESSING_MODE, PROGRAM_COUNTER_MEMORY_INDIRECT_PRE_INDEXED_ADDRESSING_MODE,
|
||||
REGISTER_LIST_ADDRESSING_MODE, SPECIAL_REGISTER_DIRECT_ADDRESSING_MODE),
|
||||
create_token_set_(BINARY_ADD_EXPR, BINARY_BITWISE_AND_EXPR, BINARY_BITWISE_OR_EXPR, BINARY_BITWISE_XOR_EXPR,
|
||||
BINARY_CMP_EQ_EXPR, BINARY_CMP_GE_EXPR, BINARY_CMP_GT_EXPR, BINARY_CMP_LE_EXPR,
|
||||
BINARY_CMP_LT_EXPR, BINARY_CMP_NE_EXPR, BINARY_DIV_EXPR, BINARY_LOGICAL_AND_EXPR,
|
||||
@ -211,6 +212,37 @@ public class M68kParser implements PsiParser, LightPsiParser {
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// ROUND_L (internalBaseDisplacementOption1|internalBaseDisplacementOption2|internalBaseDisplacementOption3)? ROUND_R
|
||||
public static boolean AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode")) return false;
|
||||
if (!nextTokenIsFast(b, ROUND_L)) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b, l, _NONE_, ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE, "<AddressingMode>");
|
||||
r = consumeTokenFast(b, ROUND_L);
|
||||
r = r && AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode_1(b, l + 1);
|
||||
r = r && consumeToken(b, ROUND_R);
|
||||
exit_section_(b, l, m, r, false, null);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (internalBaseDisplacementOption1|internalBaseDisplacementOption2|internalBaseDisplacementOption3)?
|
||||
private static boolean AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode_1(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode_1")) return false;
|
||||
AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode_1_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// internalBaseDisplacementOption1|internalBaseDisplacementOption2|internalBaseDisplacementOption3
|
||||
private static boolean AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode_1_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode_1_0")) return false;
|
||||
boolean r;
|
||||
r = internalBaseDisplacementOption1(b, l + 1);
|
||||
if (!r) r = internalBaseDisplacementOption2(b, l + 1);
|
||||
if (!r) r = internalBaseDisplacementOption3(b, l + 1);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// ROUND_L (expr SEPARATOR)? AddressRegister SEPARATOR IndexRegister ROUND_R
|
||||
public static boolean AddressRegisterIndirectWithIndexNewAddressingMode(PsiBuilder b, int l) {
|
||||
@ -289,18 +321,20 @@ public class M68kParser implements PsiParser, LightPsiParser {
|
||||
// | AddressRegisterIndirectAddressingMode
|
||||
// | AddressRegisterIndirectWithDisplacementNewAddressingMode
|
||||
// | ProgramCounterIndirectWithDisplacementNewAddressingMode
|
||||
// | MemoryIndirectAddressingMode
|
||||
// | ProgramCounterMemoryIndirectAddressingMode
|
||||
// | MemoryIndirectPostIndexedAddressingMode
|
||||
// | ProgramCounterMemoryIndirectPostIndexedAddressingMode
|
||||
// | MemoryIndirectPreIndexedAddressingMode
|
||||
// | ProgramCounterMemoryIndirectPreIndexedAddressingMode
|
||||
// | AddressRegisterIndirectWithIndexNewAddressingMode
|
||||
// | ProgramCounterIndirectWithIndexNewAddressingMode
|
||||
// | AddressRegisterIndirectWithDisplacementOldAddressingMode
|
||||
// | ProgramCounterIndirectWithDisplacementOldAddressingMode
|
||||
// | AddressRegisterIndirectWithIndexOldAddressingMode
|
||||
// | ProgramCounterIndirectWithIndexOldAddressingMode
|
||||
// | AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode
|
||||
// | ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode
|
||||
// | MemoryIndirectAddressingMode
|
||||
// | ProgramCounterMemoryIndirectAddressingMode
|
||||
// | MemoryIndirectPostIndexedAddressingMode
|
||||
// | ProgramCounterMemoryIndirectPostIndexedAddressingMode
|
||||
// | MemoryIndirectPreIndexedAddressingMode
|
||||
// | ProgramCounterMemoryIndirectPreIndexedAddressingMode
|
||||
// | SpecialRegisterDirectAddressingMode
|
||||
// | DataRegisterDirectAddressingMode
|
||||
// | AddressRegisterDirectAddressingMode
|
||||
@ -316,18 +350,20 @@ public class M68kParser implements PsiParser, LightPsiParser {
|
||||
if (!r) r = AddressRegisterIndirectAddressingMode(b, l + 1);
|
||||
if (!r) r = AddressRegisterIndirectWithDisplacementNewAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterIndirectWithDisplacementNewAddressingMode(b, l + 1);
|
||||
if (!r) r = MemoryIndirectAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterMemoryIndirectAddressingMode(b, l + 1);
|
||||
if (!r) r = MemoryIndirectPostIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterMemoryIndirectPostIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = MemoryIndirectPreIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterMemoryIndirectPreIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = AddressRegisterIndirectWithIndexNewAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterIndirectWithIndexNewAddressingMode(b, l + 1);
|
||||
if (!r) r = AddressRegisterIndirectWithDisplacementOldAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterIndirectWithDisplacementOldAddressingMode(b, l + 1);
|
||||
if (!r) r = AddressRegisterIndirectWithIndexOldAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterIndirectWithIndexOldAddressingMode(b, l + 1);
|
||||
if (!r) r = AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode(b, l + 1);
|
||||
if (!r) r = MemoryIndirectAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterMemoryIndirectAddressingMode(b, l + 1);
|
||||
if (!r) r = MemoryIndirectPostIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterMemoryIndirectPostIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = MemoryIndirectPreIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = ProgramCounterMemoryIndirectPreIndexedAddressingMode(b, l + 1);
|
||||
if (!r) r = SpecialRegisterDirectAddressingMode(b, l + 1);
|
||||
if (!r) r = DataRegisterDirectAddressingMode(b, l + 1);
|
||||
if (!r) r = AddressRegisterDirectAddressingMode(b, l + 1);
|
||||
@ -1210,6 +1246,58 @@ public class M68kParser implements PsiParser, LightPsiParser {
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// ROUND_L (BaseDisplacement SEPARATOR)? PC (SEPARATOR IndexRegister)? ROUND_R
|
||||
public static boolean ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode")) return false;
|
||||
if (!nextTokenIsFast(b, ROUND_L)) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b, l, _NONE_, PROGRAM_COUNTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE, "<AddressingMode>");
|
||||
r = consumeTokenFast(b, ROUND_L);
|
||||
r = r && ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_1(b, l + 1);
|
||||
r = r && consumeToken(b, PC);
|
||||
r = r && ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_3(b, l + 1);
|
||||
r = r && consumeToken(b, ROUND_R);
|
||||
exit_section_(b, l, m, r, false, null);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (BaseDisplacement SEPARATOR)?
|
||||
private static boolean ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_1(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_1")) return false;
|
||||
ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_1_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// BaseDisplacement SEPARATOR
|
||||
private static boolean ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_1_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_1_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = BaseDisplacement(b, l + 1);
|
||||
r = r && consumeToken(b, SEPARATOR);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (SEPARATOR IndexRegister)?
|
||||
private static boolean ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_3(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_3")) return false;
|
||||
ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_3_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// SEPARATOR IndexRegister
|
||||
private static boolean ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_3_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode_3_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = consumeTokenFast(b, SEPARATOR);
|
||||
r = r && IndexRegister(b, l + 1);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// ROUND_L (expr SEPARATOR)? PC SEPARATOR IndexRegister ROUND_R
|
||||
public static boolean ProgramCounterIndirectWithIndexNewAddressingMode(PsiBuilder b, int l) {
|
||||
@ -1617,6 +1705,153 @@ public class M68kParser implements PsiParser, LightPsiParser {
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// (BaseDisplacement SEPARATOR)? (AddressRegister SEPARATOR)? IndexRegister
|
||||
static boolean internalBaseDisplacementOption1(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption1")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = internalBaseDisplacementOption1_0(b, l + 1);
|
||||
r = r && internalBaseDisplacementOption1_1(b, l + 1);
|
||||
r = r && IndexRegister(b, l + 1);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (BaseDisplacement SEPARATOR)?
|
||||
private static boolean internalBaseDisplacementOption1_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption1_0")) return false;
|
||||
internalBaseDisplacementOption1_0_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// BaseDisplacement SEPARATOR
|
||||
private static boolean internalBaseDisplacementOption1_0_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption1_0_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = BaseDisplacement(b, l + 1);
|
||||
r = r && consumeToken(b, SEPARATOR);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (AddressRegister SEPARATOR)?
|
||||
private static boolean internalBaseDisplacementOption1_1(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption1_1")) return false;
|
||||
internalBaseDisplacementOption1_1_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// AddressRegister SEPARATOR
|
||||
private static boolean internalBaseDisplacementOption1_1_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption1_1_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = AddressRegister(b, l + 1);
|
||||
r = r && consumeToken(b, SEPARATOR);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// (BaseDisplacement SEPARATOR)? AddressRegister (SEPARATOR IndexRegister)?
|
||||
static boolean internalBaseDisplacementOption2(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption2")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = internalBaseDisplacementOption2_0(b, l + 1);
|
||||
r = r && AddressRegister(b, l + 1);
|
||||
r = r && internalBaseDisplacementOption2_2(b, l + 1);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (BaseDisplacement SEPARATOR)?
|
||||
private static boolean internalBaseDisplacementOption2_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption2_0")) return false;
|
||||
internalBaseDisplacementOption2_0_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// BaseDisplacement SEPARATOR
|
||||
private static boolean internalBaseDisplacementOption2_0_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption2_0_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = BaseDisplacement(b, l + 1);
|
||||
r = r && consumeToken(b, SEPARATOR);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (SEPARATOR IndexRegister)?
|
||||
private static boolean internalBaseDisplacementOption2_2(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption2_2")) return false;
|
||||
internalBaseDisplacementOption2_2_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// SEPARATOR IndexRegister
|
||||
private static boolean internalBaseDisplacementOption2_2_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption2_2_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = consumeToken(b, SEPARATOR);
|
||||
r = r && IndexRegister(b, l + 1);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// BaseDisplacement (SEPARATOR AddressRegister)? (SEPARATOR IndexRegister)?
|
||||
static boolean internalBaseDisplacementOption3(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption3")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = BaseDisplacement(b, l + 1);
|
||||
r = r && internalBaseDisplacementOption3_1(b, l + 1);
|
||||
r = r && internalBaseDisplacementOption3_2(b, l + 1);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (SEPARATOR AddressRegister)?
|
||||
private static boolean internalBaseDisplacementOption3_1(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption3_1")) return false;
|
||||
internalBaseDisplacementOption3_1_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// SEPARATOR AddressRegister
|
||||
private static boolean internalBaseDisplacementOption3_1_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption3_1_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = consumeToken(b, SEPARATOR);
|
||||
r = r && AddressRegister(b, l + 1);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
// (SEPARATOR IndexRegister)?
|
||||
private static boolean internalBaseDisplacementOption3_2(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption3_2")) return false;
|
||||
internalBaseDisplacementOption3_2_0(b, l + 1);
|
||||
return true;
|
||||
}
|
||||
|
||||
// SEPARATOR IndexRegister
|
||||
private static boolean internalBaseDisplacementOption3_2_0(PsiBuilder b, int l) {
|
||||
if (!recursion_guard_(b, l, "internalBaseDisplacementOption3_2_0")) return false;
|
||||
boolean r;
|
||||
Marker m = enter_section_(b);
|
||||
r = consumeToken(b, SEPARATOR);
|
||||
r = r && IndexRegister(b, l + 1);
|
||||
exit_section_(b, m, null, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
/* ********************************************************** */
|
||||
// !<<eof>> (MacroDefinition | statement) (<<eof>>|EOL)
|
||||
static boolean line(PsiBuilder b, int l) {
|
||||
|
@ -18,6 +18,7 @@ public interface M68kTypes {
|
||||
IElementType ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE = new M68kElementType("ADDRESS_REGISTER_INDIRECT_PRE_DEC_ADDRESSING_MODE");
|
||||
IElementType ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE = new M68kElementType("ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE");
|
||||
IElementType ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE = new M68kElementType("ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE");
|
||||
IElementType ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE = new M68kElementType("ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE");
|
||||
IElementType ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE = new M68kElementType("ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE");
|
||||
IElementType ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE = new M68kElementType("ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE");
|
||||
IElementType ADDRESS_SIZE = new M68kElementType("ADDRESS_SIZE");
|
||||
@ -67,6 +68,7 @@ public interface M68kTypes {
|
||||
IElementType PREPROCESSOR_KEYWORD = new M68kElementType("PREPROCESSOR_KEYWORD");
|
||||
IElementType PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_NEW_ADDRESSING_MODE");
|
||||
IElementType PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE");
|
||||
IElementType PROGRAM_COUNTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE");
|
||||
IElementType PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE");
|
||||
IElementType PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE");
|
||||
IElementType PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE = new M68kElementType("PROGRAM_COUNTER_MEMORY_INDIRECT_ADDRESSING_MODE");
|
||||
@ -167,6 +169,8 @@ public interface M68kTypes {
|
||||
return new M68kAddressRegisterIndirectWithDisplacementNewAddressingModeImpl(node);
|
||||
} else if (type == ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) {
|
||||
return new M68kAddressRegisterIndirectWithDisplacementOldAddressingModeImpl(node);
|
||||
} else if (type == ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE) {
|
||||
return new M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(node);
|
||||
} else if (type == ADDRESS_REGISTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) {
|
||||
return new M68kAddressRegisterIndirectWithIndexNewAddressingModeImpl(node);
|
||||
} else if (type == ADDRESS_REGISTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) {
|
||||
@ -263,6 +267,8 @@ public interface M68kTypes {
|
||||
return new M68kProgramCounterIndirectWithDisplacementNewAddressingModeImpl(node);
|
||||
} else if (type == PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT_OLD_ADDRESSING_MODE) {
|
||||
return new M68kProgramCounterIndirectWithDisplacementOldAddressingModeImpl(node);
|
||||
} else if (type == PROGRAM_COUNTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE) {
|
||||
return new M68kProgramCounterIndirectWithIndexBaseDisplacementAddressingModeImpl(node);
|
||||
} else if (type == PROGRAM_COUNTER_INDIRECT_WITH_INDEX_NEW_ADDRESSING_MODE) {
|
||||
return new M68kProgramCounterIndirectWithIndexNewAddressingModeImpl(node);
|
||||
} else if (type == PROGRAM_COUNTER_INDIRECT_WITH_INDEX_OLD_ADDRESSING_MODE) {
|
||||
|
@ -45,6 +45,13 @@ public class M68kVisitor extends PsiElementVisitor {
|
||||
// visitWithDisplacement(o);
|
||||
}
|
||||
|
||||
public void visitAddressRegisterIndirectWithIndexBaseDisplacementAddressingMode(@NotNull M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingMode o) {
|
||||
visitAddressingMode(o);
|
||||
// visitWithOptionalAddressRegisterIndirect(o);
|
||||
// visitWithBaseDisplacement(o);
|
||||
// visitWithIndexRegister(o);
|
||||
}
|
||||
|
||||
public void visitAddressRegisterIndirectWithIndexNewAddressingMode(@NotNull M68kAddressRegisterIndirectWithIndexNewAddressingMode o) {
|
||||
visitAddressingMode(o);
|
||||
// visitWithAddressRegisterIndirect(o);
|
||||
@ -180,6 +187,12 @@ public class M68kVisitor extends PsiElementVisitor {
|
||||
// visitWithDisplacement(o);
|
||||
}
|
||||
|
||||
public void visitProgramCounterIndirectWithIndexBaseDisplacementAddressingMode(@NotNull M68kProgramCounterIndirectWithIndexBaseDisplacementAddressingMode o) {
|
||||
visitAddressingMode(o);
|
||||
// visitWithBaseDisplacement(o);
|
||||
// visitWithIndexRegister(o);
|
||||
}
|
||||
|
||||
public void visitProgramCounterIndirectWithIndexNewAddressingMode(@NotNull M68kProgramCounterIndirectWithIndexNewAddressingMode o) {
|
||||
visitAddressingMode(o);
|
||||
// visitWithDisplacement(o);
|
||||
|
@ -44,8 +44,10 @@ enum class AddressMode(val description: String, val syntax: String) {
|
||||
PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT("program counter indirect with displacement", "(d16,PC)"),
|
||||
ADDRESS_REGISTER_INDIRECT_WITH_INDEX("address register indirect with index", "(d8,An,Xn)"),
|
||||
ADDRESS_REGISTER_INDIRECT_WITH_SCALED_INDEX("address register indirect with scaled index", "(d8,An,Xn*s)"),
|
||||
ADDRESS_REGISTER_INDIRECT_WITH_BASE_DISPLACEMENT("address register indirect with index (base displacement)", "(bd,An,Xn*s)"),
|
||||
PROGRAM_COUNTER_INDIRECT_WITH_INDEX("program counter indirect with index", "(d8,PC,Xn)"),
|
||||
PROGRAM_COUNTER_INDIRECT_WITH_SCALED_INDEX("program counter indirect with scaled index", "(d8,PC,Xn*s)"),
|
||||
PROGRAM_COUNTER_INDIRECT_WITH_BASE_DISPLACEMENT("program counter indirect with index (base displacement)", "(bd,PC,Xn*s)"),
|
||||
MEMORY_INDIRECT("memory indirect", "([bd,An],od)"),
|
||||
MEMORY_INDIRECT_POSTINDEXED("memory indirect postindexed", "([bd,An],Xn*s,od)"),
|
||||
MEMORY_INDIRECT_PREINDEXED("memory indirect preindexed", "([bd,An,Xn*s],od)"),
|
||||
|
@ -263,18 +263,20 @@ AddressingMode ::= ImmediateData
|
||||
| AddressRegisterIndirectAddressingMode
|
||||
| AddressRegisterIndirectWithDisplacementNewAddressingMode
|
||||
| ProgramCounterIndirectWithDisplacementNewAddressingMode
|
||||
| MemoryIndirectAddressingMode
|
||||
| ProgramCounterMemoryIndirectAddressingMode
|
||||
| MemoryIndirectPostIndexedAddressingMode
|
||||
| ProgramCounterMemoryIndirectPostIndexedAddressingMode
|
||||
| MemoryIndirectPreIndexedAddressingMode
|
||||
| ProgramCounterMemoryIndirectPreIndexedAddressingMode
|
||||
| AddressRegisterIndirectWithIndexNewAddressingMode
|
||||
| ProgramCounterIndirectWithIndexNewAddressingMode
|
||||
| AddressRegisterIndirectWithDisplacementOldAddressingMode
|
||||
| ProgramCounterIndirectWithDisplacementOldAddressingMode
|
||||
| AddressRegisterIndirectWithIndexOldAddressingMode
|
||||
| ProgramCounterIndirectWithIndexOldAddressingMode
|
||||
| AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode
|
||||
| ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode
|
||||
| MemoryIndirectAddressingMode
|
||||
| ProgramCounterMemoryIndirectAddressingMode
|
||||
| MemoryIndirectPostIndexedAddressingMode
|
||||
| ProgramCounterMemoryIndirectPostIndexedAddressingMode
|
||||
| MemoryIndirectPreIndexedAddressingMode
|
||||
| ProgramCounterMemoryIndirectPreIndexedAddressingMode
|
||||
| SpecialRegisterDirectAddressingMode
|
||||
| DataRegisterDirectAddressingMode
|
||||
| AddressRegisterDirectAddressingMode
|
||||
@ -334,6 +336,33 @@ AddressRegisterIndirectWithIndexNewAddressingMode ::= ROUND_L (expr SEPARATOR)?
|
||||
]
|
||||
}
|
||||
|
||||
private internalBaseDisplacementOption1 ::= (BaseDisplacement SEPARATOR)? (AddressRegister SEPARATOR)? IndexRegister
|
||||
private internalBaseDisplacementOption2 ::= (BaseDisplacement SEPARATOR)? AddressRegister (SEPARATOR IndexRegister)?
|
||||
private internalBaseDisplacementOption3 ::= BaseDisplacement (SEPARATOR AddressRegister)? (SEPARATOR IndexRegister)?
|
||||
|
||||
AddressRegisterIndirectWithIndexBaseDisplacementAddressingMode ::= ROUND_L (internalBaseDisplacementOption1|internalBaseDisplacementOption2|internalBaseDisplacementOption3)? ROUND_R
|
||||
{
|
||||
implements = [
|
||||
"de.platon42.intellij.plugins.m68k.psi.M68kWithOptionalAddressRegisterIndirect"
|
||||
"de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement"
|
||||
"de.platon42.intellij.plugins.m68k.psi.M68kWithOptionalIndexRegister"
|
||||
]
|
||||
methods = [
|
||||
baseDisplacement = "BaseDisplacement"
|
||||
]
|
||||
}
|
||||
|
||||
ProgramCounterIndirectWithIndexBaseDisplacementAddressingMode ::= ROUND_L (BaseDisplacement SEPARATOR)? PC (SEPARATOR IndexRegister)? ROUND_R
|
||||
{
|
||||
implements = [
|
||||
"de.platon42.intellij.plugins.m68k.psi.M68kWithBaseDisplacement"
|
||||
"de.platon42.intellij.plugins.m68k.psi.M68kWithOptionalIndexRegister"
|
||||
]
|
||||
methods = [
|
||||
baseDisplacement = "BaseDisplacement"
|
||||
]
|
||||
}
|
||||
|
||||
MemoryIndirectAddressingMode ::= ROUND_L SQUARE_L (BaseDisplacement SEPARATOR)? AddressRegister SQUARE_R (SEPARATOR OuterDisplacement)? ROUND_R
|
||||
{
|
||||
implements = [
|
||||
|
@ -14,10 +14,12 @@ object M68kAddressModeUtil {
|
||||
is M68kAddressRegisterIndirectWithDisplacementOldAddressingMode -> AddressMode.ADDRESS_REGISTER_INDIRECT_WITH_DISPLACEMENT
|
||||
is M68kAddressRegisterIndirectWithIndexNewAddressingMode -> if (hasScale(addressingMode)) AddressMode.ADDRESS_REGISTER_INDIRECT_WITH_SCALED_INDEX else AddressMode.ADDRESS_REGISTER_INDIRECT_WITH_INDEX
|
||||
is M68kAddressRegisterIndirectWithIndexOldAddressingMode -> if (hasScale(addressingMode)) AddressMode.ADDRESS_REGISTER_INDIRECT_WITH_SCALED_INDEX else AddressMode.ADDRESS_REGISTER_INDIRECT_WITH_INDEX
|
||||
is M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingMode -> AddressMode.ADDRESS_REGISTER_INDIRECT_WITH_BASE_DISPLACEMENT
|
||||
is M68kProgramCounterIndirectWithDisplacementNewAddressingMode -> AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT
|
||||
is M68kProgramCounterIndirectWithDisplacementOldAddressingMode -> AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_DISPLACEMENT
|
||||
is M68kProgramCounterIndirectWithIndexNewAddressingMode -> if (hasScale(addressingMode)) AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_SCALED_INDEX else AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_INDEX
|
||||
is M68kProgramCounterIndirectWithIndexOldAddressingMode -> if (hasScale(addressingMode)) AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_SCALED_INDEX else AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_INDEX
|
||||
is M68kProgramCounterIndirectWithIndexBaseDisplacementAddressingMode -> AddressMode.PROGRAM_COUNTER_INDIRECT_WITH_BASE_DISPLACEMENT
|
||||
is M68kMemoryIndirectAddressingMode -> AddressMode.MEMORY_INDIRECT
|
||||
is M68kMemoryIndirectPreIndexedAddressingMode -> AddressMode.MEMORY_INDIRECT_PREINDEXED
|
||||
is M68kMemoryIndirectPostIndexedAddressingMode -> AddressMode.MEMORY_INDIRECT_POSTINDEXED
|
||||
@ -54,21 +56,18 @@ object M68kAddressModeUtil {
|
||||
|
||||
is M68kAddressRegisterIndirectPostIncAddressingMode -> listOf(Register.getRegFromName(addressingMode.addressRegister.text) to (RWM_READ_L or RWM_MODIFY_L))
|
||||
is M68kAddressRegisterIndirectPreDecAddressingMode -> listOf(Register.getRegFromName(addressingMode.addressRegister.text) to (RWM_READ_L or RWM_MODIFY_L))
|
||||
is M68kWithAddressRegisterIndirect -> {
|
||||
if (addressingMode is M68kWithIndexRegister) {
|
||||
listOf(
|
||||
Register.getRegFromName(addressingMode.addressRegister.text) to RWM_READ_L,
|
||||
Register.getRegFromName(addressingMode.indexRegister.register.text) to if (addressingMode.indexRegister.isLongWidth) RWM_READ_L else RWM_READ_W
|
||||
)
|
||||
} else {
|
||||
listOf(Register.getRegFromName(addressingMode.addressRegister.text) to RWM_READ_L)
|
||||
}
|
||||
}
|
||||
is M68kWithIndexRegister -> listOf(Register.getRegFromName(addressingMode.indexRegister.register.text) to if (addressingMode.indexRegister.isLongWidth) RWM_READ_L else RWM_READ_W)
|
||||
is M68kWithAddressRegisterIndirect -> listOf(Register.getRegFromName(addressingMode.addressRegister.text) to RWM_READ_L)
|
||||
is M68kWithOptionalAddressRegisterIndirect -> if (addressingMode.addressRegister != null) listOf(Register.getRegFromName(addressingMode.addressRegister!!.text) to RWM_READ_L) else emptyList()
|
||||
is M68kDataRegisterDirectAddressingMode -> listOf(Register.getRegFromName(addressingMode.dataRegister.text) to rwm)
|
||||
is M68kAddressRegisterDirectAddressingMode -> listOf(Register.getRegFromName(addressingMode.addressRegister.text) to rwm)
|
||||
is M68kRegisterListAddressingMode -> addressingMode.registers.map { it to rwm }
|
||||
else -> throw IllegalArgumentException("Unknown addressing mode $addressingMode")
|
||||
}
|
||||
}.plus(
|
||||
when (addressingMode) {
|
||||
is M68kWithIndexRegister -> listOf(Register.getRegFromName(addressingMode.indexRegister.register.text) to if (addressingMode.indexRegister.isLongWidth) RWM_READ_L else RWM_READ_W)
|
||||
is M68kWithOptionalIndexRegister -> if (addressingMode.indexRegister != null) listOf(Register.getRegFromName(addressingMode.indexRegister!!.register.text) to if (addressingMode.indexRegister!!.isLongWidth) RWM_READ_L else RWM_READ_W) else emptyList()
|
||||
else -> emptyList()
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package de.platon42.intellij.plugins.m68k.psi
|
||||
|
||||
interface M68kWithOptionalAddressRegisterIndirect : M68kAddressingMode {
|
||||
|
||||
val addressRegister: M68kAddressRegister?
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
package de.platon42.intellij.plugins.m68k.psi
|
||||
|
||||
interface M68kWithOptionalIndexRegister : M68kAddressingMode {
|
||||
|
||||
val indexRegister: M68kIndexRegister?
|
||||
}
|
@ -212,6 +212,46 @@ internal class AddressingModesTest : AbstractParsingTest() {
|
||||
testGoodSyntax(testCase, " move.l ([pc,a0.l*4]),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun register_indirect_with_index_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (100.w,a0,a0.l*4),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun register_indirect_with_index_base_displacement_without_areg(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (100.w,a0.l*4),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun register_indirect_with_index_base_displacement_without_index(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (100.l,a0),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun register_indirect_with_index_base_displacement_with_dreg_index(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (d0),(d0.w*4)\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun register_indirect_with_index_base_displacement_only(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (100.l),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun register_indirect_with_index_base_displacement_zero(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun pc_indirect_with_index_base_displacement(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (100.w,pc,a0.l*4),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun pc_indirect_with_index_base_displacement_without_index(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l (100.l,pc),d0\n")
|
||||
}
|
||||
|
||||
@Test
|
||||
internal fun absolute_address(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(testCase, " move.l 4.w,a6\n")
|
||||
|
@ -0,0 +1,34 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kProgramCounterIndirectWithIndexBaseDisplacementAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kBaseDisplacementImpl(BASE_DISPLACEMENT)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('100')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_W)('.w')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
PsiElement(M68kTokenType.PC)('pc')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kIndexRegisterImpl(INDEX_REGISTER)
|
||||
M68kAddressRegisterImpl(ADDRESS_REGISTER)
|
||||
PsiElement(M68kTokenType.AREG)('a0')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiElement(M68kTokenType.OP_AR_MUL)('*')
|
||||
M68kIndexScaleImpl(INDEX_SCALE)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('4')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
@ -0,0 +1,24 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kProgramCounterIndirectWithIndexBaseDisplacementAddressingModeImpl(PROGRAM_COUNTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kBaseDisplacementImpl(BASE_DISPLACEMENT)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('100')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
PsiElement(M68kTokenType.PC)('pc')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
@ -0,0 +1,35 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kBaseDisplacementImpl(BASE_DISPLACEMENT)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('100')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_W)('.w')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kAddressRegisterImpl(ADDRESS_REGISTER)
|
||||
PsiElement(M68kTokenType.AREG)('a0')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kIndexRegisterImpl(INDEX_REGISTER)
|
||||
M68kAddressRegisterImpl(ADDRESS_REGISTER)
|
||||
PsiElement(M68kTokenType.AREG)('a0')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiElement(M68kTokenType.OP_AR_MUL)('*')
|
||||
M68kIndexScaleImpl(INDEX_SCALE)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('4')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
@ -0,0 +1,22 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kBaseDisplacementImpl(BASE_DISPLACEMENT)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('100')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
@ -0,0 +1,29 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kIndexRegisterImpl(INDEX_REGISTER)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kIndexRegisterImpl(INDEX_REGISTER)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_W)('.w')
|
||||
PsiElement(M68kTokenType.OP_AR_MUL)('*')
|
||||
M68kIndexScaleImpl(INDEX_SCALE)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('4')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
@ -0,0 +1,32 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kBaseDisplacementImpl(BASE_DISPLACEMENT)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('100')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_W)('.w')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kIndexRegisterImpl(INDEX_REGISTER)
|
||||
M68kAddressRegisterImpl(ADDRESS_REGISTER)
|
||||
PsiElement(M68kTokenType.AREG)('a0')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiElement(M68kTokenType.OP_AR_MUL)('*')
|
||||
M68kIndexScaleImpl(INDEX_SCALE)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('4')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
@ -0,0 +1,26 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
M68kBaseDisplacementImpl(BASE_DISPLACEMENT)
|
||||
M68kLiteralExprImpl(LITERAL_EXPR)
|
||||
PsiElement(M68kTokenType.DECIMAL)('100')
|
||||
M68kDataWidthImpl(DATA_WIDTH)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kIndexRegisterImpl(INDEX_REGISTER)
|
||||
M68kAddressRegisterImpl(ADDRESS_REGISTER)
|
||||
PsiElement(M68kTokenType.AREG)('a0')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
@ -0,0 +1,17 @@
|
||||
Assembly File: a.asm
|
||||
PsiWhiteSpace(' ')
|
||||
M68kStatementImpl(STATEMENT)
|
||||
M68kAsmInstructionImpl(ASM_INSTRUCTION)
|
||||
M68kAsmOpImpl(ASM_OP)
|
||||
PsiElement(M68kTokenType.MNEMONIC)('move')
|
||||
M68kOperandSizeImpl(OPERAND_SIZE)
|
||||
PsiElement(M68kTokenType.OPSIZE_L)('.l')
|
||||
PsiWhiteSpace(' ')
|
||||
M68kAddressRegisterIndirectWithIndexBaseDisplacementAddressingModeImpl(ADDRESS_REGISTER_INDIRECT_WITH_INDEX_BASE_DISPLACEMENT_ADDRESSING_MODE)
|
||||
PsiElement(M68kTokenType.ROUND_L)('(')
|
||||
PsiElement(M68kTokenType.ROUND_R)(')')
|
||||
PsiElement(M68kTokenType.SEPARATOR)(',')
|
||||
M68kDataRegisterDirectAddressingModeImpl(DATA_REGISTER_DIRECT_ADDRESSING_MODE)
|
||||
M68kDataRegisterImpl(DATA_REGISTER)
|
||||
PsiElement(M68kTokenType.DREG)('d0')
|
||||
PsiElement(M68kTokenType.EOL)('\n')
|
Loading…
Reference in New Issue
Block a user