From 94001c8b8781bcc92e9b47661ac85ea1e9b88037 Mon Sep 17 00:00:00 2001 From: chrisly42 Date: Mon, 2 Aug 2021 20:54:30 +0200 Subject: [PATCH] Added explicit IndexRegister-PSI-Element. Major rework to support new DocumentationProvider on registers. When asking for documentation on registers, a code flow analysis is done. --- README.md | 1 + build.gradle | 1 + .../plugins/m68k/parser/M68kParser.java | 67 +++--- ...terIndirectWithIndexNewAddressingMode.java | 9 +- ...terIndirectWithIndexOldAddressingMode.java | 9 +- .../plugins/m68k/psi/M68kIndexRegister.java | 17 ++ ...terIndirectWithIndexNewAddressingMode.java | 9 +- ...terIndirectWithIndexOldAddressingMode.java | 9 +- .../intellij/plugins/m68k/psi/M68kTypes.java | 3 + .../plugins/m68k/psi/M68kVisitor.java | 4 + ...ndirectWithIndexNewAddressingModeImpl.java | 18 +- ...ndirectWithIndexOldAddressingModeImpl.java | 18 +- .../m68k/psi/impl/M68kIndexRegisterImpl.java | 45 +++++ ...ndirectWithIndexNewAddressingModeImpl.java | 23 +-- ...ndirectWithIndexOldAddressingModeImpl.java | 23 +-- .../plugins/m68k/M68kFileElementType.kt | 2 +- .../intellij/plugins/m68k/asm/M68kIsa.kt | 54 ++--- .../M68kInstructionDocumentationProvider.kt | 14 +- .../M68kRegisterFlowDocumentationProvider.kt | 191 +++++++++++++++++- .../platon42/intellij/plugins/m68k/m68k.bnf | 24 +-- .../plugins/m68k/psi/M68kAddressModeUtil.kt | 49 +++-- .../plugins/m68k/psi/M68kPsiImplUtil.kt | 6 + .../psi/M68kWithAddressRegisterIndirect.kt | 2 +- .../plugins/m68k/psi/M68kWithDisplacement.kt | 2 +- .../plugins/m68k/psi/M68kWithIndexRegister.kt | 10 +- .../plugins/m68k/utils/M68kIsaUtil.kt | 56 ++++- ...68kInstructionDocumentationProviderTest.kt | 38 +++- ...8kRegisterFlowDocumentationProviderTest.kt | 76 ++++++- ...omplex_math_expression_in_displacement.txt | 9 +- ...irect_with_index_and_offset_new_syntax.txt | 14 +- ...irect_with_index_and_offset_old_syntax.txt | 14 +- ...with_index_special_case_without_offset.txt | 14 +- ...irect_with_index_and_offset_new_syntax.txt | 14 +- ...irect_with_index_and_offset_old_syntax.txt | 14 +- ...with_index_special_case_without_offset.txt | 14 +- 35 files changed, 619 insertions(+), 254 deletions(-) create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/M68kIndexRegister.java create mode 100644 src/main/gen/de/platon42/intellij/plugins/m68k/psi/impl/M68kIndexRegisterImpl.java diff --git a/README.md b/README.md index 15457d2..bb454b1 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,7 @@ make it work with JUnit 5. Feel free to use the code (in package ```de.platon42. - New: Added Documentation Provider for symbol definitions (shows assigned declaration). - New: Added Documentation Provider for mnemonics (simple version, generated out of ISA information). - Bugfix: Macro definitions with colons and without space supported (as found in P61a source). +- New: When asking for documentation on registers, a code flow analysis is done. Cool stuff! ### V0.3 (28-Jul-21) diff --git a/build.gradle b/build.gradle index fe4e251..eb6aabb 100644 --- a/build.gradle +++ b/build.gradle @@ -68,6 +68,7 @@ patchPluginXml {
  • New: Added Documentation Provider for symbol definitions (shows assigned declaration).
  • New: Added Documentation Provider for mnemonics (simple version, generated out of ISA information).
  • Bugfix: Macro definitions with colons and without space supported (as found in P61a source). +
  • New: When asking for documentation on registers, a code flow analysis is done. Cool stuff!

    V0.3 (28-Jul-21)